diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7b6ac0cd..cd52a9fb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.582.0 +speakeasyVersion: 1.606.0 sources: GustoEmbedded-OAS: sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:21604c1ff7b9c06fdb546e4c82de7f0638061d995a3daab264e9121e961a751a - sourceBlobDigest: sha256:a845c25e9fe3043a24e3cf22b6de69e05d374c47e8d8230cb6e07d4aa742c5a4 + sourceRevisionDigest: sha256:4f17a92304262999beb52d09140d42dbda1ea1d96d00a4e18514b5153b5a8aa6 + sourceBlobDigest: sha256:2411284264456b120394f00fbb5f0ae3ec0bcf8eb032d0b2645e144b8dc9b07a tags: - latest - - speakeasy-sdk-regen-1752706761 + - speakeasy-sdk-regen-1753402543 - "2024-04-01" targets: gusto-embedded: source: GustoEmbedded-OAS sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:21604c1ff7b9c06fdb546e4c82de7f0638061d995a3daab264e9121e961a751a - sourceBlobDigest: sha256:a845c25e9fe3043a24e3cf22b6de69e05d374c47e8d8230cb6e07d4aa742c5a4 + sourceRevisionDigest: sha256:4f17a92304262999beb52d09140d42dbda1ea1d96d00a4e18514b5153b5a8aa6 + sourceBlobDigest: sha256:2411284264456b120394f00fbb5f0ae3ec0bcf8eb032d0b2645e144b8dc9b07a codeSamplesNamespace: gusto-embedded-oas-typescript-code-samples - codeSamplesRevisionDigest: sha256:0af51d1902f659776541c00e8292e04f5ecb4b9f0f88c17067de8d1156a43873 + codeSamplesRevisionDigest: sha256:96dd9da12104cd493ed303ffd434921b0e20d8b152bb8b80cd04fb1071e3328c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/gusto_embedded/.speakeasy/gen.lock b/gusto_embedded/.speakeasy/gen.lock index bc29e2b1..750116ad 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: 3cd0c2220953704f5f13982f80fc83d6 + docChecksum: d07994884780fa0de44172913feac1f0 docVersion: "2024-04-01" - speakeasyVersion: 1.582.0 - generationVersion: 2.657.1 - releaseVersion: 0.6.6 - configChecksum: 0306c134f6231d987a53f4c2fab9e9a0 + speakeasyVersion: 1.606.0 + generationVersion: 2.686.7 + releaseVersion: 0.6.7 + configChecksum: ef82d7d4d0a98ddd2ffc074a8ef3748e repoURL: https://github.com/Gusto/gusto-typescript-client.git repoSubDirectory: gusto_embedded installationURL: https://gitpkg.now.sh/Gusto/gusto-typescript-client/gusto_embedded @@ -16,7 +16,7 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.1.1 constsAndDefaults: 0.1.12 - core: 3.21.14 + core: 3.21.20 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 @@ -89,6 +89,8 @@ generatedFiles: - docs/models/components/companyaddress.md - docs/models/components/companyattachment.md - docs/models/components/companybankaccount.md + - docs/models/components/companybankaccountrequest.md + - docs/models/components/companybankaccountrequestaccounttype.md - docs/models/components/companybenefit.md - docs/models/components/companybenefitwithemployeebenefits.md - docs/models/components/companybenefitwithemployeebenefitscontribution.md @@ -151,6 +153,7 @@ generatedFiles: - docs/models/components/contractors.md - docs/models/components/contractortype.md - docs/models/components/contribution.md + - docs/models/components/contributionexclusion.md - docs/models/components/coverageamount.md - docs/models/components/coveragesalarymultiplier.md - docs/models/components/createreport.md @@ -224,7 +227,6 @@ generatedFiles: - docs/models/components/externalpayroll.md - docs/models/components/externalpayrollbasic.md - docs/models/components/externalpayrollbasicstatus.md - - docs/models/components/externalpayrollbenefits.md - docs/models/components/externalpayrollitems.md - docs/models/components/externalpayrollmetadata.md - docs/models/components/externalpayrolltaxes.md @@ -338,14 +340,21 @@ generatedFiles: - docs/models/components/payrollreceipt.md - docs/models/components/payrollreceiptemployeecompensations.md - docs/models/components/payrollreceiptpaymentmethod.md - - docs/models/components/payrollreceipttaxes.md - docs/models/components/payrollreversal.md + - docs/models/components/payrollshow.md + - docs/models/components/payrollshowbenefits.md + - docs/models/components/payrollshowfixedcompensations.md + - docs/models/components/payrollshowhourlycompensations.md + - docs/models/components/payrollshowpaidtimeoff.md + - docs/models/components/payrollshowpaymentmethod.md + - docs/models/components/payrollshowtaxes.md - docs/models/components/payrollsubmissionblockerstype.md - docs/models/components/payrollsubmissionblockerstypemetadata.md - docs/models/components/payrollsubmissionblockerstypestatus.md - docs/models/components/payrolltotalstype.md - docs/models/components/payrolltype.md - docs/models/components/payrollupdate.md + - docs/models/components/payrollupdateemployeecompensations.md - docs/models/components/payrollupdatefixedcompensations.md - docs/models/components/payrollupdatehourlycompensations.md - docs/models/components/payrollupdatepaidtimeoff.md @@ -447,6 +456,7 @@ generatedFiles: - docs/models/components/workaddress.md - docs/models/components/ytdbenefitamountsfromdifferentcompany.md - docs/models/errors/base.md + - docs/models/errors/companysuspensioncreationerrors.md - docs/models/errors/deletev1companybenefitscompanybenefitiderrors.md - docs/models/errors/deletev1companybenefitscompanybenefitidresponsebody.md - docs/models/errors/errors.md @@ -476,6 +486,9 @@ generatedFiles: - docs/models/operations/deletecompaniescompanyuuidholidaypaypolicyresponse.md - docs/models/operations/deletedepartmentrequest.md - docs/models/operations/deletedepartmentresponse.md + - docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md + - docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidrequest.md + - docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidresponse.md - docs/models/operations/deletev1companiescompanyidcontractorpaymentcontractorpaymentrequest.md - docs/models/operations/deletev1companiescompanyidcontractorpaymentcontractorpaymentresponse.md - docs/models/operations/deletev1companiescompanyidearningtypesearningtypeuuidrequest.md @@ -543,6 +556,7 @@ generatedFiles: - docs/models/operations/getcompaniescompanyuuidholidaypaypolicyresponse.md - docs/models/operations/getcompaniescompanyuuidreporttemplatesreporttyperequest.md - docs/models/operations/getcompaniescompanyuuidreporttemplatesreporttyperesponse.md + - docs/models/operations/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md - docs/models/operations/getcompaniescompanyuuidsuspensionsrequest.md - docs/models/operations/getcompaniescompanyuuidsuspensionsresponse.md - docs/models/operations/getcompaniescompanyuuidtimeoffpoliciesrequest.md @@ -591,6 +605,7 @@ generatedFiles: - docs/models/operations/getv1companiesattachmenturlresponsebody.md - docs/models/operations/getv1companiescompanyidadminsrequest.md - docs/models/operations/getv1companiescompanyidadminsresponse.md + - docs/models/operations/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md - docs/models/operations/getv1companiescompanyidbankaccountsrequest.md - docs/models/operations/getv1companiescompanyidbankaccountsresponse.md - docs/models/operations/getv1companiescompanyidcompanybenefitsrequest.md @@ -656,6 +671,8 @@ generatedFiles: - docs/models/operations/getv1companiespayrollblockerscompanyuuidresponse.md - docs/models/operations/getv1companiesrequest.md - docs/models/operations/getv1companiesresponse.md + - docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md + - docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsresponse.md - docs/models/operations/getv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/operations/getv1companybenefitscompanybenefitidemployeebenefitsresponse.md - docs/models/operations/getv1companybenefitscompanybenefitidrequest.md @@ -862,6 +879,7 @@ generatedFiles: - docs/models/operations/postcompaniescompanyuuidreportsrequest.md - docs/models/operations/postcompaniescompanyuuidreportsrequestbody.md - docs/models/operations/postcompaniescompanyuuidreportsresponse.md + - docs/models/operations/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md - docs/models/operations/postcompaniescompanyuuidsuspensionsrequest.md - docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md - docs/models/operations/postcompaniescompanyuuidsuspensionsresponse.md @@ -897,8 +915,8 @@ generatedFiles: - docs/models/operations/postv1companiescompanyidadminsrequest.md - docs/models/operations/postv1companiescompanyidadminsrequestbody.md - docs/models/operations/postv1companiescompanyidadminsresponse.md + - docs/models/operations/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md - docs/models/operations/postv1companiescompanyidbankaccountsrequest.md - - docs/models/operations/postv1companiescompanyidbankaccountsrequestbody.md - docs/models/operations/postv1companiescompanyidbankaccountsresponse.md - docs/models/operations/postv1companiescompanyidcompanybenefitsrequest.md - docs/models/operations/postv1companiescompanyidcompanybenefitsrequestbody.md @@ -952,7 +970,6 @@ generatedFiles: - docs/models/operations/postv1contractorscontractoruuidbankaccountsrequest.md - docs/models/operations/postv1contractorscontractoruuidbankaccountsrequestbody.md - docs/models/operations/postv1contractorscontractoruuidbankaccountsresponse.md - - docs/models/operations/postv1employeesemployeeidbankaccountsaccounttype.md - docs/models/operations/postv1employeesemployeeidbankaccountsrequest.md - docs/models/operations/postv1employeesemployeeidbankaccountsrequestbody.md - docs/models/operations/postv1employeesemployeeidbankaccountsresponse.md @@ -1090,6 +1107,9 @@ generatedFiles: - docs/models/operations/putv1companiesrequest.md - docs/models/operations/putv1companiesrequestbody.md - docs/models/operations/putv1companiesresponse.md + - docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md + - docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md + - docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsresponse.md - docs/models/operations/putv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/operations/putv1companybenefitscompanybenefitidemployeebenefitsrequestbody.md - docs/models/operations/putv1companybenefitscompanybenefitidemployeebenefitsresponse.md @@ -1338,6 +1358,7 @@ generatedFiles: - src/funcs/achTransactionsGetAll.ts - src/funcs/bankAccountsCreate.ts - src/funcs/bankAccountsCreateFromPlaidToken.ts + - src/funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts - src/funcs/bankAccountsGet.ts - src/funcs/bankAccountsVerify.ts - src/funcs/companiesAcceptTermsOfService.ts @@ -1365,7 +1386,9 @@ generatedFiles: - src/funcs/companyBenefitsGetRequirements.ts - src/funcs/companyBenefitsGetSummary.ts - src/funcs/companyBenefitsGetSupported.ts + - src/funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts - src/funcs/companyBenefitsList.ts + - src/funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts - src/funcs/companyBenefitsUpdate.ts - src/funcs/companyBenefitsUpdateEmployeeBenefits.ts - src/funcs/companyFormsGet.ts @@ -1623,6 +1646,7 @@ generatedFiles: - src/models/components/companyaddress.ts - src/models/components/companyattachment.ts - src/models/components/companybankaccount.ts + - src/models/components/companybankaccountrequest.ts - src/models/components/companybenefit.ts - src/models/components/companybenefitwithemployeebenefits.ts - src/models/components/companycustomfield.ts @@ -1644,6 +1668,7 @@ generatedFiles: - src/models/components/contractorpaymentreceipt.ts - src/models/components/contractorpaymentsummary.ts - src/models/components/contractorpaymentsummarybydates.ts + - src/models/components/contributionexclusion.ts - src/models/components/createreport.ts - src/models/components/customfieldtype.ts - src/models/components/department.ts @@ -1728,6 +1753,7 @@ generatedFiles: - src/models/components/payrollprocessingrequest.ts - src/models/components/payrollreceipt.ts - src/models/components/payrollreversal.ts + - src/models/components/payrollshow.ts - src/models/components/payrollsubmissionblockerstype.ts - src/models/components/payrolltotalstype.ts - src/models/components/payrollupdate.ts @@ -1770,6 +1796,7 @@ generatedFiles: - src/models/components/wireinrequest.ts - src/models/components/ytdbenefitamountsfromdifferentcompany.ts - src/models/errors/apierror.ts + - src/models/errors/companysuspensioncreationerrors.ts - src/models/errors/deletev1companybenefitscompanybenefitid.ts - src/models/errors/gustoembeddederror.ts - src/models/errors/httpclienterrors.ts @@ -1784,6 +1811,7 @@ generatedFiles: - src/models/errors/unprocessableentityerrorobject1.ts - src/models/operations/deletecompaniescompanyuuidholidaypaypolicy.ts - src/models/operations/deletedepartment.ts + - src/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.ts - src/models/operations/deletev1companiescompanyidcontractorpaymentcontractorpayment.ts - src/models/operations/deletev1companiescompanyidearningtypesearningtypeuuid.ts - src/models/operations/deletev1companiescompanyidpayrolls.ts @@ -1857,6 +1885,7 @@ generatedFiles: - src/models/operations/getv1companiescompanyuuidtaxrequirementsstate.ts - src/models/operations/getv1companiespayrollblockerscompanyuuid.ts - src/models/operations/getv1companybenefitscompanybenefitid.ts + - src/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.ts - src/models/operations/getv1companybenefitscompanybenefitidemployeebenefits.ts - src/models/operations/getv1companyexternalpayrolls.ts - src/models/operations/getv1companyfinishonboarding.ts @@ -1995,6 +2024,7 @@ generatedFiles: - src/models/operations/putv1companiescompanyuuidsignatoriessignatoryuuid.ts - src/models/operations/putv1companiescompanyuuidtaxrequirementsstate.ts - src/models/operations/putv1companybenefitscompanybenefitid.ts + - src/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.ts - src/models/operations/putv1companybenefitscompanybenefitidemployeebenefits.ts - src/models/operations/putv1companyformsign.ts - src/models/operations/putv1companyindustry.ts @@ -2044,6 +2074,7 @@ generatedFiles: - src/react-query/achTransactionsGetAll.ts - src/react-query/bankAccountsCreate.ts - src/react-query/bankAccountsCreateFromPlaidToken.ts + - src/react-query/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts - src/react-query/bankAccountsGet.ts - src/react-query/bankAccountsVerify.ts - src/react-query/companiesAcceptTermsOfService.ts @@ -2071,7 +2102,9 @@ generatedFiles: - src/react-query/companyBenefitsGetRequirements.ts - src/react-query/companyBenefitsGetSummary.ts - src/react-query/companyBenefitsGetSupported.ts + - src/react-query/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts - src/react-query/companyBenefitsList.ts + - src/react-query/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts - src/react-query/companyBenefitsUpdate.ts - src/react-query/companyBenefitsUpdateEmployeeBenefits.ts - src/react-query/companyFormsGet.ts @@ -2743,6 +2776,8 @@ examples: responses: "200": application/json: [{}, {}] + "404": + application/json: {"errors": []} post-companies-company_uuid-suspensions: Leaving to join another payroll provider: parameters: @@ -2803,6 +2838,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-companies-company-uuid-suspensions: + parameters: + path: + company_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"file_quarterly_forms": true, "file_yearly_forms": false, "reconcile_tax_method": "pay_taxes", "reason": "acquired"} + responses: + "200": + application/json: {} + "422": + application/json: {"errors": []} get-invoices-invoice-period: example: parameters: @@ -3442,6 +3490,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-bank-accounts: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"routing_number": "", "account_number": "", "account_type": "Savings"} + responses: + "201": + application/json: {"uuid": "035098fc-43ca-4e65-9b38-e0b3c4343abe"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-companies-company_id-bank-accounts: Example: parameters: @@ -3452,6 +3513,17 @@ examples: responses: "200": application/json: [{"uuid": "1263eae5-4411-48d9-bd6d-18ed93082e65", "company_uuid": "e2c4c0ce-2986-48b9-86cf-ec27f6ed9a36", "account_type": "Checking", "routing_number": "851070439", "hidden_account_number": "XXXX4087", "verification_status": "verified", "verification_type": "bank_deposits", "name": "Employer Funding Account"}] + speakeasy-default-get-v1-companies-company-id-bank-accounts: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"uuid": "e6efb88c-6c67-46bf-9667-a7f5c6e14bb7"}] + "404": + application/json: {"errors": []} put-v1-companies-company_id-bank-accounts-verify: Example: parameters: @@ -5970,7 +6042,7 @@ examples: application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": true, "email": "johnson@johnson.com", "first_name": "Johnson", "last_name": "Johnson", "file_new_hire_report": false, "work_state": "CA"} responses: "201": - application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} Create a Business contractor: @@ -5983,7 +6055,7 @@ examples: application/json: {"type": "Business", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Johnson-Johnson Contractors"} responses: "201": - application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} Individual Contractor: @@ -6081,7 +6153,7 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Hourly", "start_date": "2021-01-01", "hourly_rate": "20.00", "self_onboarding": false, "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "file_new_hire_report": false, "is_active": true} responses: "200": - application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": application/json: {"errors": [{"error_key": "", "category": ""}]} Update a Business Contractor: @@ -6094,7 +6166,7 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Contracting Solutions", "ein": "991113334", "is_active": false} responses: "200": - application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": application/json: {"errors": [{"error_key": "", "category": ""}]} Individual Contractor: @@ -7219,7 +7291,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "gross_pay": 2791.25, "net_pay": 1953.31, "check_amount": 1953.31, "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": 100, "company_contribution": 50, "imputed": true}, {"name": "401K", "employee_deduction": 100, "company_contribution": 50, "imputed": false}], "deductions": [{"name": "Child Support", "amount": 80}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": 646.69}, {"name": "Social Security", "employer": true, "amount": 191.25}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "gross_pay": 2791.25, "net_pay": 1953.31, "check_amount": 1953.31, "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": 100, "company_contribution": 50, "imputed": true}, {"name": "401K", "employee_deduction": 100, "company_contribution": 50, "imputed": false}], "deductions": [{"name": "Child Support", "amount": 80}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": 646.69}, {"name": "Social Security", "employer": true, "amount": 191.25}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "gross_pay": 2791.25, "net_pay": 1953.31, "check_amount": 1953.31, "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": 100, "company_contribution": 50, "imputed": true}, {"name": "401K", "employee_deduction": 100, "company_contribution": 50, "imputed": false}], "deductions": [{"name": "Child Support", "amount": 80}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": 646.69}, {"name": "Social Security", "employer": true, "amount": 191.25}]}], "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10", "metadata": {}}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} + application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10", "metadata": {}}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} Basic: parameters: path: @@ -9646,5 +9718,71 @@ examples: application/json: {} "404": 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: + path: + company_id: "" + bank_account_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + put-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Bonus", "excluded": true}, {"contribution_uuid": "082e034c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Regular", "excluded": true}]} + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + Basic: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} + Resource: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} + Nested: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + 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"}]}]} examplesVersion: 1.0.2 generatedTests: {} diff --git a/gusto_embedded/.speakeasy/gen.yaml b/gusto_embedded/.speakeasy/gen.yaml index d456b5ec..2e4bb71b 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.6 + version: 0.6.7 additionalDependencies: dependencies: {} devDependencies: {} @@ -60,4 +60,5 @@ typescript: packageName: '@gusto/embedded-api' responseFormat: envelope-http templateVersion: v2 + usageSDKInitImports: [] useIndexModules: false diff --git a/gusto_embedded/README.md b/gusto_embedded/README.md index 66d344eb..969616b1 100644 --- a/gusto_embedded/README.md +++ b/gusto_embedded/README.md @@ -194,10 +194,11 @@ run(); ### [bankAccounts](docs/sdks/bankaccounts/README.md) -* [create](docs/sdks/bankaccounts/README.md#create) - Create a company bank account * [get](docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts +* [create](docs/sdks/bankaccounts/README.md#create) - Create a company bank account * [verify](docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account * [createFromPlaidToken](docs/sdks/bankaccounts/README.md#createfromplaidtoken) - Create a bank account from a plaid processor token +* [deleteV1CompaniesCompanyIdBankAccountsBankAccountId](docs/sdks/bankaccounts/README.md#deletev1companiescompanyidbankaccountsbankaccountid) - Delete a company bank account ### [companies](docs/sdks/companies/README.md) @@ -241,6 +242,8 @@ run(); * [getEmployeeBenefits](docs/sdks/companybenefits/README.md#getemployeebenefits) - Get all employee benefits for a company benefit * [updateEmployeeBenefits](docs/sdks/companybenefits/README.md#updateemployeebenefits) - Bulk update employee benefits for a company benefit * [getRequirements](docs/sdks/companybenefits/README.md#getrequirements) - Get benefit fields requirements by ID +* [getV1CompanyBenefitsCompanyBenefitIdContributionExclusions](docs/sdks/companybenefits/README.md#getv1companybenefitscompanybenefitidcontributionexclusions) - Get contribution exclusions for a company benefit +* [putV1CompanyBenefitsCompanyBenefitIdContributionExclusions](docs/sdks/companybenefits/README.md#putv1companybenefitscompanybenefitidcontributionexclusions) - Update contribution exclusions for a company benefit ### [companyForms](docs/sdks/companyforms/README.md) @@ -620,6 +623,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`achTransactionsGetAll`](docs/sdks/achtransactions/README.md#getall) - Get all ACH transactions for a company - [`bankAccountsCreate`](docs/sdks/bankaccounts/README.md#create) - Create a company bank account - [`bankAccountsCreateFromPlaidToken`](docs/sdks/bankaccounts/README.md#createfromplaidtoken) - Create a bank account from a plaid processor token +- [`bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId`](docs/sdks/bankaccounts/README.md#deletev1companiescompanyidbankaccountsbankaccountid) - Delete a company bank account - [`bankAccountsGet`](docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts - [`bankAccountsVerify`](docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account - [`companiesAcceptTermsOfService`](docs/sdks/companies/README.md#accepttermsofservice) - Accept terms of service for a company user @@ -647,7 +651,9 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`companyBenefitsGetRequirements`](docs/sdks/companybenefits/README.md#getrequirements) - Get benefit fields requirements by ID - [`companyBenefitsGetSummary`](docs/sdks/companybenefits/README.md#getsummary) - Get company benefit summary by company benefit id. - [`companyBenefitsGetSupported`](docs/sdks/companybenefits/README.md#getsupported) - Get a supported benefit by ID +- [`companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions`](docs/sdks/companybenefits/README.md#getv1companybenefitscompanybenefitidcontributionexclusions) - Get contribution exclusions for a company benefit - [`companyBenefitsList`](docs/sdks/companybenefits/README.md#list) - Get benefits for a company +- [`companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions`](docs/sdks/companybenefits/README.md#putv1companybenefitscompanybenefitidcontributionexclusions) - Update contribution exclusions for a company benefit - [`companyBenefitsUpdate`](docs/sdks/companybenefits/README.md#update) - Update a company benefit - [`companyBenefitsUpdateEmployeeBenefits`](docs/sdks/companybenefits/README.md#updateemployeebenefits) - Bulk update employee benefits for a company benefit - [`companyFormsGet`](docs/sdks/companyforms/README.md#get) - Get a company form @@ -903,6 +909,7 @@ To learn about this feature and how to get started, check - [`useAchTransactionsGetAll`](docs/sdks/achtransactions/README.md#getall) - Get all ACH transactions for a company - [`useBankAccountsCreateFromPlaidTokenMutation`](docs/sdks/bankaccounts/README.md#createfromplaidtoken) - Create a bank account from a plaid processor token - [`useBankAccountsCreateMutation`](docs/sdks/bankaccounts/README.md#create) - Create a company bank account +- [`useBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutation`](docs/sdks/bankaccounts/README.md#deletev1companiescompanyidbankaccountsbankaccountid) - Delete a company bank account - [`useBankAccountsGet`](docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts - [`useBankAccountsVerifyMutation`](docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account - [`useCompaniesAcceptTermsOfServiceMutation`](docs/sdks/companies/README.md#accepttermsofservice) - Accept terms of service for a company user @@ -930,7 +937,9 @@ To learn about this feature and how to get started, check - [`useCompanyBenefitsGetRequirements`](docs/sdks/companybenefits/README.md#getrequirements) - Get benefit fields requirements by ID - [`useCompanyBenefitsGetSummary`](docs/sdks/companybenefits/README.md#getsummary) - Get company benefit summary by company benefit id. - [`useCompanyBenefitsGetSupported`](docs/sdks/companybenefits/README.md#getsupported) - Get a supported benefit by ID +- [`useCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions`](docs/sdks/companybenefits/README.md#getv1companybenefitscompanybenefitidcontributionexclusions) - Get contribution exclusions for a company benefit - [`useCompanyBenefitsList`](docs/sdks/companybenefits/README.md#list) - Get benefits for a company +- [`useCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutation`](docs/sdks/companybenefits/README.md#putv1companybenefitscompanybenefitidcontributionexclusions) - Update contribution exclusions for a company benefit - [`useCompanyBenefitsUpdateEmployeeBenefitsMutation`](docs/sdks/companybenefits/README.md#updateemployeebenefits) - Bulk update employee benefits for a company benefit - [`useCompanyBenefitsUpdateMutation`](docs/sdks/companybenefits/README.md#update) - Update a company benefit - [`useCompanyFormsGet`](docs/sdks/companyforms/README.md#get) - Get a company form @@ -1329,7 +1338,7 @@ run(); **Primary error:** * [`GustoEmbeddedError`](./src/models/errors/gustoembeddederror.ts): The base class for HTTP error responses. -
Less common errors (10) +
Less common errors (11)
@@ -1342,10 +1351,11 @@ 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 135 of 257 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 257 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 257 methods.* -* [`DeleteV1CompanyBenefitsCompanyBenefitIdResponseBody`](./src/models/errors/deletev1companybenefitscompanybenefitidresponsebody.ts): Unprocessable Entity. Status code `422`. Applicable to 1 of 257 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 138 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.* +* [`CompanySuspensionCreationErrors`](./src/models/errors/companysuspensioncreationerrors.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 1 of 260 methods.* * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
diff --git a/gusto_embedded/RELEASES.md b/gusto_embedded/RELEASES.md index f5d9f31e..3f86c173 100644 --- a/gusto_embedded/RELEASES.md +++ b/gusto_embedded/RELEASES.md @@ -308,4 +308,14 @@ Based on: ### Generated - [typescript v0.6.6] gusto_embedded ### Releases -- [NPM v0.6.6] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.6 - gusto_embedded \ No newline at end of file +- [NPM v0.6.6] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.6 - gusto_embedded + +## 2025-08-20 16:53:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.606.0 (2.686.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.6.7] gusto_embedded +### Releases +- [NPM v0.6.7] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.7 - gusto_embedded \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/admin.md b/gusto_embedded/docs/models/components/admin.md index 86a9ffed..33220007 100644 --- a/gusto_embedded/docs/models/components/admin.md +++ b/gusto_embedded/docs/models/components/admin.md @@ -14,9 +14,9 @@ let value: Admin = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *string* | :heavy_check_mark: | The unique id of the admin. | -| `email` | *string* | :heavy_minus_sign: | The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them. | -| `firstName` | *string* | :heavy_minus_sign: | The first name of the admin. | -| `lastName` | *string* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | The unique id of the admin. | +| `email` | *string* | :heavy_minus_sign: | The email of the admin for Gusto's system. | +| `firstName` | *string* | :heavy_minus_sign: | The first name of the admin. | +| `lastName` | *string* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/benefits.md b/gusto_embedded/docs/models/components/benefits.md index d4ca2cb1..97204785 100644 --- a/gusto_embedded/docs/models/components/benefits.md +++ b/gusto_embedded/docs/models/components/benefits.md @@ -3,16 +3,15 @@ ## Example Usage ```typescript -import { Benefits } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype.js"; +import { Benefits } from "@gusto/embedded-api/models/components/externalpayroll.js"; let value: Benefits = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `employeeDeduction` | *number* | :heavy_minus_sign: | N/A | -| `companyContribution` | *number* | :heavy_minus_sign: | N/A | -| `imputed` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `benefitId` | *number* | :heavy_minus_sign: | N/A | +| `companyContributionAmount` | *string* | :heavy_minus_sign: | N/A | +| `employeeDeductionAmount` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/companybankaccountrequest.md b/gusto_embedded/docs/models/components/companybankaccountrequest.md new file mode 100644 index 00000000..c772aedb --- /dev/null +++ b/gusto_embedded/docs/models/components/companybankaccountrequest.md @@ -0,0 +1,21 @@ +# CompanyBankAccountRequest + +## Example Usage + +```typescript +import { CompanyBankAccountRequest } from "@gusto/embedded-api/models/components/companybankaccountrequest.js"; + +let value: CompanyBankAccountRequest = { + routingNumber: "", + accountNumber: "", + accountType: "Savings", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `routingNumber` | *string* | :heavy_check_mark: | The bank routing number | +| `accountNumber` | *string* | :heavy_check_mark: | The bank account number | +| `accountType` | [components.CompanyBankAccountRequestAccountType](../../models/components/companybankaccountrequestaccounttype.md) | :heavy_check_mark: | The bank account type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/companybankaccountrequestaccounttype.md b/gusto_embedded/docs/models/components/companybankaccountrequestaccounttype.md new file mode 100644 index 00000000..c9c4c75d --- /dev/null +++ b/gusto_embedded/docs/models/components/companybankaccountrequestaccounttype.md @@ -0,0 +1,17 @@ +# CompanyBankAccountRequestAccountType + +The bank account type + +## Example Usage + +```typescript +import { CompanyBankAccountRequestAccountType } from "@gusto/embedded-api/models/components/companybankaccountrequest.js"; + +let value: CompanyBankAccountRequestAccountType = "Checking"; +``` + +## Values + +```typescript +"Checking" | "Savings" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/companysuspension.md b/gusto_embedded/docs/models/components/companysuspension.md index 9b38dea4..b4da16bf 100644 --- a/gusto_embedded/docs/models/components/companysuspension.md +++ b/gusto_embedded/docs/models/components/companysuspension.md @@ -20,7 +20,7 @@ let value: CompanySuspension = {}; | `leavingFor` | *string* | :heavy_minus_sign: | Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`. | | `reason` | *string* | :heavy_minus_sign: | Explanation for why the company's account was suspended. | | `reconcileTaxMethod` | [components.ReconcileTaxMethod](../../models/components/reconciletaxmethod.md) | :heavy_minus_sign: | How Gusto will handle taxes already collected. | -| `fileQuarterlyForms` | *boolean* | :heavy_minus_sign: | 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_minus_sign: | 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.
| -| `comments` | *string* | :heavy_minus_sign: | User-supplied comments describing why then are suspending their account. | -| `taxRefunds` | [components.TaxRefunds](../../models/components/taxrefunds.md) | :heavy_minus_sign: | Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid
by Gusto, depending on the value in `reconcile_tax_method`.
| \ No newline at end of file +| `fileQuarterlyForms` | *boolean* | :heavy_minus_sign: | 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_minus_sign: | 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.
| +| `comments` | *string* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. | +| `taxRefunds` | [components.TaxRefunds](../../models/components/taxrefunds.md)[] | :heavy_minus_sign: | Describes the taxes which are refundable to the company for this suspension. These may be refunded or paid by Gusto depending on the value in `reconcile_tax_method`.
| \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractoronboardingstatusonboardingstatus.md b/gusto_embedded/docs/models/components/contractoronboardingstatusonboardingstatus.md index b4d41561..719e8175 100644 --- a/gusto_embedded/docs/models/components/contractoronboardingstatusonboardingstatus.md +++ b/gusto_embedded/docs/models/components/contractoronboardingstatusonboardingstatus.md @@ -13,5 +13,5 @@ let value: ContractorOnboardingStatusOnboardingStatus = "onboarding_completed"; ## Values ```typescript -"onboarding_completed" | "admin_onboarding_review" | "admin_onboarding_incomplete" +"onboarding_completed" | "admin_onboarding_review" | "admin_onboarding_incomplete" | "self_onboarding_not_invited" | "self_onboarding_invited" | "self_onboarding_started" | "self_onboarding_review" ``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contributionexclusion.md b/gusto_embedded/docs/models/components/contributionexclusion.md new file mode 100644 index 00000000..df87d92b --- /dev/null +++ b/gusto_embedded/docs/models/components/contributionexclusion.md @@ -0,0 +1,23 @@ +# ContributionExclusion + +The representation of a contribution exclusion for a company benefit. + +## Example Usage + +```typescript +import { ContributionExclusion } from "@gusto/embedded-api/models/components/contributionexclusion.js"; + +let value: ContributionExclusion = { + contributionUuid: "", + contributionType: "", + excluded: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `contributionUuid` | *string* | :heavy_check_mark: | The UUID of the contribution type. | +| `contributionType` | *string* | :heavy_check_mark: | The name of the contribution type. | +| `excluded` | *boolean* | :heavy_check_mark: | Whether this contribution type is excluded from the benefit. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/deductions.md b/gusto_embedded/docs/models/components/deductions.md index b35ba8d9..53bba190 100644 --- a/gusto_embedded/docs/models/components/deductions.md +++ b/gusto_embedded/docs/models/components/deductions.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { Deductions } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype.js"; +import { Deductions } from "@gusto/embedded-api/models/components/payrollshow.js"; let value: Deductions = {}; ``` diff --git a/gusto_embedded/docs/models/components/employeecompensations.md b/gusto_embedded/docs/models/components/employeecompensations.md index ba0dae26..e975e876 100644 --- a/gusto_embedded/docs/models/components/employeecompensations.md +++ b/gusto_embedded/docs/models/components/employeecompensations.md @@ -3,20 +3,26 @@ ## Example Usage ```typescript -import { EmployeeCompensations } from "@gusto/embedded-api/models/components/payrollupdate.js"; +import { EmployeeCompensations } from "@gusto/embedded-api/models/components/payrollshow.js"; let value: EmployeeCompensations = {}; ``` ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employeeUuid` | *string* | :heavy_minus_sign: | The UUID of the employee. | -| `version` | *string* | :heavy_minus_sign: | The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `excluded` | *boolean* | :heavy_minus_sign: | This employee will be excluded from payroll calculation and will not be paid for the payroll. | -| `paymentMethod` | [components.PayrollUpdatePaymentMethod](../../models/components/payrollupdatepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | -| `memo` | *string* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | -| `fixedCompensations` | [components.PayrollUpdateFixedCompensations](../../models/components/payrollupdatefixedcompensations.md)[] | :heavy_minus_sign: | N/A | -| `hourlyCompensations` | [components.PayrollUpdateHourlyCompensations](../../models/components/payrollupdatehourlycompensations.md)[] | :heavy_minus_sign: | N/A | -| `paidTimeOff` | [components.PayrollUpdatePaidTimeOff](../../models/components/payrollupdatepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `employeeUuid` | *string* | :heavy_minus_sign: | The UUID of the employee. | +| `excluded` | *boolean* | :heavy_minus_sign: | This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. | +| `version` | *string* | :heavy_minus_sign: | The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `grossPay` | *number* | :heavy_minus_sign: | The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. | +| `netPay` | *number* | :heavy_minus_sign: | The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. | +| `checkAmount` | *number* | :heavy_minus_sign: | The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. | +| `paymentMethod` | [components.PayrollShowPaymentMethod](../../models/components/payrollshowpaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. | +| `memo` | *string* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | +| `fixedCompensations` | [components.PayrollShowFixedCompensations](../../models/components/payrollshowfixedcompensations.md)[] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | +| `hourlyCompensations` | [components.PayrollShowHourlyCompensations](../../models/components/payrollshowhourlycompensations.md)[] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | +| `paidTimeOff` | [components.PayrollShowPaidTimeOff](../../models/components/payrollshowpaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | +| `taxes` | [components.PayrollShowTaxes](../../models/components/payrollshowtaxes.md)[] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `benefits` | [components.PayrollShowBenefits](../../models/components/payrollshowbenefits.md)[] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | +| `deductions` | [components.Deductions](../../models/components/deductions.md)[] | :heavy_minus_sign: | An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/externalpayrollbenefits.md b/gusto_embedded/docs/models/components/externalpayrollbenefits.md deleted file mode 100644 index 092240be..00000000 --- a/gusto_embedded/docs/models/components/externalpayrollbenefits.md +++ /dev/null @@ -1,17 +0,0 @@ -# ExternalPayrollBenefits - -## Example Usage - -```typescript -import { ExternalPayrollBenefits } from "@gusto/embedded-api/models/components/externalpayroll.js"; - -let value: ExternalPayrollBenefits = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `benefitId` | *number* | :heavy_minus_sign: | N/A | -| `companyContributionAmount` | *string* | :heavy_minus_sign: | N/A | -| `employeeDeductionAmount` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/externalpayrollitems.md b/gusto_embedded/docs/models/components/externalpayrollitems.md index 2d0ca48c..358cd28d 100644 --- a/gusto_embedded/docs/models/components/externalpayrollitems.md +++ b/gusto_embedded/docs/models/components/externalpayrollitems.md @@ -10,9 +10,9 @@ let value: ExternalPayrollItems = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `employeeUuid` | *string* | :heavy_minus_sign: | N/A | -| `earnings` | [components.Earnings](../../models/components/earnings.md)[] | :heavy_minus_sign: | N/A | -| `benefits` | [components.ExternalPayrollBenefits](../../models/components/externalpayrollbenefits.md)[] | :heavy_minus_sign: | N/A | -| `taxes` | [components.ExternalPayrollTaxes](../../models/components/externalpayrolltaxes.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `employeeUuid` | *string* | :heavy_minus_sign: | N/A | +| `earnings` | [components.Earnings](../../models/components/earnings.md)[] | :heavy_minus_sign: | N/A | +| `benefits` | [components.Benefits](../../models/components/benefits.md)[] | :heavy_minus_sign: | N/A | +| `taxes` | [components.ExternalPayrollTaxes](../../models/components/externalpayrolltaxes.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/paymentconfigs.md b/gusto_embedded/docs/models/components/paymentconfigs.md index e3c09360..b50cacd3 100644 --- a/gusto_embedded/docs/models/components/paymentconfigs.md +++ b/gusto_embedded/docs/models/components/paymentconfigs.md @@ -18,4 +18,5 @@ let value: PaymentConfigs = {}; | `partnerUuid` | *string* | :heavy_minus_sign: | Partner uuid | | `fastPaymentLimit` | *string* | :heavy_minus_sign: | Payment limit for 1-day or 2-day payroll | | `paymentSpeed` | *string* | :heavy_minus_sign: | Payment speed for 1-day, 2-day, 4-day | +| `partnerOwnedDisbursement` | *boolean* | :heavy_minus_sign: | Whether the company is configured to use the partner-owned disbursement payment rail | | `earnedFastAchBlockers` | [components.EarnedFastAchBlockers](../../models/components/earnedfastachblockers.md)[] | :heavy_minus_sign: | Blockers preventing the company from earning fast ACH payments | \ 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 a3aec7c3..72e54f95 100644 --- a/gusto_embedded/docs/models/components/payroll.md +++ b/gusto_embedded/docs/models/components/payroll.md @@ -31,7 +31,6 @@ let value: Payroll = {}; | `payPeriod` | [components.PayrollPayPeriodType](../../models/components/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | | `payrollStatusMeta` | [components.PayrollPayrollStatusMetaType](../../models/components/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [components.PayrollTotalsType](../../models/components/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | -| `employeeCompensations` | [components.PayrollEmployeeCompensationsType](../../models/components/payrollemployeecompensationstype.md)[] | :heavy_minus_sign: | N/A | | `companyTaxes` | [components.PayrollCompanyTaxesType](../../models/components/payrollcompanytaxestype.md)[] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | | `paymentSpeedChanged` | [components.PayrollPaymentSpeedChangedType](../../models/components/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Datetime for when the resource was created. | diff --git a/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md b/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md index 1f531e46..42b94100 100644 --- a/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md +++ b/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md @@ -22,7 +22,4 @@ let value: PayrollEmployeeCompensationsType = {}; | `memo` | *string* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | | `fixedCompensations` | [components.FixedCompensations](../../models/components/fixedcompensations.md)[] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | | `hourlyCompensations` | [components.HourlyCompensations](../../models/components/hourlycompensations.md)[] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | -| `paidTimeOff` | [components.PayrollEmployeeCompensationsTypePaidTimeOff](../../models/components/payrollemployeecompensationstypepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | -| `benefits` | [components.Benefits](../../models/components/benefits.md)[] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | -| `deductions` | [components.Deductions](../../models/components/deductions.md)[] | :heavy_minus_sign: | An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. | -| `taxes` | [components.Taxes](../../models/components/taxes.md)[] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | \ No newline at end of file +| `paidTimeOff` | [components.PayrollEmployeeCompensationsTypePaidTimeOff](../../models/components/payrollemployeecompensationstypepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollreceipt.md b/gusto_embedded/docs/models/components/payrollreceipt.md index f3abe0ea..80b96090 100644 --- a/gusto_embedded/docs/models/components/payrollreceipt.md +++ b/gusto_embedded/docs/models/components/payrollreceipt.md @@ -23,6 +23,6 @@ let value: PayrollReceipt = {}; | `rightToRefund` | *string* | :heavy_minus_sign: | N/A | | `liabilityOfLicensee` | *string* | :heavy_minus_sign: | N/A | | `totals` | [components.Totals](../../models/components/totals.md) | :heavy_minus_sign: | The subtotals for the payroll. | -| `taxes` | [components.PayrollReceiptTaxes](../../models/components/payrollreceipttaxes.md)[] | :heavy_minus_sign: | An array of totaled employer and employee taxes for the pay period. | +| `taxes` | [components.Taxes](../../models/components/taxes.md)[] | :heavy_minus_sign: | An array of totaled employer and employee taxes for the pay period. | | `employeeCompensations` | [components.PayrollReceiptEmployeeCompensations](../../models/components/payrollreceiptemployeecompensations.md)[] | :heavy_minus_sign: | An array of employee compensations and withholdings for this payroll | | `licensee` | [components.Licensee](../../models/components/licensee.md) | :heavy_minus_sign: | The licensed payroll processor | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollreceipttaxes.md b/gusto_embedded/docs/models/components/payrollreceipttaxes.md deleted file mode 100644 index e22cc338..00000000 --- a/gusto_embedded/docs/models/components/payrollreceipttaxes.md +++ /dev/null @@ -1,16 +0,0 @@ -# PayrollReceiptTaxes - -## Example Usage - -```typescript -import { PayrollReceiptTaxes } from "@gusto/embedded-api/models/components/payrollreceipt.js"; - -let value: PayrollReceiptTaxes = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The amount paid for this tax. | -| `amount` | *string* | :heavy_minus_sign: | The total amount paid by both employer and employee for this tax. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshow.md b/gusto_embedded/docs/models/components/payrollshow.md new file mode 100644 index 00000000..7f51b68e --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshow.md @@ -0,0 +1,41 @@ +# PayrollShow + +## Example Usage + +```typescript +import { PayrollShow } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShow = {}; +``` + +## Fields + +| 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. | +| `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. | +| `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. | +| `offCycle` | *boolean* | :heavy_minus_sign: | Indicates whether the payroll is an off-cycle payroll | +| `offCycleReason` | [components.OffCycleReasonType](../../models/components/offcyclereasontype.md) | :heavy_minus_sign: | The off-cycle reason. Only included for off-cycle payrolls. | +| `autoPilot` | *boolean* | :heavy_minus_sign: | Indicates whether the payroll is an auto pilot payroll | +| `external` | *boolean* | :heavy_minus_sign: | Indicates whether the payroll is an external payroll | +| `finalTerminationPayroll` | *boolean* | :heavy_minus_sign: | Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls. | +| `withholdingPayPeriod` | [components.PayrollWithholdingPayPeriodType](../../models/components/payrollwithholdingpayperiodtype.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls. | +| `skipRegularDeductions` | *boolean* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls. | +| `fixedWithholdingRate` | *boolean* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls. | +| `payPeriod` | [components.PayrollPayPeriodType](../../models/components/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | +| `payrollStatusMeta` | [components.PayrollPayrollStatusMetaType](../../models/components/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | +| `totals` | [components.PayrollTotalsType](../../models/components/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | +| `companyTaxes` | [components.PayrollCompanyTaxesType](../../models/components/payrollcompanytaxestype.md)[] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `paymentSpeedChanged` | [components.PayrollPaymentSpeedChangedType](../../models/components/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Datetime for when the resource was created. | +| `submissionBlockers` | [components.PayrollSubmissionBlockersType](../../models/components/payrollsubmissionblockerstype.md)[] | :heavy_minus_sign: | Only included for processed or calculated payrolls | +| `creditBlockers` | [components.PayrollCreditBlockersType](../../models/components/payrollcreditblockerstype.md)[] | :heavy_minus_sign: | Only included for processed payrolls | +| `processingRequest` | [components.PayrollProcessingRequest](../../models/components/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partnerOwnedDisbursement` | *boolean* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | +| `employeeCompensations` | [components.EmployeeCompensations](../../models/components/employeecompensations.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowbenefits.md b/gusto_embedded/docs/models/components/payrollshowbenefits.md new file mode 100644 index 00000000..b4416059 --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowbenefits.md @@ -0,0 +1,18 @@ +# PayrollShowBenefits + +## Example Usage + +```typescript +import { PayrollShowBenefits } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowBenefits = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `employeeDeduction` | *number* | :heavy_minus_sign: | N/A | +| `companyContribution` | *number* | :heavy_minus_sign: | N/A | +| `imputed` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowfixedcompensations.md b/gusto_embedded/docs/models/components/payrollshowfixedcompensations.md new file mode 100644 index 00000000..c7f0ca5d --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowfixedcompensations.md @@ -0,0 +1,17 @@ +# PayrollShowFixedCompensations + +## Example Usage + +```typescript +import { PayrollShowFixedCompensations } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowFixedCompensations = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `amount` | *string* | :heavy_minus_sign: | The amount of the compensation for the pay period. | +| `jobUuid` | *string* | :heavy_minus_sign: | The UUID of the job for the compensation. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowhourlycompensations.md b/gusto_embedded/docs/models/components/payrollshowhourlycompensations.md new file mode 100644 index 00000000..37dd5bec --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowhourlycompensations.md @@ -0,0 +1,20 @@ +# PayrollShowHourlyCompensations + +## Example Usage + +```typescript +import { PayrollShowHourlyCompensations } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowHourlyCompensations = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `hours` | *string* | :heavy_minus_sign: | The number of hours to be compensated for this pay period. | +| `amount` | *string* | :heavy_minus_sign: | The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations. | +| `jobUuid` | *string* | :heavy_minus_sign: | The UUID of the job for the compensation. | +| `compensationMultiplier` | *number* | :heavy_minus_sign: | The amount multiplied by the base rate to calculate total compensation per hour worked. | +| `flsaStatus` | *string* | :heavy_minus_sign: | The FLSA Status of the employee's primary job compensation | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowpaidtimeoff.md b/gusto_embedded/docs/models/components/payrollshowpaidtimeoff.md new file mode 100644 index 00000000..b02f692e --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowpaidtimeoff.md @@ -0,0 +1,17 @@ +# PayrollShowPaidTimeOff + +## Example Usage + +```typescript +import { PayrollShowPaidTimeOff } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowPaidTimeOff = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the PTO. This also serves as the unique, immutable identifier for the PTO. | +| `hours` | *string* | :heavy_minus_sign: | The hours of this PTO taken during the pay period. | +| `finalPayoutUnusedHoursInput` | *string* | :heavy_minus_sign: | The outstanding hours paid upon termination. This field is only applicable for termination payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowpaymentmethod.md b/gusto_embedded/docs/models/components/payrollshowpaymentmethod.md new file mode 100644 index 00000000..82c83931 --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowpaymentmethod.md @@ -0,0 +1,17 @@ +# PayrollShowPaymentMethod + +The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + +## Example Usage + +```typescript +import { PayrollShowPaymentMethod } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowPaymentMethod = "Direct Deposit"; +``` + +## Values + +```typescript +"Direct Deposit" | "Check" | "Historical" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowtaxes.md b/gusto_embedded/docs/models/components/payrollshowtaxes.md new file mode 100644 index 00000000..b4b65328 --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowtaxes.md @@ -0,0 +1,21 @@ +# PayrollShowTaxes + +## Example Usage + +```typescript +import { PayrollShowTaxes } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowTaxes = { + name: "", + employer: false, + amount: 3866.73, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `employer` | *boolean* | :heavy_check_mark: | N/A | +| `amount` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollupdate.md b/gusto_embedded/docs/models/components/payrollupdate.md index ab21c523..8a23cd6e 100644 --- a/gusto_embedded/docs/models/components/payrollupdate.md +++ b/gusto_embedded/docs/models/components/payrollupdate.md @@ -16,7 +16,7 @@ let value: PayrollUpdate = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employeeCompensations` | [components.EmployeeCompensations](../../models/components/employeecompensations.md)[] | :heavy_check_mark: | N/A | +| `employeeCompensations` | [components.PayrollUpdateEmployeeCompensations](../../models/components/payrollupdateemployeecompensations.md)[] | :heavy_check_mark: | N/A | | `withholdingPayPeriod` | [components.WithholdingPayPeriod](../../models/components/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | | `skipRegularDeductions` | *boolean* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. | | `fixedWithholdingRate` | *boolean* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollupdateemployeecompensations.md b/gusto_embedded/docs/models/components/payrollupdateemployeecompensations.md new file mode 100644 index 00000000..a2d00b4a --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollupdateemployeecompensations.md @@ -0,0 +1,22 @@ +# PayrollUpdateEmployeeCompensations + +## Example Usage + +```typescript +import { PayrollUpdateEmployeeCompensations } from "@gusto/embedded-api/models/components/payrollupdate.js"; + +let value: PayrollUpdateEmployeeCompensations = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employeeUuid` | *string* | :heavy_minus_sign: | The UUID of the employee. | +| `version` | *string* | :heavy_minus_sign: | The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `excluded` | *boolean* | :heavy_minus_sign: | This employee will be excluded from payroll calculation and will not be paid for the payroll. | +| `paymentMethod` | [components.PayrollUpdatePaymentMethod](../../models/components/payrollupdatepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | +| `memo` | *string* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | +| `fixedCompensations` | [components.PayrollUpdateFixedCompensations](../../models/components/payrollupdatefixedcompensations.md)[] | :heavy_minus_sign: | N/A | +| `hourlyCompensations` | [components.PayrollUpdateHourlyCompensations](../../models/components/payrollupdatehourlycompensations.md)[] | :heavy_minus_sign: | N/A | +| `paidTimeOff` | [components.PayrollUpdatePaidTimeOff](../../models/components/payrollupdatepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/taxes.md b/gusto_embedded/docs/models/components/taxes.md index de3436be..97d8affc 100644 --- a/gusto_embedded/docs/models/components/taxes.md +++ b/gusto_embedded/docs/models/components/taxes.md @@ -3,19 +3,14 @@ ## Example Usage ```typescript -import { Taxes } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype.js"; +import { Taxes } from "@gusto/embedded-api/models/components/payrollreceipt.js"; -let value: Taxes = { - name: "", - employer: false, - amount: 4387.49, -}; +let value: Taxes = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `employer` | *boolean* | :heavy_check_mark: | N/A | -| `amount` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The amount paid for this tax. | +| `amount` | *string* | :heavy_minus_sign: | The total amount paid by both employer and employee for this tax. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/taxrefunds.md b/gusto_embedded/docs/models/components/taxrefunds.md index 9e222af0..103c29c6 100644 --- a/gusto_embedded/docs/models/components/taxrefunds.md +++ b/gusto_embedded/docs/models/components/taxrefunds.md @@ -1,9 +1,5 @@ # TaxRefunds -Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid -by Gusto, depending on the value in `reconcile_tax_method`. - - ## Example Usage ```typescript diff --git a/gusto_embedded/docs/models/errors/companysuspensioncreationerrors.md b/gusto_embedded/docs/models/errors/companysuspensioncreationerrors.md new file mode 100644 index 00000000..c816376d --- /dev/null +++ b/gusto_embedded/docs/models/errors/companysuspensioncreationerrors.md @@ -0,0 +1,20 @@ +# CompanySuspensionCreationErrors + +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. + + +## Example Usage + +```typescript +import { CompanySuspensionCreationErrors } from "@gusto/embedded-api/models/errors/companysuspensioncreationerrors.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/accounttype.md b/gusto_embedded/docs/models/operations/accounttype.md index d7604907..3ace6bc8 100644 --- a/gusto_embedded/docs/models/operations/accounttype.md +++ b/gusto_embedded/docs/models/operations/accounttype.md @@ -1,11 +1,9 @@ # AccountType -The bank account type - ## Example Usage ```typescript -import { AccountType } from "@gusto/embedded-api/models/operations/postv1companiescompanyidbankaccounts.js"; +import { AccountType } from "@gusto/embedded-api/models/operations/postv1employeesemployeeidbankaccounts.js"; let value: AccountType = "Savings"; ``` diff --git a/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md new file mode 100644 index 00000000..e1bd6a2c --- /dev/null +++ b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion + +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 { DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; + +let value: + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidrequest.md b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidrequest.md new file mode 100644 index 00000000..37b6a8fc --- /dev/null +++ b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidrequest.md @@ -0,0 +1,20 @@ +# DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest + +## Example Usage + +```typescript +import { DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest } from "@gusto/embedded-api/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; + +let value: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest = { + companyId: "", + bankAccountId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | The UUID of the company | +| `bankAccountId` | *string* | :heavy_check_mark: | The UUID of the company bank account | +| `xGustoAPIVersion` | [operations.DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion](../../models/operations/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.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/deletev1companiescompanyidbankaccountsbankaccountidresponse.md b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidresponse.md new file mode 100644 index 00000000..02b799b0 --- /dev/null +++ b/gusto_embedded/docs/models/operations/deletev1companiescompanyidbankaccountsbankaccountidresponse.md @@ -0,0 +1,15 @@ +# DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse + +## Example Usage + +```typescript +import { DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse } from "@gusto/embedded-api/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; + +let value: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md new file mode 100644 index 00000000..35f8eebc --- /dev/null +++ b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md @@ -0,0 +1,18 @@ +# GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + +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 { GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/getcompaniescompanyuuidsuspensions.js"; + +let value: GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsrequest.md b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsrequest.md index ecf35d2e..6549aac5 100644 --- a/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsrequest.md +++ b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsrequest.md @@ -14,5 +14,5 @@ let value: GetCompaniesCompanyUuidSuspensionsRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyUuid` | *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. | \ No newline at end of file +| `xGustoAPIVersion` | [operations.GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion](../../models/operations/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.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. | +| `companyUuid` | *string* | :heavy_check_mark: | The UUID of the company | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsresponse.md b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsresponse.md index ab3309db..685c610c 100644 --- a/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsresponse.md +++ b/gusto_embedded/docs/models/operations/getcompaniescompanyuuidsuspensionsresponse.md @@ -13,4 +13,4 @@ let value: GetCompaniesCompanyUuidSuspensionsResponse = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `companySuspensionList` | [components.CompanySuspension](../../models/components/companysuspension.md)[] | :heavy_minus_sign: | Example response | \ No newline at end of file +| `companySuspensionList` | [components.CompanySuspension](../../models/components/companysuspension.md)[] | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md new file mode 100644 index 00000000..c17c88d6 --- /dev/null +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md @@ -0,0 +1,18 @@ +# GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + +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 { GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/getv1companiescompanyidbankaccounts.js"; + +let value: GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsrequest.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsrequest.md index 9896b832..c17fc6a1 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsrequest.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsrequest.md @@ -15,4 +15,4 @@ let value: GetV1CompaniesCompanyIdBankAccountsRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | \ No newline at end of file +| `xGustoAPIVersion` | [operations.GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion](../../models/operations/getv1companiescompanyidbankaccountsheaderxgustoapiversion.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/getv1companiescompanyidbankaccountsresponse.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsresponse.md index 98337890..dad562a4 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsresponse.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidbankaccountsresponse.md @@ -13,4 +13,4 @@ let value: GetV1CompaniesCompanyIdBankAccountsResponse = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `companyBankAccountList` | [components.CompanyBankAccount](../../models/components/companybankaccount.md)[] | :heavy_minus_sign: | Example response | \ No newline at end of file +| `companyBankAccounts` | [components.CompanyBankAccount](../../models/components/companybankaccount.md)[] | :heavy_minus_sign: | successful | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md index 960062f9..d66c1145 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md @@ -18,7 +18,9 @@ let value: GetV1CompaniesCompanyIdEmployeesRequest = { | `companyId` | *string* | :heavy_check_mark: | The UUID of the company | | `searchTerm` | *string* | :heavy_minus_sign: | A string to search for in the object's names | | `include` | [operations.Include](../../models/operations/include.md)[] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `terminated` | *boolean* | :heavy_minus_sign: | Filters employees by the provided boolean | +| `onboarded` | *boolean* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `terminated` | *boolean* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | +| `terminatedToday` | *boolean* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | | `uuids` | *string*[] | :heavy_minus_sign: | Optional subset of employees to fetch. | | `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 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md index 8970871e..c081ee63 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md @@ -12,5 +12,5 @@ let value: GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude = ## Values ```typescript -"benefits" | "deductions" | "taxes" | "payroll_status_meta" | "totals" | "risk_blockers" | "reversals" +"benefits" | "deductions" | "taxes" | "payroll_status_meta" | "totals" | "risk_blockers" | "reversals" | "payroll_taxes" ``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidresponse.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidresponse.md index aef9ff24..bd9d2137 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidresponse.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidresponse.md @@ -13,4 +13,4 @@ let value: GetV1CompaniesCompanyIdPayrollsPayrollIdResponse = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `payroll` | [components.Payroll](../../models/components/payroll.md) | :heavy_minus_sign: | successful | \ No newline at end of file +| `payrollShow` | [components.PayrollShow](../../models/components/payrollshow.md) | :heavy_minus_sign: | successful | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollsqueryparaminclude.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollsqueryparaminclude.md index bc820824..4ab5be54 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollsqueryparaminclude.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollsqueryparaminclude.md @@ -5,11 +5,11 @@ ```typescript import { GetV1CompaniesCompanyIdPayrollsQueryParamInclude } from "@gusto/embedded-api/models/operations/getv1companiescompanyidpayrolls.js"; -let value: GetV1CompaniesCompanyIdPayrollsQueryParamInclude = "risk_blockers"; +let value: GetV1CompaniesCompanyIdPayrollsQueryParamInclude = "reversals"; ``` ## Values ```typescript -"benefits" | "deductions" | "taxes" | "payroll_status_meta" | "totals" | "risk_blockers" | "reversals" +"taxes" | "payroll_status_meta" | "totals" | "risk_blockers" | "reversals" ``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md b/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md new file mode 100644 index 00000000..89e3e44a --- /dev/null +++ b/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -0,0 +1,18 @@ +# GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest + +## Example Usage + +```typescript +import { GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest } from "@gusto/embedded-api/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.js"; + +let value: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest = { + companyBenefitId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyBenefitId` | *string* | :heavy_check_mark: | The UUID of the company benefit | +| `xGustoAPIVersion` | [components.VersionHeader](../../models/components/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsresponse.md b/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsresponse.md new file mode 100644 index 00000000..035fe652 --- /dev/null +++ b/gusto_embedded/docs/models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsresponse.md @@ -0,0 +1,17 @@ +# GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + +## Example Usage + +```typescript +import { GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse } from "@gusto/embedded-api/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.js"; + +let value: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse = + {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `contributionExclusionList` | [components.ContributionExclusion](../../models/components/contributionexclusion.md)[] | :heavy_minus_sign: | Example 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 410a5ccf..2ba62318 100644 --- a/gusto_embedded/docs/models/operations/leavingfor.md +++ b/gusto_embedded/docs/models/operations/leavingfor.md @@ -1,6 +1,10 @@ # LeavingFor -Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. +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. + ## Example Usage @@ -13,5 +17,5 @@ let value: LeavingFor = "rippling"; ## Values ```typescript -"apd" | "adp_total_source" | "accountant" | "bamboo_hr" | "bank_or_financial_institution" | "check" | "insperity" | "intuit_or_quickbooks" | "justworks" | "manual" | "namely" | "onpay" | "other" | "patriot" | "paycom" | "paylocity" | "rippling" | "square" | "surepayroll" | "trinet" | "zenefits" +"accountant" | "adp" | "adp_total_source" | "bamboo_hr" | "bank_or_financial_institution" | "check" | "gusto_com" | "homebase" | "insperity" | "intuit_or_quickbooks" | "justworks" | "manual" | "namely" | "onpay" | "other" | "patriot" | "paychex" | "paycom" | "paylocity" | "rippling" | "square" | "surepayroll" | "trinet" | "zenefits" ``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md new file mode 100644 index 00000000..35ac85d3 --- /dev/null +++ b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md @@ -0,0 +1,18 @@ +# PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + +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 { PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/postcompaniescompanyuuidsuspensions.js"; + +let value: PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequest.md b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequest.md index 330d0204..7f9a58c4 100644 --- a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequest.md +++ b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequest.md @@ -20,6 +20,6 @@ let value: PostCompaniesCompanyUuidSuspensionsRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xGustoAPIVersion` | [operations.PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion](../../models/operations/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.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. | | `companyUuid` | *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.PostCompaniesCompanyUuidSuspensionsRequestBody](../../models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md index 81bdd508..d3438b07 100644 --- a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md +++ b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md @@ -15,11 +15,11 @@ let value: PostCompaniesCompanyUuidSuspensionsRequestBody = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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. | -| `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: | Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `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 diff --git a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsresponse.md b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsresponse.md index eb6ec3d9..834e78bb 100644 --- a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsresponse.md +++ b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsresponse.md @@ -13,4 +13,4 @@ let value: PostCompaniesCompanyUuidSuspensionsResponse = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `companySuspension` | [components.CompanySuspension](../../models/components/companysuspension.md) | :heavy_minus_sign: | Example response | \ No newline at end of file +| `companySuspension` | [components.CompanySuspension](../../models/components/companysuspension.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md new file mode 100644 index 00000000..c5d9dd02 --- /dev/null +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md @@ -0,0 +1,18 @@ +# PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + +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 { PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/postv1companiescompanyidbankaccounts.js"; + +let value: PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequest.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequest.md index 1a1ef53b..da6e445d 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequest.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequest.md @@ -7,7 +7,11 @@ import { PostV1CompaniesCompanyIdBankAccountsRequest } from "@gusto/embedded-api let value: PostV1CompaniesCompanyIdBankAccountsRequest = { companyId: "", - requestBody: {}, + companyBankAccountRequest: { + routingNumber: "", + accountNumber: "", + accountType: "Checking", + }, }; ``` @@ -16,5 +20,5 @@ let value: PostV1CompaniesCompanyIdBankAccountsRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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.PostV1CompaniesCompanyIdBankAccountsRequestBody](../../models/operations/postv1companiescompanyidbankaccountsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `xGustoAPIVersion` | [operations.PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion](../../models/operations/postv1companiescompanyidbankaccountsheaderxgustoapiversion.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. | +| `companyBankAccountRequest` | [components.CompanyBankAccountRequest](../../models/components/companybankaccountrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequestbody.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequestbody.md deleted file mode 100644 index 5d2f821a..00000000 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsrequestbody.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1CompaniesCompanyIdBankAccountsRequestBody - -## Example Usage - -```typescript -import { PostV1CompaniesCompanyIdBankAccountsRequestBody } from "@gusto/embedded-api/models/operations/postv1companiescompanyidbankaccounts.js"; - -let value: PostV1CompaniesCompanyIdBankAccountsRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `routingNumber` | *string* | :heavy_minus_sign: | The bank routing number | -| `accountNumber` | *string* | :heavy_minus_sign: | The bank account number | -| `accountType` | [operations.AccountType](../../models/operations/accounttype.md) | :heavy_minus_sign: | The bank account type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsresponse.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsresponse.md index f7081d14..52ea8795 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsresponse.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidbankaccountsresponse.md @@ -13,4 +13,4 @@ let value: PostV1CompaniesCompanyIdBankAccountsResponse = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `companyBankAccount` | [components.CompanyBankAccount](../../models/components/companybankaccount.md) | :heavy_minus_sign: | Example response | \ No newline at end of file +| `companyBankAccount` | [components.CompanyBankAccount](../../models/components/companybankaccount.md) | :heavy_minus_sign: | created | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsaccounttype.md b/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsaccounttype.md deleted file mode 100644 index afa4bac5..00000000 --- a/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsaccounttype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostV1EmployeesEmployeeIdBankAccountsAccountType - -## Example Usage - -```typescript -import { PostV1EmployeesEmployeeIdBankAccountsAccountType } from "@gusto/embedded-api/models/operations/postv1employeesemployeeidbankaccounts.js"; - -let value: PostV1EmployeesEmployeeIdBankAccountsAccountType = "Savings"; -``` - -## Values - -```typescript -"Checking" | "Savings" -``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsrequestbody.md b/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsrequestbody.md index 1b7e3b07..f9c565dd 100644 --- a/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsrequestbody.md +++ b/gusto_embedded/docs/models/operations/postv1employeesemployeeidbankaccountsrequestbody.md @@ -15,9 +15,9 @@ let value: PostV1EmployeesEmployeeIdBankAccountsRequestBody = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `routingNumber` | *string* | :heavy_check_mark: | N/A | -| `accountNumber` | *string* | :heavy_check_mark: | N/A | -| `accountType` | [operations.PostV1EmployeesEmployeeIdBankAccountsAccountType](../../models/operations/postv1employeesemployeeidbankaccountsaccounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `routingNumber` | *string* | :heavy_check_mark: | N/A | +| `accountNumber` | *string* | :heavy_check_mark: | N/A | +| `accountType` | [operations.AccountType](../../models/operations/accounttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md new file mode 100644 index 00000000..9f973fe9 --- /dev/null +++ b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -0,0 +1,22 @@ +# PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest + +## Example Usage + +```typescript +import { PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest } from "@gusto/embedded-api/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; + +let value: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest = { + companyBenefitId: "", + requestBody: { + contributionExclusions: [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyBenefitId` | *string* | :heavy_check_mark: | The UUID of the company benefit | +| `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.PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody](../../models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md new file mode 100644 index 00000000..4397dc77 --- /dev/null +++ b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md @@ -0,0 +1,24 @@ +# PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody + +## Example Usage + +```typescript +import { PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody } from "@gusto/embedded-api/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; + +let value: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody = { + contributionExclusions: [ + { + contributionUuid: "", + contributionType: "", + excluded: false, + }, + ], + }; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `contributionExclusions` | [components.ContributionExclusion](../../models/components/contributionexclusion.md)[] | :heavy_check_mark: | The list of contribution exclusions to update | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsresponse.md b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsresponse.md new file mode 100644 index 00000000..4df91b4f --- /dev/null +++ b/gusto_embedded/docs/models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsresponse.md @@ -0,0 +1,17 @@ +# PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + +## Example Usage + +```typescript +import { PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse } from "@gusto/embedded-api/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; + +let value: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse = + {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `contributionExclusionList` | [components.ContributionExclusion](../../models/components/contributionexclusion.md)[] | :heavy_minus_sign: | Example response | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/reason.md b/gusto_embedded/docs/models/operations/reason.md index 3a4437e3..e62c8c65 100644 --- a/gusto_embedded/docs/models/operations/reason.md +++ b/gusto_embedded/docs/models/operations/reason.md @@ -3,9 +3,9 @@ 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. + ## Example Usage ```typescript diff --git a/gusto_embedded/docs/sdks/achtransactions/README.md b/gusto_embedded/docs/sdks/achtransactions/README.md index d48fd411..e691a7e4 100644 --- a/gusto_embedded/docs/sdks/achtransactions/README.md +++ b/gusto_embedded/docs/sdks/achtransactions/README.md @@ -15,6 +15,7 @@ scope: `ach_transactions:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/bankaccounts/README.md b/gusto_embedded/docs/sdks/bankaccounts/README.md index a6304cc3..be064991 100644 --- a/gusto_embedded/docs/sdks/bankaccounts/README.md +++ b/gusto_embedded/docs/sdks/bankaccounts/README.md @@ -5,28 +5,22 @@ ### Available Operations -* [create](#create) - Create a company bank account * [get](#get) - Get all company bank accounts +* [create](#create) - Create a company bank account * [verify](#verify) - Verify a company bank account * [createFromPlaidToken](#createfromplaidtoken) - Create a bank account from a plaid processor token +* [deleteV1CompaniesCompanyIdBankAccountsBankAccountId](#deletev1companiescompanyidbankaccountsbankaccountid) - Delete a company bank account -## create - -This endpoint creates a new company bank account. - -Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. +## get -When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. -After successful verification, the bank account's verification_status is 'verified'. +Returns company bank accounts. Currently, we only support a single default bank account per company. -scope: `company_bank_accounts:write` +scope: `company_bank_accounts:read` -> 🚧 Warning -> -> If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -35,13 +29,8 @@ const gustoEmbedded = new GustoEmbedded({ }); async function run() { - const result = await gustoEmbedded.bankAccounts.create({ + const result = await gustoEmbedded.bankAccounts.get({ companyId: "", - requestBody: { - routingNumber: "115092013", - accountNumber: "9775014007", - accountType: "Checking", - }, }); console.log(result); @@ -56,7 +45,7 @@ The standalone function version of this method: ```typescript import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; -import { bankAccountsCreate } from "@gusto/embedded-api/funcs/bankAccountsCreate.js"; +import { bankAccountsGet } from "@gusto/embedded-api/funcs/bankAccountsGet.js"; // Use `GustoEmbeddedCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -65,19 +54,14 @@ const gustoEmbedded = new GustoEmbeddedCore({ }); async function run() { - const res = await bankAccountsCreate(gustoEmbedded, { + const res = await bankAccountsGet(gustoEmbedded, { companyId: "", - requestBody: { - routingNumber: "115092013", - accountNumber: "9775014007", - accountType: "Checking", - }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("bankAccountsCreate failed:", res.error); + console.log("bankAccountsGet failed:", res.error); } } @@ -96,39 +80,61 @@ associated utilities. ```tsx import { - // Mutation hook for triggering the API call. - useBankAccountsCreateMutation -} from "@gusto/embedded-api/react-query/bankAccountsCreate.js"; + // Query hooks for fetching data. + useBankAccountsGet, + useBankAccountsGetSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchBankAccountsGet, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateBankAccountsGet, + invalidateAllBankAccountsGet, +} from "@gusto/embedded-api/react-query/bankAccountsGet.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PostV1CompaniesCompanyIdBankAccountsRequest](../../models/operations/postv1companiescompanyidbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetV1CompaniesCompanyIdBankAccountsRequest](../../models/operations/getv1companiescompanyidbankaccountsrequest.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.PostV1CompaniesCompanyIdBankAccountsResponse](../../models/operations/postv1companiescompanyidbankaccountsresponse.md)\>** +**Promise\<[operations.GetV1CompaniesCompanyIdBankAccountsResponse](../../models/operations/getv1companiescompanyidbankaccountsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UnprocessableEntityErrorObject | 422 | application/json | +| errors.UnprocessableEntityErrorObject | 404 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | -## get +## create -Returns company bank accounts. Currently, we only support a single default bank account per company. +This endpoint creates a new company bank account. + +Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + +When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. +After successful verification, the bank account's verification_status is 'verified'. + +scope: `company_bank_accounts:write` + +>🚧 Warning +> +> If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. -scope: `company_bank_accounts:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -137,8 +143,13 @@ const gustoEmbedded = new GustoEmbedded({ }); async function run() { - const result = await gustoEmbedded.bankAccounts.get({ + const result = await gustoEmbedded.bankAccounts.create({ companyId: "", + companyBankAccountRequest: { + routingNumber: "115092013", + accountNumber: "9775014007", + accountType: "Checking", + }, }); console.log(result); @@ -153,7 +164,7 @@ The standalone function version of this method: ```typescript import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; -import { bankAccountsGet } from "@gusto/embedded-api/funcs/bankAccountsGet.js"; +import { bankAccountsCreate } from "@gusto/embedded-api/funcs/bankAccountsCreate.js"; // Use `GustoEmbeddedCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -162,14 +173,19 @@ const gustoEmbedded = new GustoEmbeddedCore({ }); async function run() { - const res = await bankAccountsGet(gustoEmbedded, { + const res = await bankAccountsCreate(gustoEmbedded, { companyId: "", + companyBankAccountRequest: { + routingNumber: "115092013", + accountNumber: "9775014007", + accountType: "Checking", + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("bankAccountsGet failed:", res.error); + console.log("bankAccountsCreate failed:", res.error); } } @@ -188,40 +204,30 @@ associated utilities. ```tsx import { - // Query hooks for fetching data. - useBankAccountsGet, - useBankAccountsGetSuspense, - - // Utility for prefetching data during server-side rendering and in React - // Server Components that will be immediately available to client components - // using the hooks. - prefetchBankAccountsGet, - - // Utilities to invalidate the query cache for this query in response to - // mutations and other user actions. - invalidateBankAccountsGet, - invalidateAllBankAccountsGet, -} from "@gusto/embedded-api/react-query/bankAccountsGet.js"; + // Mutation hook for triggering the API call. + useBankAccountsCreateMutation +} from "@gusto/embedded-api/react-query/bankAccountsCreate.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetV1CompaniesCompanyIdBankAccountsRequest](../../models/operations/getv1companiescompanyidbankaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.PostV1CompaniesCompanyIdBankAccountsRequest](../../models/operations/postv1companiescompanyidbankaccountsrequest.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.GetV1CompaniesCompanyIdBankAccountsResponse](../../models/operations/getv1companiescompanyidbankaccountsresponse.md)\>** +**Promise\<[operations.PostV1CompaniesCompanyIdBankAccountsResponse](../../models/operations/postv1companiescompanyidbankaccountsresponse.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 | \*/\* | ## verify @@ -244,6 +250,7 @@ scope: `company_bank_accounts:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -353,6 +360,7 @@ scope: `plaid_processor:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -443,4 +451,102 @@ import { | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | errors.UnprocessableEntityErrorObject | 422 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteV1CompaniesCompanyIdBankAccountsBankAccountId + +This endpoint disables a company bank account. + +A bank account cannot be disabled if it is used for any unprocessed payments. + +scope: `company_bank_accounts:write` + + +### Example Usage + + +```typescript +import { GustoEmbedded } from "@gusto/embedded-api"; + +const gustoEmbedded = new GustoEmbedded({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const result = await gustoEmbedded.bankAccounts.deleteV1CompaniesCompanyIdBankAccountsBankAccountId({ + companyId: "", + bankAccountId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; +import { bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId } from "@gusto/embedded-api/funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.js"; + +// Use `GustoEmbeddedCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const gustoEmbedded = new GustoEmbeddedCore({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const res = await bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId(gustoEmbedded, { + companyId: "", + bankAccountId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutation +} from "@gusto/embedded-api/react-query/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest](../../models/operations/deletev1companiescompanyidbankaccountsbankaccountidrequest.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.DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse](../../models/operations/deletev1companiescompanyidbankaccountsbankaccountidresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UnprocessableEntityErrorObject | 404, 422 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/companies/README.md b/gusto_embedded/docs/sdks/companies/README.md index bd758c90..88192c5f 100644 --- a/gusto_embedded/docs/sdks/companies/README.md +++ b/gusto_embedded/docs/sdks/companies/README.md @@ -34,6 +34,7 @@ IMPORTANT: the returned access and refresh tokens are reserved for this company ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -156,6 +157,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -258,6 +260,7 @@ scope: `companies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -358,6 +361,7 @@ scope: `partner_managed_companies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -461,6 +465,7 @@ scope: `terms_of_services:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -563,6 +568,7 @@ scope: `terms_of_services:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -662,6 +668,7 @@ scope: `company_admin:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -764,6 +771,7 @@ scope: `company_admin:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -867,6 +875,7 @@ scope: `company_onboarding_status:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -983,6 +992,7 @@ scope: `companies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1075,6 +1085,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/companyattachment/README.md b/gusto_embedded/docs/sdks/companyattachment/README.md index 090cd1d7..0632fb5c 100644 --- a/gusto_embedded/docs/sdks/companyattachment/README.md +++ b/gusto_embedded/docs/sdks/companyattachment/README.md @@ -16,6 +16,7 @@ scope: `company_attachments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/companyattachments/README.md b/gusto_embedded/docs/sdks/companyattachments/README.md index 6465d2be..a1079c60 100644 --- a/gusto_embedded/docs/sdks/companyattachments/README.md +++ b/gusto_embedded/docs/sdks/companyattachments/README.md @@ -17,6 +17,7 @@ scope: `company_attachments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -121,6 +122,7 @@ scope: `company_attachments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -225,6 +227,7 @@ scope: `company_attachments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { openAsBlob } from "node:fs"; diff --git a/gusto_embedded/docs/sdks/companybenefits/README.md b/gusto_embedded/docs/sdks/companybenefits/README.md index 8dc655c6..3a2cbc88 100644 --- a/gusto_embedded/docs/sdks/companybenefits/README.md +++ b/gusto_embedded/docs/sdks/companybenefits/README.md @@ -16,6 +16,8 @@ * [getEmployeeBenefits](#getemployeebenefits) - Get all employee benefits for a company benefit * [updateEmployeeBenefits](#updateemployeebenefits) - Bulk update employee benefits for a company benefit * [getRequirements](#getrequirements) - Get benefit fields requirements by ID +* [getV1CompanyBenefitsCompanyBenefitIdContributionExclusions](#getv1companybenefitscompanybenefitidcontributionexclusions) - Get contribution exclusions for a company benefit +* [putV1CompanyBenefitsCompanyBenefitIdContributionExclusions](#putv1companybenefitscompanybenefitidcontributionexclusions) - Update contribution exclusions for a company benefit ## create @@ -27,6 +29,7 @@ scope: `company_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -129,6 +132,7 @@ scope: `company_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -235,6 +239,7 @@ scope: `company_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -339,6 +344,7 @@ scope: `company_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -442,6 +448,7 @@ scope: `company_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -536,6 +543,7 @@ scope: `benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -636,6 +644,7 @@ scope: `benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -740,6 +749,7 @@ scope: `company_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -850,6 +860,7 @@ scope: `employee_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -956,6 +967,7 @@ scope: `employee_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1066,6 +1078,7 @@ scope: `benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1158,4 +1171,242 @@ import { | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.APIError | 4XX, 5XX | \*/\* | + +## getV1CompanyBenefitsCompanyBenefitIdContributionExclusions + +Returns all contributions for a given company benefit and whether they are excluded or not. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:read` + +### Example Usage + + +```typescript +import { GustoEmbedded } from "@gusto/embedded-api"; + +const gustoEmbedded = new GustoEmbedded({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const result = await gustoEmbedded.companyBenefits.getV1CompanyBenefitsCompanyBenefitIdContributionExclusions({ + companyBenefitId: "", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; +import { companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "@gusto/embedded-api/funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; + +// Use `GustoEmbeddedCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const gustoEmbedded = new GustoEmbeddedCore({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const res = await companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions(gustoEmbedded, { + companyBenefitId: "", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions, + useCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions, + invalidateAllCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions, +} from "@gusto/embedded-api/react-query/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest](../../models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.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.GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse](../../models/operations/getv1companybenefitscompanybenefitidcontributionexclusionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putV1CompanyBenefitsCompanyBenefitIdContributionExclusions + +Updates contribution exclusions for a given company benefit. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:write` + +### Example Usage + + +```typescript +import { GustoEmbedded } from "@gusto/embedded-api"; + +const gustoEmbedded = new GustoEmbedded({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const result = await gustoEmbedded.companyBenefits.putV1CompanyBenefitsCompanyBenefitIdContributionExclusions({ + companyBenefitId: "", + requestBody: { + contributionExclusions: [ + { + contributionUuid: "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Bonus", + excluded: true, + }, + { + contributionUuid: "082e034c-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Commission", + excluded: false, + }, + { + contributionUuid: "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Regular", + excluded: true, + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; +import { companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "@gusto/embedded-api/funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; + +// Use `GustoEmbeddedCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const gustoEmbedded = new GustoEmbeddedCore({ + companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", +}); + +async function run() { + const res = await companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions(gustoEmbedded, { + companyBenefitId: "", + requestBody: { + contributionExclusions: [ + { + contributionUuid: "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Bonus", + excluded: true, + }, + { + contributionUuid: "082e034c-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Commission", + excluded: false, + }, + { + contributionUuid: "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", + contributionType: "Regular", + excluded: true, + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutation +} from "@gusto/embedded-api/react-query/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest](../../models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.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.PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse](../../models/operations/putv1companybenefitscompanybenefitidcontributionexclusionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UnprocessableEntityErrorObject | 422 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/companyforms/README.md b/gusto_embedded/docs/sdks/companyforms/README.md index 4fd3b231..4bbbfd54 100644 --- a/gusto_embedded/docs/sdks/companyforms/README.md +++ b/gusto_embedded/docs/sdks/companyforms/README.md @@ -18,6 +18,7 @@ scope: `company_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -120,6 +121,7 @@ scope: `company_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -222,6 +224,7 @@ scope: `company_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -324,6 +327,7 @@ scope: `company_forms:sign` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractordocuments/README.md b/gusto_embedded/docs/sdks/contractordocuments/README.md index 1213e5ae..a800148d 100644 --- a/gusto_embedded/docs/sdks/contractordocuments/README.md +++ b/gusto_embedded/docs/sdks/contractordocuments/README.md @@ -18,6 +18,7 @@ scope: `contractor_documents:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -120,6 +121,7 @@ scope: `contractor_documents:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -222,6 +224,7 @@ scope: `contractor_documents:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -324,6 +327,7 @@ scope: `contractor_documents:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractorforms/README.md b/gusto_embedded/docs/sdks/contractorforms/README.md index 2d1280df..7e089a29 100644 --- a/gusto_embedded/docs/sdks/contractorforms/README.md +++ b/gusto_embedded/docs/sdks/contractorforms/README.md @@ -18,6 +18,7 @@ scope: `contractor_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -120,6 +121,7 @@ scope: `contractor_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -224,6 +226,7 @@ scope: `contractor_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -332,6 +335,7 @@ scope: `contractors:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md index 3f14a178..c3f3198c 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md @@ -22,6 +22,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -140,6 +141,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -246,6 +248,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -364,6 +367,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -466,6 +470,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -562,6 +567,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -655,6 +661,7 @@ scope: `partner_disbursements:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -759,6 +766,7 @@ scope: `partner_disbursements:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractorpaymentmethod/README.md b/gusto_embedded/docs/sdks/contractorpaymentmethod/README.md index a0428730..099ac5b2 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentmethod/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentmethod/README.md @@ -17,6 +17,7 @@ scope: `contractor_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -121,6 +122,7 @@ scope: `contractor_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -224,6 +226,7 @@ scope: `contractor_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md b/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md index 3afaaf24..94ffffe3 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md @@ -17,6 +17,7 @@ scope: `contractor_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractorpayments/README.md b/gusto_embedded/docs/sdks/contractorpayments/README.md index b822c3f7..271cbf66 100644 --- a/gusto_embedded/docs/sdks/contractorpayments/README.md +++ b/gusto_embedded/docs/sdks/contractorpayments/README.md @@ -27,6 +27,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -133,6 +134,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -225,6 +227,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -335,6 +338,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -440,6 +444,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -544,6 +549,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/contractors/README.md b/gusto_embedded/docs/sdks/contractors/README.md index d88511cd..b3d1f901 100644 --- a/gusto_embedded/docs/sdks/contractors/README.md +++ b/gusto_embedded/docs/sdks/contractors/README.md @@ -24,6 +24,7 @@ scope: `contractors:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -134,6 +135,7 @@ scope: `contractors:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -236,6 +238,7 @@ scope: `contractors:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -342,6 +345,7 @@ scope: `contractors:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -454,6 +458,7 @@ scope: `contractors:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -576,6 +581,7 @@ scope: `contractors:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -688,6 +694,7 @@ Below is a list of valid onboarding status changes depending on the intended act ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -782,6 +789,7 @@ scope: `contractors:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -884,6 +892,7 @@ scope: `contractors:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -999,6 +1008,7 @@ scope: `contractor_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/departments/README.md b/gusto_embedded/docs/sdks/departments/README.md index c0d7f423..e6d07acb 100644 --- a/gusto_embedded/docs/sdks/departments/README.md +++ b/gusto_embedded/docs/sdks/departments/README.md @@ -21,6 +21,7 @@ scope: `departments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -119,6 +120,7 @@ scope: `departments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -222,6 +224,7 @@ scope: `departments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -324,6 +327,7 @@ scope: `departments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -425,6 +429,7 @@ scope: `departments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -518,6 +523,7 @@ scope: `departments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -612,6 +618,7 @@ scope: `departments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/earningtypes/README.md b/gusto_embedded/docs/sdks/earningtypes/README.md index 92e13549..3ca16106 100644 --- a/gusto_embedded/docs/sdks/earningtypes/README.md +++ b/gusto_embedded/docs/sdks/earningtypes/README.md @@ -20,6 +20,7 @@ scope: `payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -124,6 +125,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -226,6 +228,7 @@ scope: `payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -326,6 +329,7 @@ scope: `payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeeaddresses/README.md b/gusto_embedded/docs/sdks/employeeaddresses/README.md index bb20bb9a..dbf5e656 100644 --- a/gusto_embedded/docs/sdks/employeeaddresses/README.md +++ b/gusto_embedded/docs/sdks/employeeaddresses/README.md @@ -27,6 +27,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -133,6 +134,7 @@ scope: `employees:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -248,6 +250,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -354,6 +357,7 @@ scope: `employees:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -469,6 +473,7 @@ scope: `employees:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -562,6 +567,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -666,6 +672,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -769,6 +776,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -873,6 +881,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -974,6 +983,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeebenefits/README.md b/gusto_embedded/docs/sdks/employeebenefits/README.md index a41ff2a2..1ff08e22 100644 --- a/gusto_embedded/docs/sdks/employeebenefits/README.md +++ b/gusto_embedded/docs/sdks/employeebenefits/README.md @@ -21,6 +21,7 @@ scope: `employee_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -133,6 +134,7 @@ scope: `employee_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -237,6 +239,7 @@ scope: `employee_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -339,6 +342,7 @@ scope: `employee_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -439,6 +443,7 @@ scope: `employee_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -533,6 +538,7 @@ scope: `employee_benefits:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -639,6 +645,7 @@ scope: `employee_benefits:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeeemployments/README.md b/gusto_embedded/docs/sdks/employeeemployments/README.md index e6b835c1..ce6d1898 100644 --- a/gusto_embedded/docs/sdks/employeeemployments/README.md +++ b/gusto_embedded/docs/sdks/employeeemployments/README.md @@ -25,6 +25,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -127,6 +128,7 @@ scope: `employments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -229,6 +231,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -323,6 +326,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -425,6 +429,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -527,6 +532,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -631,6 +637,7 @@ scope: `employments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -734,6 +741,7 @@ scope: `employments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -827,6 +835,7 @@ scope: `employments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeeforms/README.md b/gusto_embedded/docs/sdks/employeeforms/README.md index 68d2f6b4..32dac91e 100644 --- a/gusto_embedded/docs/sdks/employeeforms/README.md +++ b/gusto_embedded/docs/sdks/employeeforms/README.md @@ -23,6 +23,7 @@ scope: `employees:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -119,6 +120,7 @@ scope: `employee_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -221,6 +223,7 @@ scope: `employee_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -325,6 +328,7 @@ scope: `employee_forms:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -432,6 +436,7 @@ scope: `employee_forms:sign` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeepaymentmethod/README.md b/gusto_embedded/docs/sdks/employeepaymentmethod/README.md index cc3f9099..9e0f235f 100644 --- a/gusto_embedded/docs/sdks/employeepaymentmethod/README.md +++ b/gusto_embedded/docs/sdks/employeepaymentmethod/README.md @@ -21,6 +21,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -126,6 +127,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -219,6 +221,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -327,6 +330,7 @@ scope: `employee_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -430,6 +434,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeepaymentmethods/README.md b/gusto_embedded/docs/sdks/employeepaymentmethods/README.md index 98d14ace..ac46c1aa 100644 --- a/gusto_embedded/docs/sdks/employeepaymentmethods/README.md +++ b/gusto_embedded/docs/sdks/employeepaymentmethods/README.md @@ -15,6 +15,7 @@ scope: `employee_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employees/README.md b/gusto_embedded/docs/sdks/employees/README.md index 9d99092e..fd19cb07 100644 --- a/gusto_embedded/docs/sdks/employees/README.md +++ b/gusto_embedded/docs/sdks/employees/README.md @@ -27,6 +27,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -131,6 +132,7 @@ import { ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -238,6 +240,7 @@ Base scope: `employee_payment_methods:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -340,6 +343,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -491,6 +495,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -595,6 +600,7 @@ scope: `employees:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -710,6 +716,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -801,6 +808,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -903,6 +911,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1037,6 +1046,7 @@ scope: `employees:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1150,6 +1160,7 @@ import { ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1248,6 +1259,7 @@ scope: `employee_time_off_activities:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/employeetaxsetup/README.md b/gusto_embedded/docs/sdks/employeetaxsetup/README.md index 42b1b414..fc4e511a 100644 --- a/gusto_embedded/docs/sdks/employeetaxsetup/README.md +++ b/gusto_embedded/docs/sdks/employeetaxsetup/README.md @@ -18,6 +18,7 @@ Get attributes relevant for an employee's federal taxes. ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -120,6 +121,7 @@ scope: `employee_federal_taxes:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -244,6 +246,7 @@ scope: `employee_state_taxes:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -350,6 +353,7 @@ scope: `employee_state_taxes:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/events/README.md b/gusto_embedded/docs/sdks/events/README.md index 67c25244..04aa7edb 100644 --- a/gusto_embedded/docs/sdks/events/README.md +++ b/gusto_embedded/docs/sdks/events/README.md @@ -19,6 +19,7 @@ scope: `events:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/externalpayrolls/README.md b/gusto_embedded/docs/sdks/externalpayrolls/README.md index 0aaa95a8..a721671c 100644 --- a/gusto_embedded/docs/sdks/externalpayrolls/README.md +++ b/gusto_embedded/docs/sdks/externalpayrolls/README.md @@ -23,6 +23,7 @@ scope: `external_payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -125,6 +126,7 @@ scope: `external_payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -227,6 +229,7 @@ scope: `external_payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -331,6 +334,7 @@ scope: `external_payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -424,6 +428,7 @@ scope: `external_payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -608,6 +613,7 @@ scope: `external_payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -712,6 +718,7 @@ scope: `external_payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -814,6 +821,7 @@ scope: `external_payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -944,6 +952,7 @@ scope: `external_payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/federaltaxdetails/README.md b/gusto_embedded/docs/sdks/federaltaxdetails/README.md index f3bb3f7e..ebd4ea05 100644 --- a/gusto_embedded/docs/sdks/federaltaxdetails/README.md +++ b/gusto_embedded/docs/sdks/federaltaxdetails/README.md @@ -16,6 +16,7 @@ scope: `company_federal_taxes:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -119,6 +120,7 @@ scope: `company_federal_taxes:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/flows/README.md b/gusto_embedded/docs/sdks/flows/README.md index 3262cfe9..5b1e2a6a 100644 --- a/gusto_embedded/docs/sdks/flows/README.md +++ b/gusto_embedded/docs/sdks/flows/README.md @@ -15,6 +15,7 @@ scope: `flows:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/garnishments/README.md b/gusto_embedded/docs/sdks/garnishments/README.md index b0e645b9..2976139d 100644 --- a/gusto_embedded/docs/sdks/garnishments/README.md +++ b/gusto_embedded/docs/sdks/garnishments/README.md @@ -19,6 +19,7 @@ scope: `garnishments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -123,6 +124,7 @@ scope: `garnishments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -225,6 +227,7 @@ scope: `garnishments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -327,6 +330,7 @@ scope: `garnishments:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -427,6 +431,7 @@ scope: `garnishments:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/generateddocuments/README.md b/gusto_embedded/docs/sdks/generateddocuments/README.md index de8e932d..8b3851d6 100644 --- a/gusto_embedded/docs/sdks/generateddocuments/README.md +++ b/gusto_embedded/docs/sdks/generateddocuments/README.md @@ -15,6 +15,7 @@ scope: `generated_documents:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/historicalemployees/README.md b/gusto_embedded/docs/sdks/historicalemployees/README.md index 100b29d5..0e3c58c5 100644 --- a/gusto_embedded/docs/sdks/historicalemployees/README.md +++ b/gusto_embedded/docs/sdks/historicalemployees/README.md @@ -15,6 +15,7 @@ scope: `employees:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; diff --git a/gusto_embedded/docs/sdks/holidaypaypolicies/README.md b/gusto_embedded/docs/sdks/holidaypaypolicies/README.md index 5f72fdc6..cbffdf9d 100644 --- a/gusto_embedded/docs/sdks/holidaypaypolicies/README.md +++ b/gusto_embedded/docs/sdks/holidaypaypolicies/README.md @@ -20,6 +20,7 @@ scope: `holiday_pay_policies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -122,6 +123,7 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -258,6 +260,7 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -396,6 +399,7 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -488,6 +492,7 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -602,6 +607,7 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/i9verification/README.md b/gusto_embedded/docs/sdks/i9verification/README.md index b9d29b32..32b9adb2 100644 --- a/gusto_embedded/docs/sdks/i9verification/README.md +++ b/gusto_embedded/docs/sdks/i9verification/README.md @@ -23,6 +23,7 @@ scope: `i9_authorizations:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -143,6 +144,7 @@ scope: `i9_authorizations:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -243,6 +245,7 @@ scope: `i9_authorizations:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -345,6 +348,7 @@ scope: `i9_authorizations:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -454,6 +458,7 @@ scope: `i9_authorizations:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -568,6 +573,7 @@ scope: `i9_authorizations:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -661,6 +667,7 @@ scope: `i9_authorizations:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/industryselection/README.md b/gusto_embedded/docs/sdks/industryselection/README.md index ffe8715e..7d58c327 100644 --- a/gusto_embedded/docs/sdks/industryselection/README.md +++ b/gusto_embedded/docs/sdks/industryselection/README.md @@ -16,6 +16,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -118,6 +119,7 @@ scope: `companies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/informationrequests/README.md b/gusto_embedded/docs/sdks/informationrequests/README.md index 059940aa..27cde838 100644 --- a/gusto_embedded/docs/sdks/informationrequests/README.md +++ b/gusto_embedded/docs/sdks/informationrequests/README.md @@ -15,6 +15,7 @@ scope: `information_requests:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/introspection/README.md b/gusto_embedded/docs/sdks/introspection/README.md index 52fb8b0c..087da746 100644 --- a/gusto_embedded/docs/sdks/introspection/README.md +++ b/gusto_embedded/docs/sdks/introspection/README.md @@ -14,6 +14,7 @@ Returns scope and resource information associated with the current access token. ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -114,6 +115,7 @@ The `expires_in` value is provided in seconds from when the `access_token` was g ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/invoices/README.md b/gusto_embedded/docs/sdks/invoices/README.md index 12da4f6d..0f1842a7 100644 --- a/gusto_embedded/docs/sdks/invoices/README.md +++ b/gusto_embedded/docs/sdks/invoices/README.md @@ -19,6 +19,7 @@ scope: `invoices:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/jobsandcompensations/README.md b/gusto_embedded/docs/sdks/jobsandcompensations/README.md index 22e0a5cb..c2af15f2 100644 --- a/gusto_embedded/docs/sdks/jobsandcompensations/README.md +++ b/gusto_embedded/docs/sdks/jobsandcompensations/README.md @@ -24,6 +24,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -124,6 +125,7 @@ scope: `jobs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -226,6 +228,7 @@ scope: `jobs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -328,6 +331,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -430,6 +434,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -525,6 +530,7 @@ scope: `jobs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -627,6 +633,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -730,6 +737,7 @@ scope: `jobs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -832,6 +840,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -937,6 +946,7 @@ scope: `jobs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/locations/README.md b/gusto_embedded/docs/sdks/locations/README.md index 187a37bc..0edd2526 100644 --- a/gusto_embedded/docs/sdks/locations/README.md +++ b/gusto_embedded/docs/sdks/locations/README.md @@ -21,6 +21,7 @@ scope: `companies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -131,6 +132,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -234,6 +236,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -338,6 +341,7 @@ scope: `companies.write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -449,6 +453,7 @@ scope: `companies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/notifications/README.md b/gusto_embedded/docs/sdks/notifications/README.md index 2007cc7c..5a8cae33 100644 --- a/gusto_embedded/docs/sdks/notifications/README.md +++ b/gusto_embedded/docs/sdks/notifications/README.md @@ -20,6 +20,7 @@ scope: `notifications:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -124,6 +125,7 @@ scope: `notifications:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/paymentconfigs/README.md b/gusto_embedded/docs/sdks/paymentconfigs/README.md index 02fa5dfb..621cef4e 100644 --- a/gusto_embedded/docs/sdks/paymentconfigs/README.md +++ b/gusto_embedded/docs/sdks/paymentconfigs/README.md @@ -16,6 +16,7 @@ scope: `company_payment_configs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -118,6 +119,7 @@ scope: `company_payment_configs:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/payrolls/README.md b/gusto_embedded/docs/sdks/payrolls/README.md index 264b524d..e7c96610 100644 --- a/gusto_embedded/docs/sdks/payrolls/README.md +++ b/gusto_embedded/docs/sdks/payrolls/README.md @@ -40,6 +40,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -157,6 +158,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -263,6 +265,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -373,6 +376,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -482,6 +486,7 @@ scope: `payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -593,6 +598,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -691,6 +697,7 @@ scope: `payrolls:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -790,6 +797,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -895,6 +903,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -999,6 +1008,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1106,6 +1116,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1210,6 +1221,7 @@ If the company is blocked from running payroll due to issues like incomplete set ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1309,6 +1321,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1409,6 +1422,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1504,6 +1518,7 @@ scope: `pay_stubs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1609,6 +1624,7 @@ scope: `pay_stubs:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1712,6 +1728,7 @@ scope: `generated_documents:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1811,6 +1828,7 @@ scope: `partner_disbursements:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -1917,6 +1935,7 @@ scope: `partner_disbursements:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/payschedules/README.md b/gusto_embedded/docs/sdks/payschedules/README.md index e2871262..93793c1f 100644 --- a/gusto_embedded/docs/sdks/payschedules/README.md +++ b/gusto_embedded/docs/sdks/payschedules/README.md @@ -28,6 +28,7 @@ scope: `pay_schedules:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -136,6 +137,7 @@ scope: `pay_schedules:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -238,6 +240,7 @@ scope: `pay_schedules:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -346,6 +349,7 @@ scope: `pay_schedules:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -450,6 +454,7 @@ scope: `pay_schedules:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -568,6 +573,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -676,6 +682,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -778,6 +785,7 @@ scope: `pay_schedules:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -880,6 +888,7 @@ scope: `pay_schedules:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -991,6 +1000,7 @@ scope: `pay_schedules:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/recoverycases/README.md b/gusto_embedded/docs/sdks/recoverycases/README.md index e20a8640..5819f7ec 100644 --- a/gusto_embedded/docs/sdks/recoverycases/README.md +++ b/gusto_embedded/docs/sdks/recoverycases/README.md @@ -16,6 +16,7 @@ scope: `recovery_cases:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -122,6 +123,7 @@ scope: `recovery_cases:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/reports/README.md b/gusto_embedded/docs/sdks/reports/README.md index b6c699e9..5eb44e48 100644 --- a/gusto_embedded/docs/sdks/reports/README.md +++ b/gusto_embedded/docs/sdks/reports/README.md @@ -18,6 +18,7 @@ scope: `company_reports:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; @@ -144,6 +145,7 @@ scope: `company_reports:write` OR `company_reports:write:general_ledger` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -244,6 +246,7 @@ scope: `company_reports:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -346,6 +349,7 @@ scope: `company_reports:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/signatories/README.md b/gusto_embedded/docs/sdks/signatories/README.md index 16a0000b..3519eaeb 100644 --- a/gusto_embedded/docs/sdks/signatories/README.md +++ b/gusto_embedded/docs/sdks/signatories/README.md @@ -21,6 +21,7 @@ scope: `signatories:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -143,6 +144,7 @@ scope: `signatories:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -243,6 +245,7 @@ Create a signatory with minimal information. This signatory can be invited to pr ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -341,6 +344,7 @@ scope: `signatories:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -437,6 +441,7 @@ scope: `signatories:manage` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/suspensions/README.md b/gusto_embedded/docs/sdks/suspensions/README.md index efd55d06..93d4f550 100644 --- a/gusto_embedded/docs/sdks/suspensions/README.md +++ b/gusto_embedded/docs/sdks/suspensions/README.md @@ -10,16 +10,18 @@ ## get -Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. +Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. -> 📘 To check if company is already suspended +>📘 To check if company is already suspended > > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. scope: `company_suspensions:read` + ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -110,9 +112,10 @@ import { ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UnprocessableEntityErrorObject | 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## suspend @@ -120,8 +123,10 @@ Use this endpoint to suspend a company. After suspension, company will no longer scope: `company_suspensions:write` + ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -215,7 +220,7 @@ import { ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UnprocessableEntityErrorObject | 422 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.CompanySuspensionCreationErrors | 422 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/taxrequirements/README.md b/gusto_embedded/docs/sdks/taxrequirements/README.md index 46c50774..cc3a750c 100644 --- a/gusto_embedded/docs/sdks/taxrequirements/README.md +++ b/gusto_embedded/docs/sdks/taxrequirements/README.md @@ -57,6 +57,7 @@ scope: `company_tax_requirements:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -161,6 +162,7 @@ scope: `company_tax_requirements:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -337,6 +339,7 @@ scope: `company_tax_requirements:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/timeoffpolicies/README.md b/gusto_embedded/docs/sdks/timeoffpolicies/README.md index a6846c1f..e7fa0c7b 100644 --- a/gusto_embedded/docs/sdks/timeoffpolicies/README.md +++ b/gusto_embedded/docs/sdks/timeoffpolicies/README.md @@ -31,6 +31,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -139,6 +140,7 @@ scope: `time_off_policies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -241,6 +243,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -355,6 +358,7 @@ scope: `time_off_policies:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -457,6 +461,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -559,6 +564,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -653,6 +659,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -747,6 +754,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -841,6 +849,7 @@ scope: `time_off_policies:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/webhooks/README.md b/gusto_embedded/docs/sdks/webhooks/README.md index d30032e3..3a0ddfa7 100644 --- a/gusto_embedded/docs/sdks/webhooks/README.md +++ b/gusto_embedded/docs/sdks/webhooks/README.md @@ -25,6 +25,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -134,6 +135,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -238,6 +240,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -348,6 +351,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -456,6 +460,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -555,6 +560,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -659,6 +665,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/docs/sdks/wireinrequests/README.md b/gusto_embedded/docs/sdks/wireinrequests/README.md index 0833b8c2..b0f0bcdc 100644 --- a/gusto_embedded/docs/sdks/wireinrequests/README.md +++ b/gusto_embedded/docs/sdks/wireinrequests/README.md @@ -17,6 +17,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -119,6 +120,7 @@ scope: `payrolls:run` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; @@ -223,6 +225,7 @@ scope: `payrolls:read` ### Example Usage + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/examples/.env.template b/gusto_embedded/examples/.env.template index 61c4d785..68ed00f8 100644 --- a/gusto_embedded/examples/.env.template +++ b/gusto_embedded/examples/.env.template @@ -6,11 +6,9 @@ # The SDK supports loading security credentials from environment variables # with the prefix: GUSTOEMBEDDED_ # -# Example security environment variables: -# GUSTOEMBEDDED_API_KEY=your_api_key_here -# GUSTOEMBEDDED_BEARER_TOKEN=your_bearer_token_here -# GUSTOEMBEDDED_USERNAME=your_username_here -# GUSTOEMBEDDED_PASSWORD=your_password_here -# -# Check the SDK documentation for the exact environment variable names -# required for your specific authentication method. +# Security environment variables: +GUSTOEMBEDDED_COMPANY_ACCESS_AUTH=your_companyaccessauth_here + +# Debug Configuration +# Enable HTTP request/response logging for debugging +GUSTOEMBEDDED_DEBUG=false diff --git a/gusto_embedded/examples/README.md b/gusto_embedded/examples/README.md index 88bd5a0d..d764cc8e 100644 --- a/gusto_embedded/examples/README.md +++ b/gusto_embedded/examples/README.md @@ -24,3 +24,8 @@ To run an example file from the examples directory: npm run build && npx tsx example.ts ``` +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/gusto_embedded/examples/introspectionGetInfo.example.ts b/gusto_embedded/examples/introspectionGetInfo.example.ts index be4d9fdf..79c5f127 100644 --- a/gusto_embedded/examples/introspectionGetInfo.example.ts +++ b/gusto_embedded/examples/introspectionGetInfo.example.ts @@ -2,11 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import dotenv from "dotenv"; +dotenv.config(); /** * Example usage of the @gusto/embedded-api SDK * * To run this example from the examples directory: - * npm run build && npx tsx introspectionGetInfo.ts + * npm run build && npx tsx introspectionGetInfo.example.ts */ import { GustoEmbedded } from "@gusto/embedded-api"; diff --git a/gusto_embedded/examples/package-lock.json b/gusto_embedded/examples/package-lock.json index 104fdc58..004bb277 100644 --- a/gusto_embedded/examples/package-lock.json +++ b/gusto_embedded/examples/package-lock.json @@ -18,22 +18,23 @@ }, "..": { "name": "@gusto/embedded-api", - "version": "0.6.6", + "version": "0.6.7", + "dependencies": { + "zod": "^3.20.0" + }, "devDependencies": { "@eslint/js": "^9.19.0", "@tanstack/react-query": "^5.61.4", "@types/react": "^18.3.12", "eslint": "^9.19.0", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "peerDependencies": { "@tanstack/react-query": "^5", "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": "^3" + "react-dom": "^18 || ^19" }, "peerDependenciesMeta": { "@tanstack/react-query": { diff --git a/gusto_embedded/jsr.json b/gusto_embedded/jsr.json index 468c002f..18694175 100644 --- a/gusto_embedded/jsr.json +++ b/gusto_embedded/jsr.json @@ -2,7 +2,7 @@ { "name": "@gusto/embedded-api", - "version": "0.6.6", + "version": "0.6.7", "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 862a455e..54a8df35 100644 --- a/gusto_embedded/package-lock.json +++ b/gusto_embedded/package-lock.json @@ -1,27 +1,28 @@ { "name": "@gusto/embedded-api", - "version": "0.6.6", + "version": "0.6.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gusto/embedded-api", - "version": "0.6.6", + "version": "0.6.7", + "dependencies": { + "zod": "^3.20.0" + }, "devDependencies": { "@eslint/js": "^9.19.0", "@tanstack/react-query": "^5.61.4", "@types/react": "^18.3.12", "eslint": "^9.19.0", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "peerDependencies": { "@tanstack/react-query": "^5", "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": "^3" + "react-dom": "^18 || ^19" }, "peerDependenciesMeta": { "@tanstack/react-query": { @@ -36,10 +37,11 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -279,6 +281,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -292,6 +295,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -301,6 +305,7 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -369,17 +374,22 @@ "csstype": "^3.0.2" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.22.0.tgz", - "integrity": "sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.40.0.tgz", + "integrity": "sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.22.0", - "@typescript-eslint/utils": "8.22.0", - "debug": "^4.3.4", - "ts-api-utils": "^2.0.0" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/type-utils": "8.40.0", + "@typescript-eslint/utils": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -389,39 +399,33 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { + "@typescript-eslint/parser": "^8.40.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.22.0.tgz", - "integrity": "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">= 4" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.22.0.tgz", - "integrity": "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==", + "node_modules/@typescript-eslint/parser": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.40.0.tgz", + "integrity": "sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", + "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -431,18 +435,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.22.0.tgz", - "integrity": "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==", + "node_modules/@typescript-eslint/project-service": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.40.0.tgz", + "integrity": "sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.22.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/tsconfig-utils": "^8.40.0", + "@typescript-eslint/types": "^8.40.0", + "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -450,46 +456,35 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "funding": { - "url": "https://opencollective.com/eslint" + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.40.0.tgz", + "integrity": "sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0" + }, "engines": { - "node": ">=18.12" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "typescript": ">=4.8.4" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.22.0.tgz", - "integrity": "sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.40.0.tgz", + "integrity": "sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw==", "dev": true, "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/typescript-estree": "8.22.0" - }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -498,19 +493,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.22.0.tgz", - "integrity": "sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.40.0.tgz", + "integrity": "sha512-eE60cK4KzAc6ZrzlJnflXdrMqOBaugeukWICO2rB0KNvwdIMaEaYiywwHMzA1qFpTxrLhN9Lp4E/00EgWcD3Ow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0" + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/utils": "8.40.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -518,12 +515,16 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.22.0.tgz", - "integrity": "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==", + "node_modules/@typescript-eslint/types": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.40.0.tgz", + "integrity": "sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg==", "dev": true, "license": "MIT", "engines": { @@ -534,21 +535,23 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.22.0.tgz", - "integrity": "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.40.0.tgz", + "integrity": "sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", + "@typescript-eslint/project-service": "8.40.0", + "@typescript-eslint/tsconfig-utils": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/visitor-keys": "8.40.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -558,18 +561,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.22.0.tgz", - "integrity": "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==", + "node_modules/@typescript-eslint/utils": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.40.0.tgz", + "integrity": "sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.22.0", - "eslint-visitor-keys": "^4.2.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.40.0", + "@typescript-eslint/types": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -577,32 +582,41 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.40.0.tgz", + "integrity": "sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.40.0", + "eslint-visitor-keys": "^4.2.1" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=18.12" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependencies": { - "typescript": ">=4.8.4" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/acorn": { @@ -674,10 +688,11 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -687,6 +702,7 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -1010,6 +1026,7 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1026,6 +1043,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1047,10 +1065,11 @@ "dev": true }, "node_modules/fastq": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", - "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -1073,6 +1092,7 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1146,7 +1166,8 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", @@ -1218,6 +1239,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1310,6 +1332,7 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -1319,6 +1342,7 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -1332,6 +1356,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1437,6 +1462,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1481,7 +1507,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/react": { "version": "19.0.0", @@ -1505,10 +1532,11 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -1533,15 +1561,17 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1600,6 +1630,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1607,6 +1638,19 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -1620,10 +1664,11 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1633,15 +1678,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.22.0.tgz", - "integrity": "sha512-Y2rj210FW1Wb6TWXzQc5+P+EWI9/zdS57hLEc0gnyuvdzWo8+Y8brKlbj0muejonhMI/xAZCnZZwjbIfv1CkOw==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.40.0.tgz", + "integrity": "sha512-Xvd2l+ZmFDPEt4oj1QEXzA4A2uUK6opvKu3eGN9aGjB8au02lIVcLyi375w94hHyejTOmzIU77L8ol2sRg9n7Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.22.0", - "@typescript-eslint/parser": "8.22.0", - "@typescript-eslint/utils": "8.22.0" + "@typescript-eslint/eslint-plugin": "8.40.0", + "@typescript-eslint/parser": "8.40.0", + "@typescript-eslint/typescript-estree": "8.40.0", + "@typescript-eslint/utils": "8.40.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1652,165 +1698,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.22.0.tgz", - "integrity": "sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/type-utils": "8.22.0", - "@typescript-eslint/utils": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.22.0.tgz", - "integrity": "sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.22.0", - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/typescript-estree": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.22.0.tgz", - "integrity": "sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.22.0.tgz", - "integrity": "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.22.0.tgz", - "integrity": "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "@typescript-eslint/visitor-keys": "8.22.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.22.0.tgz", - "integrity": "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.22.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/typescript-eslint/node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/uri-js": { @@ -1863,7 +1751,6 @@ "version": "3.25.30", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.30.tgz", "integrity": "sha512-VolhdEtu6TJr/fzGuHA/SZ5ixvXqA6ADOG9VRcQ3rdOKmF5hkmcJbyaQjUH5BgmpA9gej++zYRX7zjSmdReIwA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/gusto_embedded/package.json b/gusto_embedded/package.json index c5222914..e5d59c60 100644 --- a/gusto_embedded/package.json +++ b/gusto_embedded/package.json @@ -1,6 +1,6 @@ { "name": "@gusto/embedded-api", - "version": "0.6.6", + "version": "0.6.7", "author": "Speakeasy", "type": "module", "main": "./esm/index.js", @@ -36,8 +36,7 @@ "peerDependencies": { "@tanstack/react-query": "^5", "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": "^3" + "react-dom": "^18 || ^19" }, "peerDependenciesMeta": { "@tanstack/react-query": {"optional":true}, @@ -50,11 +49,10 @@ "@types/react": "^18.3.12", "eslint": "^9.19.0", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "dependencies": { - + "zod": "^3.20.0" } } diff --git a/gusto_embedded/src/funcs/bankAccountsCreate.ts b/gusto_embedded/src/funcs/bankAccountsCreate.ts index a2fcab76..364e1ca5 100644 --- a/gusto_embedded/src/funcs/bankAccountsCreate.ts +++ b/gusto_embedded/src/funcs/bankAccountsCreate.ts @@ -46,7 +46,7 @@ import { Result } from "../types/fp.js"; * * scope: `company_bank_accounts:write` * - * > 🚧 Warning + * >🚧 Warning * > * > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. */ @@ -106,7 +106,9 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); + const body = encodeJSON("body", payload["Company-Bank-Account-Request"], { + explode: true, + }); const pathParams = { company_id: encodeSimple("company_id", payload.company_id, { @@ -195,8 +197,8 @@ async function $do( M.json(201, PostV1CompaniesCompanyIdBankAccountsResponse$inboundSchema, { key: "Company-Bank-Account", }), - 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/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts b/gusto_embedded/src/funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts new file mode 100644 index 00000000..c5c794c0 --- /dev/null +++ b/gusto_embedded/src/funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { GustoEmbeddedCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { GustoEmbeddedError } from "../models/errors/gustoembeddederror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} 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 { + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema, +} from "../models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a company bank account + * + * @remarks + * This endpoint disables a company bank account. + * + * A bank account cannot be disabled if it is used for any unprocessed payments. + * + * scope: `company_bank_accounts:write` + */ +export function bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId( + client: GustoEmbeddedCore, + request: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: GustoEmbeddedCore, + request: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + bank_account_id: encodeSimple("bank_account_id", payload.bank_account_id, { + explode: false, + charEncoding: "percent", + }), + company_id: encodeSimple("company_id", payload.company_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/companies/{company_id}/bank_accounts/{bank_account_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Gusto-API-Version": encodeSimple( + "X-Gusto-API-Version", + payload["X-Gusto-API-Version"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.companyAccessAuth); + const securityInput = secConfig == null + ? {} + : { companyAccessAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete-v1-companies-company_id-bank-accounts-bank_account_id", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.companyAccessAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil( + 204, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema, + ), + M.jsonErr([404, 422], UnprocessableEntityErrorObject$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/gusto_embedded/src/funcs/bankAccountsGet.ts b/gusto_embedded/src/funcs/bankAccountsGet.ts index 522d827c..d4f3d090 100644 --- a/gusto_embedded/src/funcs/bankAccountsGet.ts +++ b/gusto_embedded/src/funcs/bankAccountsGet.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 { GetV1CompaniesCompanyIdBankAccountsRequest, GetV1CompaniesCompanyIdBankAccountsRequest$outboundSchema, @@ -44,6 +48,7 @@ export function bankAccountsGet( ): APIPromise< Result< GetV1CompaniesCompanyIdBankAccountsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -69,6 +74,7 @@ async function $do( [ Result< GetV1CompaniesCompanyIdBankAccountsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -166,6 +172,7 @@ async function $do( const [result] = await M.match< GetV1CompaniesCompanyIdBankAccountsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -176,9 +183,10 @@ async function $do( | SDKValidationError >( M.json(200, GetV1CompaniesCompanyIdBankAccountsResponse$inboundSchema, { - key: "Company-Bank-Account-List", + key: "Company-Bank-Accounts", }), - 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/companiesSuspensionsGet.ts b/gusto_embedded/src/funcs/companiesSuspensionsGet.ts index a391e195..840f6fad 100644 --- a/gusto_embedded/src/funcs/companiesSuspensionsGet.ts +++ b/gusto_embedded/src/funcs/companiesSuspensionsGet.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 { GetCompaniesCompanyUuidSuspensionsRequest, GetCompaniesCompanyUuidSuspensionsRequest$outboundSchema, @@ -35,7 +39,7 @@ import { Result } from "../types/fp.js"; * @remarks * Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. * - * > 📘 To check if company is already suspended + * >📘 To check if company is already suspended * > * > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. * @@ -48,6 +52,7 @@ export function companiesSuspensionsGet( ): APIPromise< Result< GetCompaniesCompanyUuidSuspensionsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -73,6 +78,7 @@ async function $do( [ Result< GetCompaniesCompanyUuidSuspensionsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -170,6 +176,7 @@ async function $do( const [result] = await M.match< GetCompaniesCompanyUuidSuspensionsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -182,7 +189,8 @@ async function $do( M.json(200, GetCompaniesCompanyUuidSuspensionsResponse$inboundSchema, { key: "Company-Suspension-List", }), - 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/companiesSuspensionsSuspend.ts b/gusto_embedded/src/funcs/companiesSuspensionsSuspend.ts index 23f1d139..65b7695e 100644 --- a/gusto_embedded/src/funcs/companiesSuspensionsSuspend.ts +++ b/gusto_embedded/src/funcs/companiesSuspensionsSuspend.ts @@ -10,6 +10,10 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { + CompanySuspensionCreationErrors, + CompanySuspensionCreationErrors$inboundSchema, +} from "../models/errors/companysuspensioncreationerrors.js"; import { GustoEmbeddedError } from "../models/errors/gustoembeddederror.js"; import { ConnectionError, @@ -20,10 +24,6 @@ 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 { PostCompaniesCompanyUuidSuspensionsRequest, PostCompaniesCompanyUuidSuspensionsRequest$outboundSchema, @@ -48,7 +48,7 @@ export function companiesSuspensionsSuspend( ): APIPromise< Result< PostCompaniesCompanyUuidSuspensionsResponse, - | UnprocessableEntityErrorObject + | CompanySuspensionCreationErrors | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -74,7 +74,7 @@ async function $do( [ Result< PostCompaniesCompanyUuidSuspensionsResponse, - | UnprocessableEntityErrorObject + | CompanySuspensionCreationErrors | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -173,7 +173,7 @@ async function $do( const [result] = await M.match< PostCompaniesCompanyUuidSuspensionsResponse, - | UnprocessableEntityErrorObject + | CompanySuspensionCreationErrors | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -186,7 +186,7 @@ async function $do( M.json(200, PostCompaniesCompanyUuidSuspensionsResponse$inboundSchema, { key: "Company-Suspension", }), - M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), + M.jsonErr(422, CompanySuspensionCreationErrors$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/gusto_embedded/src/funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts b/gusto_embedded/src/funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts new file mode 100644 index 00000000..1103de79 --- /dev/null +++ b/gusto_embedded/src/funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts @@ -0,0 +1,196 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { GustoEmbeddedCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { GustoEmbeddedError } from "../models/errors/gustoembeddederror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema, +} from "../models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get contribution exclusions for a company benefit + * + * @remarks + * Returns all contributions for a given company benefit and whether they are excluded or not. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:read` + */ +export function companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client: GustoEmbeddedCore, + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: GustoEmbeddedCore, + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + company_benefit_id: encodeSimple( + "company_benefit_id", + payload.company_benefit_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "X-Gusto-API-Version": encodeSimple( + "X-Gusto-API-Version", + payload["X-Gusto-API-Version"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.companyAccessAuth); + const securityInput = secConfig == null + ? {} + : { companyAccessAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: + "get-v1-company_benefits-company_benefit_id-contribution_exclusions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.companyAccessAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json( + 200, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema, + { key: "Contribution-Exclusion-List" }, + ), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/gusto_embedded/src/funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts b/gusto_embedded/src/funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts new file mode 100644 index 00000000..6f9b7887 --- /dev/null +++ b/gusto_embedded/src/funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { GustoEmbeddedCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { GustoEmbeddedError } from "../models/errors/gustoembeddederror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} 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 { + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema, +} from "../models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update contribution exclusions for a company benefit + * + * @remarks + * Updates contribution exclusions for a given company benefit. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:write` + */ +export function companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client: GustoEmbeddedCore, + request: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: GustoEmbeddedCore, + request: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + company_benefit_id: encodeSimple( + "company_benefit_id", + payload.company_benefit_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "X-Gusto-API-Version": encodeSimple( + "X-Gusto-API-Version", + payload["X-Gusto-API-Version"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.companyAccessAuth); + const securityInput = secConfig == null + ? {} + : { companyAccessAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: + "put-v1-company_benefits-company_benefit_id-contribution_exclusions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.companyAccessAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + | UnprocessableEntityErrorObject + | GustoEmbeddedError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json( + 200, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema, + { key: "Contribution-Exclusion-List" }, + ), + M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/gusto_embedded/src/funcs/employeesList.ts b/gusto_embedded/src/funcs/employeesList.ts index b4f6e0b0..33088026 100644 --- a/gusto_embedded/src/funcs/employeesList.ts +++ b/gusto_embedded/src/funcs/employeesList.ts @@ -113,10 +113,12 @@ async function $do( "include": payload.include, }, { explode: false }), encodeFormQuery({ + "onboarded": payload.onboarded, "page": payload.page, "per": payload.per, "search_term": payload.search_term, "terminated": payload.terminated, + "terminated_today": payload.terminated_today, "uuids": payload.uuids, }), ); diff --git a/gusto_embedded/src/funcs/payrollsGet.ts b/gusto_embedded/src/funcs/payrollsGet.ts index 350bcb41..3a2c8b60 100644 --- a/gusto_embedded/src/funcs/payrollsGet.ts +++ b/gusto_embedded/src/funcs/payrollsGet.ts @@ -203,7 +203,7 @@ async function $do( M.json( 200, GetV1CompaniesCompanyIdPayrollsPayrollIdResponse$inboundSchema, - { key: "Payroll" }, + { key: "Payroll-Show" }, ), M.jsonErr(404, UnprocessableEntityErrorObject$inboundSchema), M.fail("4XX"), diff --git a/gusto_embedded/src/lib/config.ts b/gusto_embedded/src/lib/config.ts index fd702185..355dc728 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.6", - genVersion: "2.657.1", + sdkVersion: "0.6.7", + genVersion: "2.686.7", userAgent: - "speakeasy-sdk/typescript 0.6.6 2.657.1 2024-04-01 @gusto/embedded-api", + "speakeasy-sdk/typescript 0.6.7 2.686.7 2024-04-01 @gusto/embedded-api", } as const; diff --git a/gusto_embedded/src/lib/security.ts b/gusto_embedded/src/lib/security.ts index 922744a0..e5ef7bfd 100644 --- a/gusto_embedded/src/lib/security.ts +++ b/gusto_embedded/src/lib/security.ts @@ -84,7 +84,10 @@ type SecurityInputOAuth2 = { type SecurityInputOAuth2ClientCredentials = { type: "oauth2:client_credentials"; value: - | { clientID?: string | undefined; clientSecret?: string | undefined } + | { + clientID?: string | undefined; + clientSecret?: string | undefined; + } | null | string | undefined; diff --git a/gusto_embedded/src/models/components/admin.ts b/gusto_embedded/src/models/components/admin.ts index 51cdc995..1d4510a6 100644 --- a/gusto_embedded/src/models/components/admin.ts +++ b/gusto_embedded/src/models/components/admin.ts @@ -17,7 +17,7 @@ export type Admin = { */ uuid: string; /** - * The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them. + * The email of the admin for Gusto's system. */ email?: string | undefined; /** diff --git a/gusto_embedded/src/models/components/companybankaccountrequest.ts b/gusto_embedded/src/models/components/companybankaccountrequest.ts new file mode 100644 index 00000000..a3eef1ef --- /dev/null +++ b/gusto_embedded/src/models/components/companybankaccountrequest.ts @@ -0,0 +1,135 @@ +/* + * 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 bank account type + */ +export const CompanyBankAccountRequestAccountType = { + Checking: "Checking", + Savings: "Savings", +} as const; +/** + * The bank account type + */ +export type CompanyBankAccountRequestAccountType = ClosedEnum< + typeof CompanyBankAccountRequestAccountType +>; + +export type CompanyBankAccountRequest = { + /** + * The bank routing number + */ + routingNumber: string; + /** + * The bank account number + */ + accountNumber: string; + /** + * The bank account type + */ + accountType: CompanyBankAccountRequestAccountType; +}; + +/** @internal */ +export const CompanyBankAccountRequestAccountType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CompanyBankAccountRequestAccountType, + ); + +/** @internal */ +export const CompanyBankAccountRequestAccountType$outboundSchema: + z.ZodNativeEnum = + CompanyBankAccountRequestAccountType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CompanyBankAccountRequestAccountType$ { + /** @deprecated use `CompanyBankAccountRequestAccountType$inboundSchema` instead. */ + export const inboundSchema = + CompanyBankAccountRequestAccountType$inboundSchema; + /** @deprecated use `CompanyBankAccountRequestAccountType$outboundSchema` instead. */ + export const outboundSchema = + CompanyBankAccountRequestAccountType$outboundSchema; +} + +/** @internal */ +export const CompanyBankAccountRequest$inboundSchema: z.ZodType< + CompanyBankAccountRequest, + z.ZodTypeDef, + unknown +> = z.object({ + routing_number: z.string(), + account_number: z.string(), + account_type: CompanyBankAccountRequestAccountType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "routing_number": "routingNumber", + "account_number": "accountNumber", + "account_type": "accountType", + }); +}); + +/** @internal */ +export type CompanyBankAccountRequest$Outbound = { + routing_number: string; + account_number: string; + account_type: string; +}; + +/** @internal */ +export const CompanyBankAccountRequest$outboundSchema: z.ZodType< + CompanyBankAccountRequest$Outbound, + z.ZodTypeDef, + CompanyBankAccountRequest +> = z.object({ + routingNumber: z.string(), + accountNumber: z.string(), + accountType: CompanyBankAccountRequestAccountType$outboundSchema, +}).transform((v) => { + return remap$(v, { + routingNumber: "routing_number", + accountNumber: "account_number", + accountType: "account_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CompanyBankAccountRequest$ { + /** @deprecated use `CompanyBankAccountRequest$inboundSchema` instead. */ + export const inboundSchema = CompanyBankAccountRequest$inboundSchema; + /** @deprecated use `CompanyBankAccountRequest$outboundSchema` instead. */ + export const outboundSchema = CompanyBankAccountRequest$outboundSchema; + /** @deprecated use `CompanyBankAccountRequest$Outbound` instead. */ + export type Outbound = CompanyBankAccountRequest$Outbound; +} + +export function companyBankAccountRequestToJSON( + companyBankAccountRequest: CompanyBankAccountRequest, +): string { + return JSON.stringify( + CompanyBankAccountRequest$outboundSchema.parse(companyBankAccountRequest), + ); +} + +export function companyBankAccountRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CompanyBankAccountRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CompanyBankAccountRequest' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/components/companysuspension.ts b/gusto_embedded/src/models/components/companysuspension.ts index 6cdaa731..612c80f9 100644 --- a/gusto_embedded/src/models/components/companysuspension.ts +++ b/gusto_embedded/src/models/components/companysuspension.ts @@ -21,12 +21,6 @@ export const ReconcileTaxMethod = { */ export type ReconcileTaxMethod = ClosedEnum; -/** - * Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid - * - * @remarks - * by Gusto, depending on the value in `reconcile_tax_method`. - */ export type TaxRefunds = { /** * Dollar amount. @@ -57,7 +51,7 @@ export type CompanySuspension = { /** * Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`. */ - leavingFor?: string | undefined; + leavingFor?: string | null | undefined; /** * Explanation for why the company's account was suspended. */ @@ -67,30 +61,27 @@ export type CompanySuspension = { */ reconcileTaxMethod?: ReconcileTaxMethod | undefined; /** - * Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company + * 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. * * @remarks - * is suspending their account, and how taxes are being reconciled. */ fileQuarterlyForms?: boolean | undefined; /** - * Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company + * 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. * * @remarks - * is suspending their account, and how taxes are being reconciled. */ fileYearlyForms?: boolean | undefined; /** - * User-supplied comments describing why then are suspending their account. + * User-supplied comments describing why they are suspending their account. */ - comments?: string | undefined; + comments?: string | null | undefined; /** - * Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid + * Describes the taxes which are refundable to the company for this suspension. These may be refunded or paid by Gusto depending on the value in `reconcile_tax_method`. * * @remarks - * by Gusto, depending on the value in `reconcile_tax_method`. */ - taxRefunds?: TaxRefunds | undefined; + taxRefunds?: Array | undefined; }; /** @internal */ @@ -176,13 +167,13 @@ export const CompanySuspension$inboundSchema: z.ZodType< uuid: z.string().optional(), company_uuid: z.string().optional(), effective_date: z.string().optional(), - leaving_for: z.string().optional(), + leaving_for: z.nullable(z.string()).optional(), reason: z.string().optional(), reconcile_tax_method: ReconcileTaxMethod$inboundSchema.optional(), file_quarterly_forms: z.boolean().optional(), file_yearly_forms: z.boolean().optional(), - comments: z.string().optional(), - tax_refunds: z.lazy(() => TaxRefunds$inboundSchema).optional(), + comments: z.nullable(z.string()).optional(), + tax_refunds: z.array(z.lazy(() => TaxRefunds$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "company_uuid": "companyUuid", @@ -200,13 +191,13 @@ export type CompanySuspension$Outbound = { uuid?: string | undefined; company_uuid?: string | undefined; effective_date?: string | undefined; - leaving_for?: string | undefined; + leaving_for?: string | null | undefined; reason?: string | undefined; reconcile_tax_method?: string | undefined; file_quarterly_forms?: boolean | undefined; file_yearly_forms?: boolean | undefined; - comments?: string | undefined; - tax_refunds?: TaxRefunds$Outbound | undefined; + comments?: string | null | undefined; + tax_refunds?: Array | undefined; }; /** @internal */ @@ -218,13 +209,13 @@ export const CompanySuspension$outboundSchema: z.ZodType< uuid: z.string().optional(), companyUuid: z.string().optional(), effectiveDate: z.string().optional(), - leavingFor: z.string().optional(), + leavingFor: z.nullable(z.string()).optional(), reason: z.string().optional(), reconcileTaxMethod: ReconcileTaxMethod$outboundSchema.optional(), fileQuarterlyForms: z.boolean().optional(), fileYearlyForms: z.boolean().optional(), - comments: z.string().optional(), - taxRefunds: z.lazy(() => TaxRefunds$outboundSchema).optional(), + comments: z.nullable(z.string()).optional(), + taxRefunds: z.array(z.lazy(() => TaxRefunds$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { companyUuid: "company_uuid", diff --git a/gusto_embedded/src/models/components/contractor.ts b/gusto_embedded/src/models/components/contractor.ts index 98e90270..499922ee 100644 --- a/gusto_embedded/src/models/components/contractor.ts +++ b/gusto_embedded/src/models/components/contractor.ts @@ -149,7 +149,7 @@ export type Contractor = { /** * The boolean flag indicating whether Gusto will file a new hire report for the contractor */ - fileNewHireReport?: boolean | undefined; + fileNewHireReport?: boolean | null | undefined; /** * State where the contractor will be conducting the majority of their work for the company. * @@ -355,7 +355,7 @@ export const Contractor$inboundSchema: z.ZodType< start_date: z.string().optional(), address: z.nullable(z.lazy(() => Address$inboundSchema)).optional(), hourly_rate: z.string().optional(), - file_new_hire_report: z.boolean().default(false), + file_new_hire_report: z.nullable(z.boolean()).optional(), work_state: z.nullable(z.string()).optional(), onboarded: z.boolean().optional(), onboarding_status: ContractorOnboardingStatus1$inboundSchema.optional(), @@ -401,7 +401,7 @@ export type Contractor$Outbound = { start_date?: string | undefined; address?: Address$Outbound | null | undefined; hourly_rate?: string | undefined; - file_new_hire_report: boolean; + file_new_hire_report?: boolean | null | undefined; work_state?: string | null | undefined; onboarded?: boolean | undefined; onboarding_status?: string | undefined; @@ -432,7 +432,7 @@ export const Contractor$outboundSchema: z.ZodType< startDate: z.string().optional(), address: z.nullable(z.lazy(() => Address$outboundSchema)).optional(), hourlyRate: z.string().optional(), - fileNewHireReport: z.boolean().default(false), + fileNewHireReport: z.nullable(z.boolean()).optional(), workState: z.nullable(z.string()).optional(), onboarded: z.boolean().optional(), onboardingStatus: ContractorOnboardingStatus1$outboundSchema.optional(), diff --git a/gusto_embedded/src/models/components/contractoronboardingstatus.ts b/gusto_embedded/src/models/components/contractoronboardingstatus.ts index f49211f0..13b9a8e1 100644 --- a/gusto_embedded/src/models/components/contractoronboardingstatus.ts +++ b/gusto_embedded/src/models/components/contractoronboardingstatus.ts @@ -16,6 +16,10 @@ export const ContractorOnboardingStatusOnboardingStatus = { OnboardingCompleted: "onboarding_completed", AdminOnboardingReview: "admin_onboarding_review", AdminOnboardingIncomplete: "admin_onboarding_incomplete", + SelfOnboardingNotInvited: "self_onboarding_not_invited", + SelfOnboardingInvited: "self_onboarding_invited", + SelfOnboardingStarted: "self_onboarding_started", + SelfOnboardingReview: "self_onboarding_review", } as const; /** * One of the "onboarding_status" enum values. diff --git a/gusto_embedded/src/models/components/contributionexclusion.ts b/gusto_embedded/src/models/components/contributionexclusion.ts new file mode 100644 index 00000000..dac292af --- /dev/null +++ b/gusto_embedded/src/models/components/contributionexclusion.ts @@ -0,0 +1,97 @@ +/* + * 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 { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The representation of a contribution exclusion for a company benefit. + */ +export type ContributionExclusion = { + /** + * The UUID of the contribution type. + */ + contributionUuid: string; + /** + * The name of the contribution type. + */ + contributionType: string; + /** + * Whether this contribution type is excluded from the benefit. + */ + excluded: boolean; +}; + +/** @internal */ +export const ContributionExclusion$inboundSchema: z.ZodType< + ContributionExclusion, + z.ZodTypeDef, + unknown +> = z.object({ + contribution_uuid: z.string(), + contribution_type: z.string(), + excluded: z.boolean(), +}).transform((v) => { + return remap$(v, { + "contribution_uuid": "contributionUuid", + "contribution_type": "contributionType", + }); +}); + +/** @internal */ +export type ContributionExclusion$Outbound = { + contribution_uuid: string; + contribution_type: string; + excluded: boolean; +}; + +/** @internal */ +export const ContributionExclusion$outboundSchema: z.ZodType< + ContributionExclusion$Outbound, + z.ZodTypeDef, + ContributionExclusion +> = z.object({ + contributionUuid: z.string(), + contributionType: z.string(), + excluded: z.boolean(), +}).transform((v) => { + return remap$(v, { + contributionUuid: "contribution_uuid", + contributionType: "contribution_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContributionExclusion$ { + /** @deprecated use `ContributionExclusion$inboundSchema` instead. */ + export const inboundSchema = ContributionExclusion$inboundSchema; + /** @deprecated use `ContributionExclusion$outboundSchema` instead. */ + export const outboundSchema = ContributionExclusion$outboundSchema; + /** @deprecated use `ContributionExclusion$Outbound` instead. */ + export type Outbound = ContributionExclusion$Outbound; +} + +export function contributionExclusionToJSON( + contributionExclusion: ContributionExclusion, +): string { + return JSON.stringify( + ContributionExclusion$outboundSchema.parse(contributionExclusion), + ); +} + +export function contributionExclusionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ContributionExclusion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ContributionExclusion' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/components/externalpayroll.ts b/gusto_embedded/src/models/components/externalpayroll.ts index d8b4722a..1cc5ea8f 100644 --- a/gusto_embedded/src/models/components/externalpayroll.ts +++ b/gusto_embedded/src/models/components/externalpayroll.ts @@ -28,7 +28,7 @@ export type Earnings = { earningId?: number | undefined; }; -export type ExternalPayrollBenefits = { +export type Benefits = { benefitId?: number | undefined; companyContributionAmount?: string | undefined; employeeDeductionAmount?: string | undefined; @@ -42,7 +42,7 @@ export type ExternalPayrollTaxes = { export type ExternalPayrollItems = { employeeUuid?: string | undefined; earnings?: Array | undefined; - benefits?: Array | undefined; + benefits?: Array | undefined; taxes?: Array | undefined; }; @@ -222,8 +222,8 @@ export function earningsFromJSON( } /** @internal */ -export const ExternalPayrollBenefits$inboundSchema: z.ZodType< - ExternalPayrollBenefits, +export const Benefits$inboundSchema: z.ZodType< + Benefits, z.ZodTypeDef, unknown > = z.object({ @@ -239,17 +239,17 @@ export const ExternalPayrollBenefits$inboundSchema: z.ZodType< }); /** @internal */ -export type ExternalPayrollBenefits$Outbound = { +export type Benefits$Outbound = { benefit_id?: number | undefined; company_contribution_amount?: string | undefined; employee_deduction_amount?: string | undefined; }; /** @internal */ -export const ExternalPayrollBenefits$outboundSchema: z.ZodType< - ExternalPayrollBenefits$Outbound, +export const Benefits$outboundSchema: z.ZodType< + Benefits$Outbound, z.ZodTypeDef, - ExternalPayrollBenefits + Benefits > = z.object({ benefitId: z.number().int().optional(), companyContributionAmount: z.string().optional(), @@ -266,30 +266,26 @@ export const ExternalPayrollBenefits$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ExternalPayrollBenefits$ { - /** @deprecated use `ExternalPayrollBenefits$inboundSchema` instead. */ - export const inboundSchema = ExternalPayrollBenefits$inboundSchema; - /** @deprecated use `ExternalPayrollBenefits$outboundSchema` instead. */ - export const outboundSchema = ExternalPayrollBenefits$outboundSchema; - /** @deprecated use `ExternalPayrollBenefits$Outbound` instead. */ - export type Outbound = ExternalPayrollBenefits$Outbound; +export namespace Benefits$ { + /** @deprecated use `Benefits$inboundSchema` instead. */ + export const inboundSchema = Benefits$inboundSchema; + /** @deprecated use `Benefits$outboundSchema` instead. */ + export const outboundSchema = Benefits$outboundSchema; + /** @deprecated use `Benefits$Outbound` instead. */ + export type Outbound = Benefits$Outbound; } -export function externalPayrollBenefitsToJSON( - externalPayrollBenefits: ExternalPayrollBenefits, -): string { - return JSON.stringify( - ExternalPayrollBenefits$outboundSchema.parse(externalPayrollBenefits), - ); +export function benefitsToJSON(benefits: Benefits): string { + return JSON.stringify(Benefits$outboundSchema.parse(benefits)); } -export function externalPayrollBenefitsFromJSON( +export function benefitsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ExternalPayrollBenefits$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExternalPayrollBenefits' from JSON`, + (x) => Benefits$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Benefits' from JSON`, ); } @@ -366,8 +362,7 @@ export const ExternalPayrollItems$inboundSchema: z.ZodType< > = z.object({ employee_uuid: z.string().optional(), earnings: z.array(z.lazy(() => Earnings$inboundSchema)).optional(), - benefits: z.array(z.lazy(() => ExternalPayrollBenefits$inboundSchema)) - .optional(), + benefits: z.array(z.lazy(() => Benefits$inboundSchema)).optional(), taxes: z.array(z.lazy(() => ExternalPayrollTaxes$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { @@ -379,7 +374,7 @@ export const ExternalPayrollItems$inboundSchema: z.ZodType< export type ExternalPayrollItems$Outbound = { employee_uuid?: string | undefined; earnings?: Array | undefined; - benefits?: Array | undefined; + benefits?: Array | undefined; taxes?: Array | undefined; }; @@ -391,8 +386,7 @@ export const ExternalPayrollItems$outboundSchema: z.ZodType< > = z.object({ employeeUuid: z.string().optional(), earnings: z.array(z.lazy(() => Earnings$outboundSchema)).optional(), - benefits: z.array(z.lazy(() => ExternalPayrollBenefits$outboundSchema)) - .optional(), + benefits: z.array(z.lazy(() => Benefits$outboundSchema)).optional(), taxes: z.array(z.lazy(() => ExternalPayrollTaxes$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { diff --git a/gusto_embedded/src/models/components/paymentconfigs.ts b/gusto_embedded/src/models/components/paymentconfigs.ts index 985ee0c0..45afe9e5 100644 --- a/gusto_embedded/src/models/components/paymentconfigs.ts +++ b/gusto_embedded/src/models/components/paymentconfigs.ts @@ -52,6 +52,10 @@ export type PaymentConfigs = { * Payment speed for 1-day, 2-day, 4-day */ paymentSpeed?: string | undefined; + /** + * Whether the company is configured to use the partner-owned disbursement payment rail + */ + partnerOwnedDisbursement?: boolean | undefined; /** * Blockers preventing the company from earning fast ACH payments */ @@ -152,6 +156,7 @@ export const PaymentConfigs$inboundSchema: z.ZodType< partner_uuid: z.string().optional(), fast_payment_limit: z.string().optional(), payment_speed: z.string().optional(), + partner_owned_disbursement: z.boolean().optional(), earned_fast_ach_blockers: z.array( z.lazy(() => EarnedFastAchBlockers$inboundSchema), ).optional(), @@ -161,6 +166,7 @@ export const PaymentConfigs$inboundSchema: z.ZodType< "partner_uuid": "partnerUuid", "fast_payment_limit": "fastPaymentLimit", "payment_speed": "paymentSpeed", + "partner_owned_disbursement": "partnerOwnedDisbursement", "earned_fast_ach_blockers": "earnedFastAchBlockers", }); }); @@ -171,6 +177,7 @@ export type PaymentConfigs$Outbound = { partner_uuid?: string | undefined; fast_payment_limit?: string | undefined; payment_speed?: string | undefined; + partner_owned_disbursement?: boolean | undefined; earned_fast_ach_blockers?: Array | undefined; }; @@ -184,6 +191,7 @@ export const PaymentConfigs$outboundSchema: z.ZodType< partnerUuid: z.string().optional(), fastPaymentLimit: z.string().optional(), paymentSpeed: z.string().optional(), + partnerOwnedDisbursement: z.boolean().optional(), earnedFastAchBlockers: z.array( z.lazy(() => EarnedFastAchBlockers$outboundSchema), ).optional(), @@ -193,6 +201,7 @@ export const PaymentConfigs$outboundSchema: z.ZodType< partnerUuid: "partner_uuid", fastPaymentLimit: "fast_payment_limit", paymentSpeed: "payment_speed", + partnerOwnedDisbursement: "partner_owned_disbursement", earnedFastAchBlockers: "earned_fast_ach_blockers", }); }); diff --git a/gusto_embedded/src/models/components/payroll.ts b/gusto_embedded/src/models/components/payroll.ts index f58191e7..4945007d 100644 --- a/gusto_embedded/src/models/components/payroll.ts +++ b/gusto_embedded/src/models/components/payroll.ts @@ -25,12 +25,6 @@ import { PayrollCreditBlockersType$Outbound, PayrollCreditBlockersType$outboundSchema, } from "./payrollcreditblockerstype.js"; -import { - PayrollEmployeeCompensationsType, - PayrollEmployeeCompensationsType$inboundSchema, - PayrollEmployeeCompensationsType$Outbound, - PayrollEmployeeCompensationsType$outboundSchema, -} from "./payrollemployeecompensationstype.js"; import { PayrollPaymentSpeedChangedType, PayrollPaymentSpeedChangedType$inboundSchema, @@ -147,7 +141,6 @@ export type Payroll = { * The subtotals for the payroll. */ totals?: PayrollTotalsType | undefined; - employeeCompensations?: Array | undefined; /** * An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. */ @@ -198,9 +191,6 @@ export const Payroll$inboundSchema: z.ZodType = pay_period: PayrollPayPeriodType$inboundSchema.optional(), payroll_status_meta: PayrollPayrollStatusMetaType$inboundSchema.optional(), totals: PayrollTotalsType$inboundSchema.optional(), - employee_compensations: z.array( - PayrollEmployeeCompensationsType$inboundSchema, - ).optional(), company_taxes: z.array(PayrollCompanyTaxesType$inboundSchema).optional(), payment_speed_changed: PayrollPaymentSpeedChangedType$inboundSchema .optional(), @@ -231,7 +221,6 @@ export const Payroll$inboundSchema: z.ZodType = "fixed_withholding_rate": "fixedWithholdingRate", "pay_period": "payPeriod", "payroll_status_meta": "payrollStatusMeta", - "employee_compensations": "employeeCompensations", "company_taxes": "companyTaxes", "payment_speed_changed": "paymentSpeedChanged", "created_at": "createdAt", @@ -263,9 +252,6 @@ export type Payroll$Outbound = { pay_period?: PayrollPayPeriodType$Outbound | undefined; payroll_status_meta?: PayrollPayrollStatusMetaType$Outbound | undefined; totals?: PayrollTotalsType$Outbound | undefined; - employee_compensations?: - | Array - | undefined; company_taxes?: Array | undefined; payment_speed_changed?: PayrollPaymentSpeedChangedType$Outbound | undefined; created_at?: string | undefined; @@ -304,9 +290,6 @@ export const Payroll$outboundSchema: z.ZodType< payPeriod: PayrollPayPeriodType$outboundSchema.optional(), payrollStatusMeta: PayrollPayrollStatusMetaType$outboundSchema.optional(), totals: PayrollTotalsType$outboundSchema.optional(), - employeeCompensations: z.array( - PayrollEmployeeCompensationsType$outboundSchema, - ).optional(), companyTaxes: z.array(PayrollCompanyTaxesType$outboundSchema).optional(), paymentSpeedChanged: PayrollPaymentSpeedChangedType$outboundSchema.optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), @@ -333,7 +316,6 @@ export const Payroll$outboundSchema: z.ZodType< fixedWithholdingRate: "fixed_withholding_rate", payPeriod: "pay_period", payrollStatusMeta: "payroll_status_meta", - employeeCompensations: "employee_compensations", companyTaxes: "company_taxes", paymentSpeedChanged: "payment_speed_changed", createdAt: "created_at", diff --git a/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts b/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts index 32c2c33a..b0376620 100644 --- a/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts +++ b/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts @@ -81,24 +81,6 @@ export type PayrollEmployeeCompensationsTypePaidTimeOff = { finalPayoutUnusedHoursInput?: string | undefined; }; -export type Benefits = { - name?: string | undefined; - employeeDeduction?: number | undefined; - companyContribution?: number | undefined; - imputed?: boolean | undefined; -}; - -export type Deductions = { - name?: string | undefined; - amount?: number | undefined; -}; - -export type Taxes = { - name: string; - employer: boolean; - amount: number; -}; - export type PayrollEmployeeCompensationsType = { /** * The UUID of the employee. @@ -147,18 +129,6 @@ export type PayrollEmployeeCompensationsType = { * An array of all paid time off the employee is eligible for this pay period. */ paidTimeOff?: Array | undefined; - /** - * An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. - */ - benefits?: Array | undefined; - /** - * An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. - */ - deductions?: Array | undefined; - /** - * An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. - */ - taxes?: Array | undefined; }; /** @internal */ @@ -414,181 +384,6 @@ export function payrollEmployeeCompensationsTypePaidTimeOffFromJSON( ); } -/** @internal */ -export const Benefits$inboundSchema: z.ZodType< - Benefits, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - employee_deduction: z.number().optional(), - company_contribution: z.number().optional(), - imputed: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "employee_deduction": "employeeDeduction", - "company_contribution": "companyContribution", - }); -}); - -/** @internal */ -export type Benefits$Outbound = { - name?: string | undefined; - employee_deduction?: number | undefined; - company_contribution?: number | undefined; - imputed?: boolean | undefined; -}; - -/** @internal */ -export const Benefits$outboundSchema: z.ZodType< - Benefits$Outbound, - z.ZodTypeDef, - Benefits -> = z.object({ - name: z.string().optional(), - employeeDeduction: z.number().optional(), - companyContribution: z.number().optional(), - imputed: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - employeeDeduction: "employee_deduction", - companyContribution: "company_contribution", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Benefits$ { - /** @deprecated use `Benefits$inboundSchema` instead. */ - export const inboundSchema = Benefits$inboundSchema; - /** @deprecated use `Benefits$outboundSchema` instead. */ - export const outboundSchema = Benefits$outboundSchema; - /** @deprecated use `Benefits$Outbound` instead. */ - export type Outbound = Benefits$Outbound; -} - -export function benefitsToJSON(benefits: Benefits): string { - return JSON.stringify(Benefits$outboundSchema.parse(benefits)); -} - -export function benefitsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Benefits$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Benefits' from JSON`, - ); -} - -/** @internal */ -export const Deductions$inboundSchema: z.ZodType< - Deductions, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - amount: z.number().optional(), -}); - -/** @internal */ -export type Deductions$Outbound = { - name?: string | undefined; - amount?: number | undefined; -}; - -/** @internal */ -export const Deductions$outboundSchema: z.ZodType< - Deductions$Outbound, - z.ZodTypeDef, - Deductions -> = z.object({ - name: z.string().optional(), - amount: z.number().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Deductions$ { - /** @deprecated use `Deductions$inboundSchema` instead. */ - export const inboundSchema = Deductions$inboundSchema; - /** @deprecated use `Deductions$outboundSchema` instead. */ - export const outboundSchema = Deductions$outboundSchema; - /** @deprecated use `Deductions$Outbound` instead. */ - export type Outbound = Deductions$Outbound; -} - -export function deductionsToJSON(deductions: Deductions): string { - return JSON.stringify(Deductions$outboundSchema.parse(deductions)); -} - -export function deductionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Deductions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Deductions' from JSON`, - ); -} - -/** @internal */ -export const Taxes$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - employer: z.boolean(), - amount: z.number(), - }); - -/** @internal */ -export type Taxes$Outbound = { - name: string; - employer: boolean; - amount: number; -}; - -/** @internal */ -export const Taxes$outboundSchema: z.ZodType< - Taxes$Outbound, - z.ZodTypeDef, - Taxes -> = z.object({ - name: z.string(), - employer: z.boolean(), - amount: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Taxes$ { - /** @deprecated use `Taxes$inboundSchema` instead. */ - export const inboundSchema = Taxes$inboundSchema; - /** @deprecated use `Taxes$outboundSchema` instead. */ - export const outboundSchema = Taxes$outboundSchema; - /** @deprecated use `Taxes$Outbound` instead. */ - export type Outbound = Taxes$Outbound; -} - -export function taxesToJSON(taxes: Taxes): string { - return JSON.stringify(Taxes$outboundSchema.parse(taxes)); -} - -export function taxesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Taxes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Taxes' from JSON`, - ); -} - /** @internal */ export const PayrollEmployeeCompensationsType$inboundSchema: z.ZodType< PayrollEmployeeCompensationsType, @@ -612,9 +407,6 @@ export const PayrollEmployeeCompensationsType$inboundSchema: z.ZodType< paid_time_off: z.array( z.lazy(() => PayrollEmployeeCompensationsTypePaidTimeOff$inboundSchema), ).optional(), - benefits: z.array(z.lazy(() => Benefits$inboundSchema)).optional(), - deductions: z.array(z.lazy(() => Deductions$inboundSchema)).optional(), - taxes: z.array(z.lazy(() => Taxes$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", @@ -643,9 +435,6 @@ export type PayrollEmployeeCompensationsType$Outbound = { paid_time_off?: | Array | undefined; - benefits?: Array | undefined; - deductions?: Array | undefined; - taxes?: Array | undefined; }; /** @internal */ @@ -671,9 +460,6 @@ export const PayrollEmployeeCompensationsType$outboundSchema: z.ZodType< paidTimeOff: z.array( z.lazy(() => PayrollEmployeeCompensationsTypePaidTimeOff$outboundSchema), ).optional(), - benefits: z.array(z.lazy(() => Benefits$outboundSchema)).optional(), - deductions: z.array(z.lazy(() => Deductions$outboundSchema)).optional(), - taxes: z.array(z.lazy(() => Taxes$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { employeeUuid: "employee_uuid", diff --git a/gusto_embedded/src/models/components/payrollreceipt.ts b/gusto_embedded/src/models/components/payrollreceipt.ts index c97ae6c1..59fc7283 100644 --- a/gusto_embedded/src/models/components/payrollreceipt.ts +++ b/gusto_embedded/src/models/components/payrollreceipt.ts @@ -35,7 +35,7 @@ export type Totals = { taxDebit?: string | undefined; }; -export type PayrollReceiptTaxes = { +export type Taxes = { /** * The amount paid for this tax. */ @@ -171,7 +171,7 @@ export type PayrollReceipt = { /** * An array of totaled employer and employee taxes for the pay period. */ - taxes?: Array | undefined; + taxes?: Array | undefined; /** * An array of employee compensations and withholdings for this payroll */ @@ -260,26 +260,23 @@ export function totalsFromJSON( } /** @internal */ -export const PayrollReceiptTaxes$inboundSchema: z.ZodType< - PayrollReceiptTaxes, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - amount: z.string().optional(), -}); +export const Taxes$inboundSchema: z.ZodType = z + .object({ + name: z.string().optional(), + amount: z.string().optional(), + }); /** @internal */ -export type PayrollReceiptTaxes$Outbound = { +export type Taxes$Outbound = { name?: string | undefined; amount?: string | undefined; }; /** @internal */ -export const PayrollReceiptTaxes$outboundSchema: z.ZodType< - PayrollReceiptTaxes$Outbound, +export const Taxes$outboundSchema: z.ZodType< + Taxes$Outbound, z.ZodTypeDef, - PayrollReceiptTaxes + Taxes > = z.object({ name: z.string().optional(), amount: z.string().optional(), @@ -289,30 +286,26 @@ export const PayrollReceiptTaxes$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PayrollReceiptTaxes$ { - /** @deprecated use `PayrollReceiptTaxes$inboundSchema` instead. */ - export const inboundSchema = PayrollReceiptTaxes$inboundSchema; - /** @deprecated use `PayrollReceiptTaxes$outboundSchema` instead. */ - export const outboundSchema = PayrollReceiptTaxes$outboundSchema; - /** @deprecated use `PayrollReceiptTaxes$Outbound` instead. */ - export type Outbound = PayrollReceiptTaxes$Outbound; +export namespace Taxes$ { + /** @deprecated use `Taxes$inboundSchema` instead. */ + export const inboundSchema = Taxes$inboundSchema; + /** @deprecated use `Taxes$outboundSchema` instead. */ + export const outboundSchema = Taxes$outboundSchema; + /** @deprecated use `Taxes$Outbound` instead. */ + export type Outbound = Taxes$Outbound; } -export function payrollReceiptTaxesToJSON( - payrollReceiptTaxes: PayrollReceiptTaxes, -): string { - return JSON.stringify( - PayrollReceiptTaxes$outboundSchema.parse(payrollReceiptTaxes), - ); +export function taxesToJSON(taxes: Taxes): string { + return JSON.stringify(Taxes$outboundSchema.parse(taxes)); } -export function payrollReceiptTaxesFromJSON( +export function taxesFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => PayrollReceiptTaxes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PayrollReceiptTaxes' from JSON`, + (x) => Taxes$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Taxes' from JSON`, ); } @@ -536,7 +529,7 @@ export const PayrollReceipt$inboundSchema: z.ZodType< right_to_refund: z.string().optional(), liability_of_licensee: z.string().optional(), totals: z.lazy(() => Totals$inboundSchema).optional(), - taxes: z.array(z.lazy(() => PayrollReceiptTaxes$inboundSchema)).optional(), + taxes: z.array(z.lazy(() => Taxes$inboundSchema)).optional(), employee_compensations: z.array( z.lazy(() => PayrollReceiptEmployeeCompensations$inboundSchema), ).optional(), @@ -569,7 +562,7 @@ export type PayrollReceipt$Outbound = { right_to_refund?: string | undefined; liability_of_licensee?: string | undefined; totals?: Totals$Outbound | undefined; - taxes?: Array | undefined; + taxes?: Array | undefined; employee_compensations?: | Array | undefined; @@ -593,7 +586,7 @@ export const PayrollReceipt$outboundSchema: z.ZodType< rightToRefund: z.string().optional(), liabilityOfLicensee: z.string().optional(), totals: z.lazy(() => Totals$outboundSchema).optional(), - taxes: z.array(z.lazy(() => PayrollReceiptTaxes$outboundSchema)).optional(), + taxes: z.array(z.lazy(() => Taxes$outboundSchema)).optional(), employeeCompensations: z.array( z.lazy(() => PayrollReceiptEmployeeCompensations$outboundSchema), ).optional(), diff --git a/gusto_embedded/src/models/components/payrollshow.ts b/gusto_embedded/src/models/components/payrollshow.ts new file mode 100644 index 00000000..33bf2b4e --- /dev/null +++ b/gusto_embedded/src/models/components/payrollshow.ts @@ -0,0 +1,1073 @@ +/* + * 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 { RFCDate } from "../../types/rfcdate.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OffCycleReasonType, + OffCycleReasonType$inboundSchema, + OffCycleReasonType$outboundSchema, +} from "./offcyclereasontype.js"; +import { + PayrollCompanyTaxesType, + PayrollCompanyTaxesType$inboundSchema, + PayrollCompanyTaxesType$Outbound, + PayrollCompanyTaxesType$outboundSchema, +} from "./payrollcompanytaxestype.js"; +import { + PayrollCreditBlockersType, + PayrollCreditBlockersType$inboundSchema, + PayrollCreditBlockersType$Outbound, + PayrollCreditBlockersType$outboundSchema, +} from "./payrollcreditblockerstype.js"; +import { + PayrollPaymentSpeedChangedType, + PayrollPaymentSpeedChangedType$inboundSchema, + PayrollPaymentSpeedChangedType$Outbound, + PayrollPaymentSpeedChangedType$outboundSchema, +} from "./payrollpaymentspeedchangedtype.js"; +import { + PayrollPayPeriodType, + PayrollPayPeriodType$inboundSchema, + PayrollPayPeriodType$Outbound, + PayrollPayPeriodType$outboundSchema, +} from "./payrollpayperiodtype.js"; +import { + PayrollPayrollStatusMetaType, + PayrollPayrollStatusMetaType$inboundSchema, + PayrollPayrollStatusMetaType$Outbound, + PayrollPayrollStatusMetaType$outboundSchema, +} from "./payrollpayrollstatusmetatype.js"; +import { + PayrollProcessingRequest, + PayrollProcessingRequest$inboundSchema, + PayrollProcessingRequest$Outbound, + PayrollProcessingRequest$outboundSchema, +} from "./payrollprocessingrequest.js"; +import { + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersType$inboundSchema, + PayrollSubmissionBlockersType$Outbound, + PayrollSubmissionBlockersType$outboundSchema, +} from "./payrollsubmissionblockerstype.js"; +import { + PayrollTotalsType, + PayrollTotalsType$inboundSchema, + PayrollTotalsType$Outbound, + PayrollTotalsType$outboundSchema, +} from "./payrolltotalstype.js"; +import { + PayrollWithholdingPayPeriodType, + PayrollWithholdingPayPeriodType$inboundSchema, + PayrollWithholdingPayPeriodType$outboundSchema, +} from "./payrollwithholdingpayperiodtype.js"; + +/** + * The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + */ +export const PayrollShowPaymentMethod = { + DirectDeposit: "Direct Deposit", + Check: "Check", + Historical: "Historical", +} as const; +/** + * The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + */ +export type PayrollShowPaymentMethod = ClosedEnum< + typeof PayrollShowPaymentMethod +>; + +export type PayrollShowFixedCompensations = { + /** + * The name of the compensation. This also serves as the unique, immutable identifier for this compensation. + */ + name?: string | undefined; + /** + * The amount of the compensation for the pay period. + */ + amount?: string | undefined; + /** + * The UUID of the job for the compensation. + */ + jobUuid?: string | undefined; +}; + +export type PayrollShowHourlyCompensations = { + /** + * The name of the compensation. This also serves as the unique, immutable identifier for this compensation. + */ + name?: string | undefined; + /** + * The number of hours to be compensated for this pay period. + */ + hours?: string | undefined; + /** + * The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations. + */ + amount?: string | undefined; + /** + * The UUID of the job for the compensation. + */ + jobUuid?: string | undefined; + /** + * The amount multiplied by the base rate to calculate total compensation per hour worked. + */ + compensationMultiplier?: number | undefined; + /** + * The FLSA Status of the employee's primary job compensation + */ + flsaStatus?: string | undefined; +}; + +export type PayrollShowPaidTimeOff = { + /** + * The name of the PTO. This also serves as the unique, immutable identifier for the PTO. + */ + name?: string | undefined; + /** + * The hours of this PTO taken during the pay period. + */ + hours?: string | undefined; + /** + * The outstanding hours paid upon termination. This field is only applicable for termination payrolls. + */ + finalPayoutUnusedHoursInput?: string | undefined; +}; + +export type PayrollShowTaxes = { + name: string; + employer: boolean; + amount: number; +}; + +export type PayrollShowBenefits = { + name?: string | undefined; + employeeDeduction?: number | undefined; + companyContribution?: number | undefined; + imputed?: boolean | undefined; +}; + +export type Deductions = { + name?: string | undefined; + amount?: number | undefined; +}; + +export type EmployeeCompensations = { + /** + * The UUID of the employee. + */ + employeeUuid?: string | undefined; + /** + * This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. + */ + excluded?: boolean | undefined; + /** + * The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. + */ + version?: string | undefined; + /** + * The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. + */ + grossPay?: number | null | undefined; + /** + * The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. + */ + netPay?: number | null | undefined; + /** + * The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. + */ + checkAmount?: number | null | undefined; + /** + * The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + */ + paymentMethod?: PayrollShowPaymentMethod | null | undefined; + /** + * Custom text that will be printed as a personal note to the employee on a paystub. + */ + memo?: string | null | undefined; + /** + * An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. + */ + fixedCompensations?: Array | undefined; + /** + * An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. + */ + hourlyCompensations?: Array | undefined; + /** + * An array of all paid time off the employee is eligible for this pay period. + */ + paidTimeOff?: Array | undefined; + /** + * An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. + */ + taxes?: Array | undefined; + /** + * An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. + */ + benefits?: Array | undefined; + /** + * An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. + */ + deductions?: Array | undefined; +}; + +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; + /** + * The date on which employees will be paid for the payroll. + */ + checkDate?: string | undefined; + /** + * 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. + */ + processed?: boolean | undefined; + /** + * The date at which the payroll was processed. Null if the payroll isn't processed yet. + */ + processedDate?: string | null | undefined; + /** + * A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. + */ + calculatedAt?: string | null | undefined; + /** + * The UUID of the payroll. + */ + uuid?: string | undefined; + /** + * The UUID of the payroll. + */ + payrollUuid?: string | undefined; + /** + * The UUID of the company for the payroll. + */ + companyUuid?: string | undefined; + /** + * Indicates whether the payroll is an off-cycle payroll + */ + offCycle?: boolean | undefined; + /** + * The off-cycle reason. Only included for off-cycle payrolls. + */ + offCycleReason?: OffCycleReasonType | null | undefined; + /** + * Indicates whether the payroll is an auto pilot payroll + */ + autoPilot?: boolean | undefined; + /** + * Indicates whether the payroll is an external payroll + */ + external?: boolean | undefined; + /** + * Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls. + */ + finalTerminationPayroll?: boolean | undefined; + /** + * The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls. + */ + withholdingPayPeriod?: PayrollWithholdingPayPeriodType | undefined; + /** + * Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls. + */ + skipRegularDeductions?: boolean | undefined; + /** + * Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls. + */ + fixedWithholdingRate?: boolean | undefined; + payPeriod?: PayrollPayPeriodType | undefined; + /** + * Information about the payroll's status and expected dates + */ + payrollStatusMeta?: PayrollPayrollStatusMetaType | undefined; + /** + * The subtotals for the payroll. + */ + totals?: PayrollTotalsType | undefined; + /** + * An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. + */ + companyTaxes?: Array | undefined; + /** + * Only applicable when a payroll is moved to four day processing instead of fast ach. + */ + paymentSpeedChanged?: PayrollPaymentSpeedChangedType | undefined; + /** + * Datetime for when the resource was created. + */ + createdAt?: Date | undefined; + /** + * Only included for processed or calculated payrolls + */ + submissionBlockers?: Array | undefined; + /** + * Only included for processed payrolls + */ + creditBlockers?: Array | undefined; + processingRequest?: PayrollProcessingRequest | null | undefined; + /** + * Will money movement for the payroll be performed by the partner rather than by Gusto? + */ + partnerOwnedDisbursement?: boolean | null | undefined; + employeeCompensations?: Array | undefined; +}; + +/** @internal */ +export const PayrollShowPaymentMethod$inboundSchema: z.ZodNativeEnum< + typeof PayrollShowPaymentMethod +> = z.nativeEnum(PayrollShowPaymentMethod); + +/** @internal */ +export const PayrollShowPaymentMethod$outboundSchema: z.ZodNativeEnum< + typeof PayrollShowPaymentMethod +> = PayrollShowPaymentMethod$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowPaymentMethod$ { + /** @deprecated use `PayrollShowPaymentMethod$inboundSchema` instead. */ + export const inboundSchema = PayrollShowPaymentMethod$inboundSchema; + /** @deprecated use `PayrollShowPaymentMethod$outboundSchema` instead. */ + export const outboundSchema = PayrollShowPaymentMethod$outboundSchema; +} + +/** @internal */ +export const PayrollShowFixedCompensations$inboundSchema: z.ZodType< + PayrollShowFixedCompensations, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + amount: z.string().optional(), + job_uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "job_uuid": "jobUuid", + }); +}); + +/** @internal */ +export type PayrollShowFixedCompensations$Outbound = { + name?: string | undefined; + amount?: string | undefined; + job_uuid?: string | undefined; +}; + +/** @internal */ +export const PayrollShowFixedCompensations$outboundSchema: z.ZodType< + PayrollShowFixedCompensations$Outbound, + z.ZodTypeDef, + PayrollShowFixedCompensations +> = z.object({ + name: z.string().optional(), + amount: z.string().optional(), + jobUuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + jobUuid: "job_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowFixedCompensations$ { + /** @deprecated use `PayrollShowFixedCompensations$inboundSchema` instead. */ + export const inboundSchema = PayrollShowFixedCompensations$inboundSchema; + /** @deprecated use `PayrollShowFixedCompensations$outboundSchema` instead. */ + export const outboundSchema = PayrollShowFixedCompensations$outboundSchema; + /** @deprecated use `PayrollShowFixedCompensations$Outbound` instead. */ + export type Outbound = PayrollShowFixedCompensations$Outbound; +} + +export function payrollShowFixedCompensationsToJSON( + payrollShowFixedCompensations: PayrollShowFixedCompensations, +): string { + return JSON.stringify( + PayrollShowFixedCompensations$outboundSchema.parse( + payrollShowFixedCompensations, + ), + ); +} + +export function payrollShowFixedCompensationsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowFixedCompensations$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowFixedCompensations' from JSON`, + ); +} + +/** @internal */ +export const PayrollShowHourlyCompensations$inboundSchema: z.ZodType< + PayrollShowHourlyCompensations, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + hours: z.string().optional(), + amount: z.string().optional(), + job_uuid: z.string().optional(), + compensation_multiplier: z.number().optional(), + flsa_status: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "job_uuid": "jobUuid", + "compensation_multiplier": "compensationMultiplier", + "flsa_status": "flsaStatus", + }); +}); + +/** @internal */ +export type PayrollShowHourlyCompensations$Outbound = { + name?: string | undefined; + hours?: string | undefined; + amount?: string | undefined; + job_uuid?: string | undefined; + compensation_multiplier?: number | undefined; + flsa_status?: string | undefined; +}; + +/** @internal */ +export const PayrollShowHourlyCompensations$outboundSchema: z.ZodType< + PayrollShowHourlyCompensations$Outbound, + z.ZodTypeDef, + PayrollShowHourlyCompensations +> = z.object({ + name: z.string().optional(), + hours: z.string().optional(), + amount: z.string().optional(), + jobUuid: z.string().optional(), + compensationMultiplier: z.number().optional(), + flsaStatus: z.string().optional(), +}).transform((v) => { + return remap$(v, { + jobUuid: "job_uuid", + compensationMultiplier: "compensation_multiplier", + flsaStatus: "flsa_status", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowHourlyCompensations$ { + /** @deprecated use `PayrollShowHourlyCompensations$inboundSchema` instead. */ + export const inboundSchema = PayrollShowHourlyCompensations$inboundSchema; + /** @deprecated use `PayrollShowHourlyCompensations$outboundSchema` instead. */ + export const outboundSchema = PayrollShowHourlyCompensations$outboundSchema; + /** @deprecated use `PayrollShowHourlyCompensations$Outbound` instead. */ + export type Outbound = PayrollShowHourlyCompensations$Outbound; +} + +export function payrollShowHourlyCompensationsToJSON( + payrollShowHourlyCompensations: PayrollShowHourlyCompensations, +): string { + return JSON.stringify( + PayrollShowHourlyCompensations$outboundSchema.parse( + payrollShowHourlyCompensations, + ), + ); +} + +export function payrollShowHourlyCompensationsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowHourlyCompensations$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowHourlyCompensations' from JSON`, + ); +} + +/** @internal */ +export const PayrollShowPaidTimeOff$inboundSchema: z.ZodType< + PayrollShowPaidTimeOff, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + hours: z.string().optional(), + final_payout_unused_hours_input: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "final_payout_unused_hours_input": "finalPayoutUnusedHoursInput", + }); +}); + +/** @internal */ +export type PayrollShowPaidTimeOff$Outbound = { + name?: string | undefined; + hours?: string | undefined; + final_payout_unused_hours_input?: string | undefined; +}; + +/** @internal */ +export const PayrollShowPaidTimeOff$outboundSchema: z.ZodType< + PayrollShowPaidTimeOff$Outbound, + z.ZodTypeDef, + PayrollShowPaidTimeOff +> = z.object({ + name: z.string().optional(), + hours: z.string().optional(), + finalPayoutUnusedHoursInput: z.string().optional(), +}).transform((v) => { + return remap$(v, { + finalPayoutUnusedHoursInput: "final_payout_unused_hours_input", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowPaidTimeOff$ { + /** @deprecated use `PayrollShowPaidTimeOff$inboundSchema` instead. */ + export const inboundSchema = PayrollShowPaidTimeOff$inboundSchema; + /** @deprecated use `PayrollShowPaidTimeOff$outboundSchema` instead. */ + export const outboundSchema = PayrollShowPaidTimeOff$outboundSchema; + /** @deprecated use `PayrollShowPaidTimeOff$Outbound` instead. */ + export type Outbound = PayrollShowPaidTimeOff$Outbound; +} + +export function payrollShowPaidTimeOffToJSON( + payrollShowPaidTimeOff: PayrollShowPaidTimeOff, +): string { + return JSON.stringify( + PayrollShowPaidTimeOff$outboundSchema.parse(payrollShowPaidTimeOff), + ); +} + +export function payrollShowPaidTimeOffFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowPaidTimeOff$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowPaidTimeOff' from JSON`, + ); +} + +/** @internal */ +export const PayrollShowTaxes$inboundSchema: z.ZodType< + PayrollShowTaxes, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + employer: z.boolean(), + amount: z.number(), +}); + +/** @internal */ +export type PayrollShowTaxes$Outbound = { + name: string; + employer: boolean; + amount: number; +}; + +/** @internal */ +export const PayrollShowTaxes$outboundSchema: z.ZodType< + PayrollShowTaxes$Outbound, + z.ZodTypeDef, + PayrollShowTaxes +> = z.object({ + name: z.string(), + employer: z.boolean(), + amount: z.number(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowTaxes$ { + /** @deprecated use `PayrollShowTaxes$inboundSchema` instead. */ + export const inboundSchema = PayrollShowTaxes$inboundSchema; + /** @deprecated use `PayrollShowTaxes$outboundSchema` instead. */ + export const outboundSchema = PayrollShowTaxes$outboundSchema; + /** @deprecated use `PayrollShowTaxes$Outbound` instead. */ + export type Outbound = PayrollShowTaxes$Outbound; +} + +export function payrollShowTaxesToJSON( + payrollShowTaxes: PayrollShowTaxes, +): string { + return JSON.stringify( + PayrollShowTaxes$outboundSchema.parse(payrollShowTaxes), + ); +} + +export function payrollShowTaxesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowTaxes$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowTaxes' from JSON`, + ); +} + +/** @internal */ +export const PayrollShowBenefits$inboundSchema: z.ZodType< + PayrollShowBenefits, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + employee_deduction: z.number().optional(), + company_contribution: z.number().optional(), + imputed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "employee_deduction": "employeeDeduction", + "company_contribution": "companyContribution", + }); +}); + +/** @internal */ +export type PayrollShowBenefits$Outbound = { + name?: string | undefined; + employee_deduction?: number | undefined; + company_contribution?: number | undefined; + imputed?: boolean | undefined; +}; + +/** @internal */ +export const PayrollShowBenefits$outboundSchema: z.ZodType< + PayrollShowBenefits$Outbound, + z.ZodTypeDef, + PayrollShowBenefits +> = z.object({ + name: z.string().optional(), + employeeDeduction: z.number().optional(), + companyContribution: z.number().optional(), + imputed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + employeeDeduction: "employee_deduction", + companyContribution: "company_contribution", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowBenefits$ { + /** @deprecated use `PayrollShowBenefits$inboundSchema` instead. */ + export const inboundSchema = PayrollShowBenefits$inboundSchema; + /** @deprecated use `PayrollShowBenefits$outboundSchema` instead. */ + export const outboundSchema = PayrollShowBenefits$outboundSchema; + /** @deprecated use `PayrollShowBenefits$Outbound` instead. */ + export type Outbound = PayrollShowBenefits$Outbound; +} + +export function payrollShowBenefitsToJSON( + payrollShowBenefits: PayrollShowBenefits, +): string { + return JSON.stringify( + PayrollShowBenefits$outboundSchema.parse(payrollShowBenefits), + ); +} + +export function payrollShowBenefitsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowBenefits$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowBenefits' from JSON`, + ); +} + +/** @internal */ +export const Deductions$inboundSchema: z.ZodType< + Deductions, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), +}); + +/** @internal */ +export type Deductions$Outbound = { + name?: string | undefined; + amount?: number | undefined; +}; + +/** @internal */ +export const Deductions$outboundSchema: z.ZodType< + Deductions$Outbound, + z.ZodTypeDef, + Deductions +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Deductions$ { + /** @deprecated use `Deductions$inboundSchema` instead. */ + export const inboundSchema = Deductions$inboundSchema; + /** @deprecated use `Deductions$outboundSchema` instead. */ + export const outboundSchema = Deductions$outboundSchema; + /** @deprecated use `Deductions$Outbound` instead. */ + export type Outbound = Deductions$Outbound; +} + +export function deductionsToJSON(deductions: Deductions): string { + return JSON.stringify(Deductions$outboundSchema.parse(deductions)); +} + +export function deductionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Deductions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Deductions' from JSON`, + ); +} + +/** @internal */ +export const EmployeeCompensations$inboundSchema: z.ZodType< + EmployeeCompensations, + z.ZodTypeDef, + unknown +> = z.object({ + employee_uuid: z.string().optional(), + excluded: z.boolean().optional(), + version: z.string().optional(), + gross_pay: z.nullable(z.number()).optional(), + net_pay: z.nullable(z.number()).optional(), + check_amount: z.nullable(z.number()).optional(), + payment_method: z.nullable(PayrollShowPaymentMethod$inboundSchema).optional(), + memo: z.nullable(z.string()).optional(), + fixed_compensations: z.array( + z.lazy(() => PayrollShowFixedCompensations$inboundSchema), + ).optional(), + hourly_compensations: z.array( + z.lazy(() => PayrollShowHourlyCompensations$inboundSchema), + ).optional(), + paid_time_off: z.array(z.lazy(() => PayrollShowPaidTimeOff$inboundSchema)) + .optional(), + taxes: z.array(z.lazy(() => PayrollShowTaxes$inboundSchema)).optional(), + benefits: z.array(z.lazy(() => PayrollShowBenefits$inboundSchema)).optional(), + deductions: z.array(z.lazy(() => Deductions$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "employee_uuid": "employeeUuid", + "gross_pay": "grossPay", + "net_pay": "netPay", + "check_amount": "checkAmount", + "payment_method": "paymentMethod", + "fixed_compensations": "fixedCompensations", + "hourly_compensations": "hourlyCompensations", + "paid_time_off": "paidTimeOff", + }); +}); + +/** @internal */ +export type EmployeeCompensations$Outbound = { + employee_uuid?: string | undefined; + excluded?: boolean | undefined; + version?: string | undefined; + gross_pay?: number | null | undefined; + net_pay?: number | null | undefined; + check_amount?: number | null | undefined; + payment_method?: string | null | undefined; + memo?: string | null | undefined; + fixed_compensations?: + | Array + | undefined; + hourly_compensations?: + | Array + | undefined; + paid_time_off?: Array | undefined; + taxes?: Array | undefined; + benefits?: Array | undefined; + deductions?: Array | undefined; +}; + +/** @internal */ +export const EmployeeCompensations$outboundSchema: z.ZodType< + EmployeeCompensations$Outbound, + z.ZodTypeDef, + EmployeeCompensations +> = z.object({ + employeeUuid: z.string().optional(), + excluded: z.boolean().optional(), + version: z.string().optional(), + grossPay: z.nullable(z.number()).optional(), + netPay: z.nullable(z.number()).optional(), + checkAmount: z.nullable(z.number()).optional(), + paymentMethod: z.nullable(PayrollShowPaymentMethod$outboundSchema).optional(), + memo: z.nullable(z.string()).optional(), + fixedCompensations: z.array( + z.lazy(() => PayrollShowFixedCompensations$outboundSchema), + ).optional(), + hourlyCompensations: z.array( + z.lazy(() => PayrollShowHourlyCompensations$outboundSchema), + ).optional(), + paidTimeOff: z.array(z.lazy(() => PayrollShowPaidTimeOff$outboundSchema)) + .optional(), + taxes: z.array(z.lazy(() => PayrollShowTaxes$outboundSchema)).optional(), + benefits: z.array(z.lazy(() => PayrollShowBenefits$outboundSchema)) + .optional(), + deductions: z.array(z.lazy(() => Deductions$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + employeeUuid: "employee_uuid", + grossPay: "gross_pay", + netPay: "net_pay", + checkAmount: "check_amount", + paymentMethod: "payment_method", + fixedCompensations: "fixed_compensations", + hourlyCompensations: "hourly_compensations", + paidTimeOff: "paid_time_off", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EmployeeCompensations$ { + /** @deprecated use `EmployeeCompensations$inboundSchema` instead. */ + export const inboundSchema = EmployeeCompensations$inboundSchema; + /** @deprecated use `EmployeeCompensations$outboundSchema` instead. */ + export const outboundSchema = EmployeeCompensations$outboundSchema; + /** @deprecated use `EmployeeCompensations$Outbound` instead. */ + export type Outbound = EmployeeCompensations$Outbound; +} + +export function employeeCompensationsToJSON( + employeeCompensations: EmployeeCompensations, +): string { + return JSON.stringify( + EmployeeCompensations$outboundSchema.parse(employeeCompensations), + ); +} + +export function employeeCompensationsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EmployeeCompensations$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EmployeeCompensations' from JSON`, + ); +} + +/** @internal */ +export const PayrollShow$inboundSchema: z.ZodType< + PayrollShow, + z.ZodTypeDef, + unknown +> = z.object({ + payroll_deadline: z.string().transform(v => new RFCDate(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(), + uuid: z.string().optional(), + payroll_uuid: z.string().optional(), + company_uuid: z.string().optional(), + off_cycle: z.boolean().optional(), + off_cycle_reason: z.nullable(OffCycleReasonType$inboundSchema).optional(), + auto_pilot: z.boolean().optional(), + external: z.boolean().optional(), + final_termination_payroll: z.boolean().optional(), + withholding_pay_period: PayrollWithholdingPayPeriodType$inboundSchema + .optional(), + skip_regular_deductions: z.boolean().optional(), + fixed_withholding_rate: z.boolean().optional(), + pay_period: PayrollPayPeriodType$inboundSchema.optional(), + payroll_status_meta: PayrollPayrollStatusMetaType$inboundSchema.optional(), + totals: PayrollTotalsType$inboundSchema.optional(), + company_taxes: z.array(PayrollCompanyTaxesType$inboundSchema).optional(), + payment_speed_changed: PayrollPaymentSpeedChangedType$inboundSchema + .optional(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + submission_blockers: z.array(PayrollSubmissionBlockersType$inboundSchema) + .optional(), + credit_blockers: z.array(PayrollCreditBlockersType$inboundSchema).optional(), + processing_request: z.nullable(PayrollProcessingRequest$inboundSchema) + .optional(), + partner_owned_disbursement: z.nullable(z.boolean()).optional(), + employee_compensations: z.array( + z.lazy(() => EmployeeCompensations$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "payroll_deadline": "payrollDeadline", + "check_date": "checkDate", + "processed_date": "processedDate", + "calculated_at": "calculatedAt", + "payroll_uuid": "payrollUuid", + "company_uuid": "companyUuid", + "off_cycle": "offCycle", + "off_cycle_reason": "offCycleReason", + "auto_pilot": "autoPilot", + "final_termination_payroll": "finalTerminationPayroll", + "withholding_pay_period": "withholdingPayPeriod", + "skip_regular_deductions": "skipRegularDeductions", + "fixed_withholding_rate": "fixedWithholdingRate", + "pay_period": "payPeriod", + "payroll_status_meta": "payrollStatusMeta", + "company_taxes": "companyTaxes", + "payment_speed_changed": "paymentSpeedChanged", + "created_at": "createdAt", + "submission_blockers": "submissionBlockers", + "credit_blockers": "creditBlockers", + "processing_request": "processingRequest", + "partner_owned_disbursement": "partnerOwnedDisbursement", + "employee_compensations": "employeeCompensations", + }); +}); + +/** @internal */ +export type PayrollShow$Outbound = { + payroll_deadline?: string | undefined; + check_date?: string | undefined; + processed?: boolean | undefined; + processed_date?: string | null | undefined; + calculated_at?: string | null | undefined; + uuid?: string | undefined; + payroll_uuid?: string | undefined; + company_uuid?: string | undefined; + off_cycle?: boolean | undefined; + off_cycle_reason?: string | null | undefined; + auto_pilot?: boolean | undefined; + external?: boolean | undefined; + final_termination_payroll?: boolean | undefined; + withholding_pay_period?: string | undefined; + skip_regular_deductions?: boolean | undefined; + fixed_withholding_rate?: boolean | undefined; + pay_period?: PayrollPayPeriodType$Outbound | undefined; + payroll_status_meta?: PayrollPayrollStatusMetaType$Outbound | undefined; + totals?: PayrollTotalsType$Outbound | undefined; + company_taxes?: Array | undefined; + payment_speed_changed?: PayrollPaymentSpeedChangedType$Outbound | undefined; + created_at?: string | undefined; + submission_blockers?: + | Array + | undefined; + credit_blockers?: Array | undefined; + processing_request?: PayrollProcessingRequest$Outbound | null | undefined; + partner_owned_disbursement?: boolean | null | undefined; + employee_compensations?: Array | undefined; +}; + +/** @internal */ +export const PayrollShow$outboundSchema: z.ZodType< + PayrollShow$Outbound, + z.ZodTypeDef, + PayrollShow +> = z.object({ + payrollDeadline: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + checkDate: z.string().optional(), + processed: z.boolean().optional(), + processedDate: z.nullable(z.string()).optional(), + calculatedAt: z.nullable(z.string()).optional(), + uuid: z.string().optional(), + payrollUuid: z.string().optional(), + companyUuid: z.string().optional(), + offCycle: z.boolean().optional(), + offCycleReason: z.nullable(OffCycleReasonType$outboundSchema).optional(), + autoPilot: z.boolean().optional(), + external: z.boolean().optional(), + finalTerminationPayroll: z.boolean().optional(), + withholdingPayPeriod: PayrollWithholdingPayPeriodType$outboundSchema + .optional(), + skipRegularDeductions: z.boolean().optional(), + fixedWithholdingRate: z.boolean().optional(), + payPeriod: PayrollPayPeriodType$outboundSchema.optional(), + payrollStatusMeta: PayrollPayrollStatusMetaType$outboundSchema.optional(), + totals: PayrollTotalsType$outboundSchema.optional(), + companyTaxes: z.array(PayrollCompanyTaxesType$outboundSchema).optional(), + paymentSpeedChanged: PayrollPaymentSpeedChangedType$outboundSchema.optional(), + createdAt: z.date().transform(v => v.toISOString()).optional(), + submissionBlockers: z.array(PayrollSubmissionBlockersType$outboundSchema) + .optional(), + creditBlockers: z.array(PayrollCreditBlockersType$outboundSchema).optional(), + processingRequest: z.nullable(PayrollProcessingRequest$outboundSchema) + .optional(), + partnerOwnedDisbursement: z.nullable(z.boolean()).optional(), + employeeCompensations: z.array( + z.lazy(() => EmployeeCompensations$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + payrollDeadline: "payroll_deadline", + checkDate: "check_date", + processedDate: "processed_date", + calculatedAt: "calculated_at", + payrollUuid: "payroll_uuid", + companyUuid: "company_uuid", + offCycle: "off_cycle", + offCycleReason: "off_cycle_reason", + autoPilot: "auto_pilot", + finalTerminationPayroll: "final_termination_payroll", + withholdingPayPeriod: "withholding_pay_period", + skipRegularDeductions: "skip_regular_deductions", + fixedWithholdingRate: "fixed_withholding_rate", + payPeriod: "pay_period", + payrollStatusMeta: "payroll_status_meta", + companyTaxes: "company_taxes", + paymentSpeedChanged: "payment_speed_changed", + createdAt: "created_at", + submissionBlockers: "submission_blockers", + creditBlockers: "credit_blockers", + processingRequest: "processing_request", + partnerOwnedDisbursement: "partner_owned_disbursement", + employeeCompensations: "employee_compensations", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShow$ { + /** @deprecated use `PayrollShow$inboundSchema` instead. */ + export const inboundSchema = PayrollShow$inboundSchema; + /** @deprecated use `PayrollShow$outboundSchema` instead. */ + export const outboundSchema = PayrollShow$outboundSchema; + /** @deprecated use `PayrollShow$Outbound` instead. */ + export type Outbound = PayrollShow$Outbound; +} + +export function payrollShowToJSON(payrollShow: PayrollShow): string { + return JSON.stringify(PayrollShow$outboundSchema.parse(payrollShow)); +} + +export function payrollShowFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShow$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShow' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/components/payrollupdate.ts b/gusto_embedded/src/models/components/payrollupdate.ts index 16ea70c4..2d0690aa 100644 --- a/gusto_embedded/src/models/components/payrollupdate.ts +++ b/gusto_embedded/src/models/components/payrollupdate.ts @@ -78,7 +78,7 @@ export type PayrollUpdatePaidTimeOff = { finalPayoutUnusedHoursInput?: string | undefined; }; -export type EmployeeCompensations = { +export type PayrollUpdateEmployeeCompensations = { /** * The UUID of the employee. */ @@ -125,7 +125,7 @@ export const WithholdingPayPeriod = { export type WithholdingPayPeriod = ClosedEnum; export type PayrollUpdate = { - employeeCompensations: Array; + employeeCompensations: Array; /** * The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. */ @@ -375,8 +375,8 @@ export function payrollUpdatePaidTimeOffFromJSON( } /** @internal */ -export const EmployeeCompensations$inboundSchema: z.ZodType< - EmployeeCompensations, +export const PayrollUpdateEmployeeCompensations$inboundSchema: z.ZodType< + PayrollUpdateEmployeeCompensations, z.ZodTypeDef, unknown > = z.object({ @@ -404,7 +404,7 @@ export const EmployeeCompensations$inboundSchema: z.ZodType< }); /** @internal */ -export type EmployeeCompensations$Outbound = { +export type PayrollUpdateEmployeeCompensations$Outbound = { employee_uuid?: string | undefined; version?: string | undefined; excluded?: boolean | undefined; @@ -420,10 +420,10 @@ export type EmployeeCompensations$Outbound = { }; /** @internal */ -export const EmployeeCompensations$outboundSchema: z.ZodType< - EmployeeCompensations$Outbound, +export const PayrollUpdateEmployeeCompensations$outboundSchema: z.ZodType< + PayrollUpdateEmployeeCompensations$Outbound, z.ZodTypeDef, - EmployeeCompensations + PayrollUpdateEmployeeCompensations > = z.object({ employeeUuid: z.string().optional(), version: z.string().optional(), @@ -452,30 +452,34 @@ export const EmployeeCompensations$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace EmployeeCompensations$ { - /** @deprecated use `EmployeeCompensations$inboundSchema` instead. */ - export const inboundSchema = EmployeeCompensations$inboundSchema; - /** @deprecated use `EmployeeCompensations$outboundSchema` instead. */ - export const outboundSchema = EmployeeCompensations$outboundSchema; - /** @deprecated use `EmployeeCompensations$Outbound` instead. */ - export type Outbound = EmployeeCompensations$Outbound; +export namespace PayrollUpdateEmployeeCompensations$ { + /** @deprecated use `PayrollUpdateEmployeeCompensations$inboundSchema` instead. */ + export const inboundSchema = PayrollUpdateEmployeeCompensations$inboundSchema; + /** @deprecated use `PayrollUpdateEmployeeCompensations$outboundSchema` instead. */ + export const outboundSchema = + PayrollUpdateEmployeeCompensations$outboundSchema; + /** @deprecated use `PayrollUpdateEmployeeCompensations$Outbound` instead. */ + export type Outbound = PayrollUpdateEmployeeCompensations$Outbound; } -export function employeeCompensationsToJSON( - employeeCompensations: EmployeeCompensations, +export function payrollUpdateEmployeeCompensationsToJSON( + payrollUpdateEmployeeCompensations: PayrollUpdateEmployeeCompensations, ): string { return JSON.stringify( - EmployeeCompensations$outboundSchema.parse(employeeCompensations), + PayrollUpdateEmployeeCompensations$outboundSchema.parse( + payrollUpdateEmployeeCompensations, + ), ); } -export function employeeCompensationsFromJSON( +export function payrollUpdateEmployeeCompensationsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => EmployeeCompensations$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EmployeeCompensations' from JSON`, + (x) => + PayrollUpdateEmployeeCompensations$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollUpdateEmployeeCompensations' from JSON`, ); } @@ -507,7 +511,7 @@ export const PayrollUpdate$inboundSchema: z.ZodType< unknown > = z.object({ employee_compensations: z.array( - z.lazy(() => EmployeeCompensations$inboundSchema), + z.lazy(() => PayrollUpdateEmployeeCompensations$inboundSchema), ), withholding_pay_period: WithholdingPayPeriod$inboundSchema.optional(), skip_regular_deductions: z.boolean().optional(), @@ -523,7 +527,7 @@ export const PayrollUpdate$inboundSchema: z.ZodType< /** @internal */ export type PayrollUpdate$Outbound = { - employee_compensations: Array; + employee_compensations: Array; withholding_pay_period?: string | undefined; skip_regular_deductions?: boolean | undefined; fixed_withholding_rate?: boolean | undefined; @@ -536,7 +540,7 @@ export const PayrollUpdate$outboundSchema: z.ZodType< PayrollUpdate > = z.object({ employeeCompensations: z.array( - z.lazy(() => EmployeeCompensations$outboundSchema), + z.lazy(() => PayrollUpdateEmployeeCompensations$outboundSchema), ), withholdingPayPeriod: WithholdingPayPeriod$outboundSchema.optional(), skipRegularDeductions: z.boolean().optional(), diff --git a/gusto_embedded/src/models/errors/companysuspensioncreationerrors.ts b/gusto_embedded/src/models/errors/companysuspensioncreationerrors.ts new file mode 100644 index 00000000..55575fcd --- /dev/null +++ b/gusto_embedded/src/models/errors/companysuspensioncreationerrors.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"; + +/** + * Unprocessable Entity + * + * @remarks + * + * 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. + */ +export type CompanySuspensionCreationErrorsData = { + errors: Array; +}; + +/** + * Unprocessable Entity + * + * @remarks + * + * 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. + */ +export class CompanySuspensionCreationErrors extends GustoEmbeddedError { + errors: Array; + + /** The original data that was passed to this error instance. */ + data$: CompanySuspensionCreationErrorsData; + + constructor( + err: CompanySuspensionCreationErrorsData, + 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 = "CompanySuspensionCreationErrors"; + } +} + +/** @internal */ +export const CompanySuspensionCreationErrors$inboundSchema: z.ZodType< + CompanySuspensionCreationErrors, + 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 CompanySuspensionCreationErrors(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); + }); + +/** @internal */ +export type CompanySuspensionCreationErrors$Outbound = { + errors: Array; +}; + +/** @internal */ +export const CompanySuspensionCreationErrors$outboundSchema: z.ZodType< + CompanySuspensionCreationErrors$Outbound, + z.ZodTypeDef, + CompanySuspensionCreationErrors +> = z.instanceof(CompanySuspensionCreationErrors) + .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 CompanySuspensionCreationErrors$ { + /** @deprecated use `CompanySuspensionCreationErrors$inboundSchema` instead. */ + export const inboundSchema = CompanySuspensionCreationErrors$inboundSchema; + /** @deprecated use `CompanySuspensionCreationErrors$outboundSchema` instead. */ + export const outboundSchema = CompanySuspensionCreationErrors$outboundSchema; + /** @deprecated use `CompanySuspensionCreationErrors$Outbound` instead. */ + export type Outbound = CompanySuspensionCreationErrors$Outbound; +} diff --git a/gusto_embedded/src/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.ts b/gusto_embedded/src/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.ts new file mode 100644 index 00000000..4b1274b3 --- /dev/null +++ b/gusto_embedded/src/models/operations/deletev1companiescompanyidbankaccountsbankaccountid.ts @@ -0,0 +1,244 @@ +/* + * 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 { + HTTPMetadata, + HTTPMetadata$inboundSchema, + HTTPMetadata$Outbound, + HTTPMetadata$outboundSchema, +} from "../components/httpmetadata.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 DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion = + { + 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 DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion = + ClosedEnum< + typeof DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion + >; + +export type DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest = { + /** + * The UUID of the company + */ + companyId: string; + /** + * The UUID of the company bank account + */ + bankAccountId: string; + /** + * 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?: + | DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion + | undefined; +}; + +export type DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse = { + httpMeta: HTTPMetadata; +}; + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion + > = z.nativeEnum( + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion + > = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$ { + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$outboundSchema; +} + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$inboundSchema: + z.ZodType< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + z.ZodTypeDef, + unknown + > = z.object({ + company_id: z.string(), + bank_account_id: z.string(), + "X-Gusto-API-Version": + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), + }).transform((v) => { + return remap$(v, { + "company_id": "companyId", + "bank_account_id": "bankAccountId", + "X-Gusto-API-Version": "xGustoAPIVersion", + }); + }); + +/** @internal */ +export type DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$Outbound = + { + company_id: string; + bank_account_id: string; + "X-Gusto-API-Version": string; + }; + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema: + z.ZodType< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$Outbound, + z.ZodTypeDef, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest + > = z.object({ + companyId: z.string(), + bankAccountId: z.string(), + xGustoAPIVersion: + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), + }).transform((v) => { + return remap$(v, { + companyId: "company_id", + bankAccountId: "bank_account_id", + xGustoAPIVersion: "X-Gusto-API-Version", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$ { + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$inboundSchema` instead. */ + export const inboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$inboundSchema; + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema; + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$Outbound` instead. */ + export type Outbound = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$Outbound; +} + +export function deleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequestToJSON( + deleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest: + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, +): string { + return JSON.stringify( + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$outboundSchema + .parse(deleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest), + ); +} + +export function deleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema: + z.ZodType< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + z.ZodTypeDef, + unknown + > = z.object({ + HttpMeta: HTTPMetadata$inboundSchema, + }).transform((v) => { + return remap$(v, { + "HttpMeta": "httpMeta", + }); + }); + +/** @internal */ +export type DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$Outbound = + { + HttpMeta: HTTPMetadata$Outbound; + }; + +/** @internal */ +export const DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$outboundSchema: + z.ZodType< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$Outbound, + z.ZodTypeDef, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse + > = z.object({ + httpMeta: HTTPMetadata$outboundSchema, + }).transform((v) => { + return remap$(v, { + httpMeta: "HttpMeta", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$ { + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema` instead. */ + export const inboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema; + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$outboundSchema` instead. */ + export const outboundSchema = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$outboundSchema; + /** @deprecated use `DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$Outbound` instead. */ + export type Outbound = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$Outbound; +} + +export function deleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponseToJSON( + deleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse: + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, +): string { + return JSON.stringify( + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$outboundSchema + .parse(deleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse), + ); +} + +export function deleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponseFromJSON( + jsonString: string, +): SafeParseResult< + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/operations/getcompaniescompanyuuidsuspensions.ts b/gusto_embedded/src/models/operations/getcompaniescompanyuuidsuspensions.ts index 6cd93dca..bf8f235d 100644 --- a/gusto_embedded/src/models/operations/getcompaniescompanyuuidsuspensions.ts +++ b/gusto_embedded/src/models/operations/getcompaniescompanyuuidsuspensions.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 { CompanySuspension, @@ -18,51 +19,87 @@ 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 GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = { + 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 GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = + ClosedEnum; + export type GetCompaniesCompanyUuidSuspensionsRequest = { /** - * 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. */ - companyUuid: string; + xGustoAPIVersion?: + | GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + | 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; + companyUuid: string; }; export type GetCompaniesCompanyUuidSuspensionsResponse = { httpMeta: HTTPMetadata; /** - * Example response + * Successful response */ companySuspensionList?: Array | undefined; }; +/** @internal */ +export const GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + > = z.nativeEnum(GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion); + +/** @internal */ +export const GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + > = GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$ { + /** @deprecated use `GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const GetCompaniesCompanyUuidSuspensionsRequest$inboundSchema: z.ZodType< GetCompaniesCompanyUuidSuspensionsRequest, z.ZodTypeDef, unknown > = z.object({ + "X-Gusto-API-Version": + GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), company_uuid: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), }).transform((v) => { return remap$(v, { - "company_uuid": "companyUuid", "X-Gusto-API-Version": "xGustoAPIVersion", + "company_uuid": "companyUuid", }); }); /** @internal */ export type GetCompaniesCompanyUuidSuspensionsRequest$Outbound = { - company_uuid: string; "X-Gusto-API-Version": string; + company_uuid: string; }; /** @internal */ @@ -72,12 +109,14 @@ export const GetCompaniesCompanyUuidSuspensionsRequest$outboundSchema: z.ZodTypeDef, GetCompaniesCompanyUuidSuspensionsRequest > = z.object({ + xGustoAPIVersion: + GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), companyUuid: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), }).transform((v) => { return remap$(v, { - companyUuid: "company_uuid", xGustoAPIVersion: "X-Gusto-API-Version", + companyUuid: "company_uuid", }); }); diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidbankaccounts.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidbankaccounts.ts index 19746dbc..b142f684 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidbankaccounts.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidbankaccounts.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 { CompanyBankAccount, @@ -18,13 +19,20 @@ 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 GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = { + 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 GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = + ClosedEnum; + export type GetV1CompaniesCompanyIdBankAccountsRequest = { /** * The UUID of the company @@ -33,23 +41,52 @@ export type GetV1CompaniesCompanyIdBankAccountsRequest = { /** * 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?: + | GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + | undefined; }; export type GetV1CompaniesCompanyIdBankAccountsResponse = { httpMeta: HTTPMetadata; /** - * Example response + * successful */ - companyBankAccountList?: Array | undefined; + companyBankAccounts?: Array | undefined; }; +/** @internal */ +export const GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + > = z.nativeEnum(GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion); + +/** @internal */ +export const GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + > = GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$ { + /** @deprecated use `GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const GetV1CompaniesCompanyIdBankAccountsRequest$inboundSchema: z.ZodType = z.object({ company_id: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + "X-Gusto-API-Version": + GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { "company_id": "companyId", @@ -71,7 +108,9 @@ export const GetV1CompaniesCompanyIdBankAccountsRequest$outboundSchema: GetV1CompaniesCompanyIdBankAccountsRequest > = z.object({ companyId: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + xGustoAPIVersion: + GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { companyId: "company_id", @@ -129,19 +168,19 @@ export const GetV1CompaniesCompanyIdBankAccountsResponse$inboundSchema: unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, - "Company-Bank-Account-List": z.array(CompanyBankAccount$inboundSchema) + "Company-Bank-Accounts": z.array(CompanyBankAccount$inboundSchema) .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", - "Company-Bank-Account-List": "companyBankAccountList", + "Company-Bank-Accounts": "companyBankAccounts", }); }); /** @internal */ export type GetV1CompaniesCompanyIdBankAccountsResponse$Outbound = { HttpMeta: HTTPMetadata$Outbound; - "Company-Bank-Account-List"?: Array | undefined; + "Company-Bank-Accounts"?: Array | undefined; }; /** @internal */ @@ -152,12 +191,11 @@ export const GetV1CompaniesCompanyIdBankAccountsResponse$outboundSchema: GetV1CompaniesCompanyIdBankAccountsResponse > = z.object({ httpMeta: HTTPMetadata$outboundSchema, - companyBankAccountList: z.array(CompanyBankAccount$outboundSchema) - .optional(), + companyBankAccounts: z.array(CompanyBankAccount$outboundSchema).optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", - companyBankAccountList: "Company-Bank-Account-List", + companyBankAccounts: "Company-Bank-Accounts", }); }); diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts index 85997eb8..2faa1b05 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts @@ -67,9 +67,17 @@ export type GetV1CompaniesCompanyIdEmployeesRequest = { */ include?: Array | undefined; /** - * Filters employees by the provided boolean + * Filters employees by those who have completed onboarding + */ + onboarded?: boolean | undefined; + /** + * Filters employees by those who have been or are scheduled to be terminated */ terminated?: boolean | undefined; + /** + * Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) + */ + terminatedToday?: boolean | undefined; /** * Optional subset of employees to fetch. */ @@ -148,7 +156,9 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$inboundSchema: z.ZodType< company_id: z.string(), search_term: z.string().optional(), include: z.array(Include$inboundSchema).optional(), + onboarded: z.boolean().optional(), terminated: z.boolean().optional(), + terminated_today: z.boolean().optional(), uuids: z.array(z.string()).optional(), page: z.number().int().optional(), per: z.number().int().optional(), @@ -157,6 +167,7 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$inboundSchema: z.ZodType< "X-Gusto-API-Version": "xGustoAPIVersion", "company_id": "companyId", "search_term": "searchTerm", + "terminated_today": "terminatedToday", }); }); @@ -166,7 +177,9 @@ export type GetV1CompaniesCompanyIdEmployeesRequest$Outbound = { company_id: string; search_term?: string | undefined; include?: Array | undefined; + onboarded?: boolean | undefined; terminated?: boolean | undefined; + terminated_today?: boolean | undefined; uuids?: Array | undefined; page?: number | undefined; per?: number | undefined; @@ -184,7 +197,9 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$outboundSchema: z.ZodType< companyId: z.string(), searchTerm: z.string().optional(), include: z.array(Include$outboundSchema).optional(), + onboarded: z.boolean().optional(), terminated: z.boolean().optional(), + terminatedToday: z.boolean().optional(), uuids: z.array(z.string()).optional(), page: z.number().int().optional(), per: z.number().int().optional(), @@ -193,6 +208,7 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$outboundSchema: z.ZodType< xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", searchTerm: "search_term", + terminatedToday: "terminated_today", }); }); diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrolls.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrolls.ts index ac643042..bf6210f0 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrolls.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrolls.ts @@ -48,8 +48,6 @@ export const PayrollTypes = { export type PayrollTypes = ClosedEnum; export const GetV1CompaniesCompanyIdPayrollsQueryParamInclude = { - Benefits: "benefits", - Deductions: "deductions", Taxes: "taxes", PayrollStatusMeta: "payroll_status_meta", Totals: "totals", diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts index 295005de..70ee8881 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts @@ -14,11 +14,11 @@ import { HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; import { - Payroll, - Payroll$inboundSchema, - Payroll$Outbound, - Payroll$outboundSchema, -} from "../components/payroll.js"; + PayrollShow, + PayrollShow$inboundSchema, + PayrollShow$Outbound, + PayrollShow$outboundSchema, +} from "../components/payrollshow.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** @@ -43,6 +43,7 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude = { Totals: "totals", RiskBlockers: "risk_blockers", Reversals: "reversals", + PayrollTaxes: "payroll_taxes", } as const; export type GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude = ClosedEnum; @@ -75,7 +76,7 @@ export type GetV1CompaniesCompanyIdPayrollsPayrollIdResponse = { /** * successful */ - payroll?: Payroll | undefined; + payrollShow?: PayrollShow | undefined; }; /** @internal */ @@ -236,18 +237,18 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdResponse$inboundSchema: unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, - Payroll: Payroll$inboundSchema.optional(), + "Payroll-Show": PayrollShow$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", - "Payroll": "payroll", + "Payroll-Show": "payrollShow", }); }); /** @internal */ export type GetV1CompaniesCompanyIdPayrollsPayrollIdResponse$Outbound = { HttpMeta: HTTPMetadata$Outbound; - Payroll?: Payroll$Outbound | undefined; + "Payroll-Show"?: PayrollShow$Outbound | undefined; }; /** @internal */ @@ -258,11 +259,11 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdResponse$outboundSchema: GetV1CompaniesCompanyIdPayrollsPayrollIdResponse > = z.object({ httpMeta: HTTPMetadata$outboundSchema, - payroll: Payroll$outboundSchema.optional(), + payrollShow: PayrollShow$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", - payroll: "Payroll", + payrollShow: "Payroll-Show", }); }); diff --git a/gusto_embedded/src/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.ts b/gusto_embedded/src/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.ts new file mode 100644 index 00000000..bdddab2c --- /dev/null +++ b/gusto_embedded/src/models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.ts @@ -0,0 +1,213 @@ +/* + * 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 { Result as SafeParseResult } from "../../types/fp.js"; +import { + ContributionExclusion, + ContributionExclusion$inboundSchema, + ContributionExclusion$Outbound, + ContributionExclusion$outboundSchema, +} from "../components/contributionexclusion.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"; + +export type GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest = + { + /** + * The UUID of the company benefit + */ + companyBenefitId: string; + /** + * 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; + }; + +export type GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse = + { + httpMeta: HTTPMetadata; + /** + * Example response + */ + contributionExclusionList?: Array | undefined; + }; + +/** @internal */ +export const GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema: + z.ZodType< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + z.ZodTypeDef, + unknown + > = z.object({ + company_benefit_id: z.string(), + "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + }).transform((v) => { + return remap$(v, { + "company_benefit_id": "companyBenefitId", + "X-Gusto-API-Version": "xGustoAPIVersion", + }); + }); + +/** @internal */ +export type GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound = + { + company_benefit_id: string; + "X-Gusto-API-Version": string; + }; + +/** @internal */ +export const GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema: + z.ZodType< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound, + z.ZodTypeDef, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest + > = z.object({ + companyBenefitId: z.string(), + xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + }).transform((v) => { + return remap$(v, { + companyBenefitId: "company_benefit_id", + xGustoAPIVersion: "X-Gusto-API-Version", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$ { + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema` instead. */ + export const inboundSchema = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema; + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema` instead. */ + export const outboundSchema = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema; + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound` instead. */ + export type Outbound = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound; +} + +export function getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestToJSON( + getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest: + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, +): string { + return JSON.stringify( + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema + .parse(getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest), + ); +} + +export function getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestFromJSON( + jsonString: string, +): SafeParseResult< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest' from JSON`, + ); +} + +/** @internal */ +export const GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema: + z.ZodType< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + HttpMeta: HTTPMetadata$inboundSchema, + "Contribution-Exclusion-List": z.array(ContributionExclusion$inboundSchema) + .optional(), + }).transform((v) => { + return remap$(v, { + "HttpMeta": "httpMeta", + "Contribution-Exclusion-List": "contributionExclusionList", + }); + }); + +/** @internal */ +export type GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound = + { + HttpMeta: HTTPMetadata$Outbound; + "Contribution-Exclusion-List"?: + | Array + | undefined; + }; + +/** @internal */ +export const GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema: + z.ZodType< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound, + z.ZodTypeDef, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + > = z.object({ + httpMeta: HTTPMetadata$outboundSchema, + contributionExclusionList: z.array(ContributionExclusion$outboundSchema) + .optional(), + }).transform((v) => { + return remap$(v, { + httpMeta: "HttpMeta", + contributionExclusionList: "Contribution-Exclusion-List", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$ { + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema` instead. */ + export const inboundSchema = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema; + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema` instead. */ + export const outboundSchema = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema; + /** @deprecated use `GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound` instead. */ + export type Outbound = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound; +} + +export function getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponseToJSON( + getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse: + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +): string { + return JSON.stringify( + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema + .parse( + getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + ), + ); +} + +export function getV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponseFromJSON( + jsonString: string, +): SafeParseResult< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts b/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts index c77666a6..a66efe81 100644 --- a/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts +++ b/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts @@ -19,13 +19,20 @@ 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 PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = { + 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 PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion = + ClosedEnum; + /** * How Gusto will handle taxes already collected. */ @@ -44,7 +51,6 @@ export type ReconcileTaxMethod = ClosedEnum; * @remarks * * > 🚧 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. */ export const Reason = { @@ -60,21 +66,27 @@ export const Reason = { * @remarks * * > 🚧 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. */ export type Reason = ClosedEnum; /** - * Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. + * The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + * + * @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. */ export const LeavingFor = { - Apd: "apd", - AdpTotalSource: "adp_total_source", Accountant: "accountant", + Adp: "adp", + AdpTotalSource: "adp_total_source", BambooHr: "bamboo_hr", BankOrFinancialInstitution: "bank_or_financial_institution", Check: "check", + GustoCom: "gusto_com", + Homebase: "homebase", Insperity: "insperity", IntuitOrQuickbooks: "intuit_or_quickbooks", Justworks: "justworks", @@ -83,6 +95,7 @@ export const LeavingFor = { Onpay: "onpay", Other: "other", Patriot: "patriot", + Paychex: "paychex", Paycom: "paycom", Paylocity: "paylocity", Rippling: "rippling", @@ -92,7 +105,12 @@ export const LeavingFor = { Zenefits: "zenefits", } as const; /** - * Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. + * The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + * + * @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. */ export type LeavingFor = ClosedEnum; @@ -119,36 +137,67 @@ export type PostCompaniesCompanyUuidSuspensionsRequestBody = { * @remarks * * > 🚧 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. */ reason: Reason; /** - * Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. + * The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + * + * @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. */ leavingFor?: LeavingFor | undefined; }; export type PostCompaniesCompanyUuidSuspensionsRequest = { /** - * 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. */ - companyUuid: string; + xGustoAPIVersion?: + | PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + | 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; + companyUuid: string; requestBody: PostCompaniesCompanyUuidSuspensionsRequestBody; }; export type PostCompaniesCompanyUuidSuspensionsResponse = { httpMeta: HTTPMetadata; /** - * Example response + * Successful response */ companySuspension?: CompanySuspension | undefined; }; +/** @internal */ +export const PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + > = z.nativeEnum(PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion); + +/** @internal */ +export const PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + > = PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$ { + /** @deprecated use `PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const ReconcileTaxMethod$inboundSchema: z.ZodNativeEnum< typeof ReconcileTaxMethod @@ -309,23 +358,25 @@ export function postCompaniesCompanyUuidSuspensionsRequestBodyFromJSON( export const PostCompaniesCompanyUuidSuspensionsRequest$inboundSchema: z.ZodType = z.object({ + "X-Gusto-API-Version": + PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), company_uuid: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), RequestBody: z.lazy(() => PostCompaniesCompanyUuidSuspensionsRequestBody$inboundSchema ), }).transform((v) => { return remap$(v, { - "company_uuid": "companyUuid", "X-Gusto-API-Version": "xGustoAPIVersion", + "company_uuid": "companyUuid", "RequestBody": "requestBody", }); }); /** @internal */ export type PostCompaniesCompanyUuidSuspensionsRequest$Outbound = { - company_uuid: string; "X-Gusto-API-Version": string; + company_uuid: string; RequestBody: PostCompaniesCompanyUuidSuspensionsRequestBody$Outbound; }; @@ -336,15 +387,17 @@ export const PostCompaniesCompanyUuidSuspensionsRequest$outboundSchema: z.ZodTypeDef, PostCompaniesCompanyUuidSuspensionsRequest > = z.object({ + xGustoAPIVersion: + PostCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), companyUuid: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), requestBody: z.lazy(() => PostCompaniesCompanyUuidSuspensionsRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { - companyUuid: "company_uuid", xGustoAPIVersion: "X-Gusto-API-Version", + companyUuid: "company_uuid", requestBody: "RequestBody", }); }); diff --git a/gusto_embedded/src/models/operations/postv1companiescompanyidbankaccounts.ts b/gusto_embedded/src/models/operations/postv1companiescompanyidbankaccounts.ts index 6311a82e..1d2e2e74 100644 --- a/gusto_embedded/src/models/operations/postv1companiescompanyidbankaccounts.ts +++ b/gusto_embedded/src/models/operations/postv1companiescompanyidbankaccounts.ts @@ -13,45 +13,31 @@ import { CompanyBankAccount$Outbound, CompanyBankAccount$outboundSchema, } from "../components/companybankaccount.js"; +import { + CompanyBankAccountRequest, + CompanyBankAccountRequest$inboundSchema, + CompanyBankAccountRequest$Outbound, + CompanyBankAccountRequest$outboundSchema, +} from "../components/companybankaccountrequest.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"; /** - * The bank account type + * 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 AccountType = { - Checking: "Checking", - Savings: "Savings", +export const PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", } as const; /** - * The bank account type + * 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 AccountType = ClosedEnum; - -export type PostV1CompaniesCompanyIdBankAccountsRequestBody = { - /** - * The bank routing number - */ - routingNumber?: string | undefined; - /** - * The bank account number - */ - accountNumber?: string | undefined; - /** - * The bank account type - */ - accountType?: AccountType | undefined; -}; +export type PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = + ClosedEnum; export type PostV1CompaniesCompanyIdBankAccountsRequest = { /** @@ -61,121 +47,43 @@ export type PostV1CompaniesCompanyIdBankAccountsRequest = { /** * 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; - requestBody: PostV1CompaniesCompanyIdBankAccountsRequestBody; + xGustoAPIVersion?: + | PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + | undefined; + companyBankAccountRequest: CompanyBankAccountRequest; }; export type PostV1CompaniesCompanyIdBankAccountsResponse = { httpMeta: HTTPMetadata; /** - * Example response + * created */ companyBankAccount?: CompanyBankAccount | undefined; }; /** @internal */ -export const AccountType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(AccountType); - -/** @internal */ -export const AccountType$outboundSchema: z.ZodNativeEnum = - AccountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountType$ { - /** @deprecated use `AccountType$inboundSchema` instead. */ - export const inboundSchema = AccountType$inboundSchema; - /** @deprecated use `AccountType$outboundSchema` instead. */ - export const outboundSchema = AccountType$outboundSchema; -} - -/** @internal */ -export const PostV1CompaniesCompanyIdBankAccountsRequestBody$inboundSchema: - z.ZodType< - PostV1CompaniesCompanyIdBankAccountsRequestBody, - z.ZodTypeDef, - unknown - > = z.object({ - routing_number: z.string().optional(), - account_number: z.string().optional(), - account_type: AccountType$inboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - "routing_number": "routingNumber", - "account_number": "accountNumber", - "account_type": "accountType", - }); - }); - -/** @internal */ -export type PostV1CompaniesCompanyIdBankAccountsRequestBody$Outbound = { - routing_number?: string | undefined; - account_number?: string | undefined; - account_type?: string | undefined; -}; +export const PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + > = z.nativeEnum(PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion); /** @internal */ -export const PostV1CompaniesCompanyIdBankAccountsRequestBody$outboundSchema: - z.ZodType< - PostV1CompaniesCompanyIdBankAccountsRequestBody$Outbound, - z.ZodTypeDef, - PostV1CompaniesCompanyIdBankAccountsRequestBody - > = z.object({ - routingNumber: z.string().optional(), - accountNumber: z.string().optional(), - accountType: AccountType$outboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - routingNumber: "routing_number", - accountNumber: "account_number", - accountType: "account_type", - }); - }); +export const PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + > = PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PostV1CompaniesCompanyIdBankAccountsRequestBody$ { - /** @deprecated use `PostV1CompaniesCompanyIdBankAccountsRequestBody$inboundSchema` instead. */ +export namespace PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$ { + /** @deprecated use `PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema` instead. */ export const inboundSchema = - PostV1CompaniesCompanyIdBankAccountsRequestBody$inboundSchema; - /** @deprecated use `PostV1CompaniesCompanyIdBankAccountsRequestBody$outboundSchema` instead. */ + PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema` instead. */ export const outboundSchema = - PostV1CompaniesCompanyIdBankAccountsRequestBody$outboundSchema; - /** @deprecated use `PostV1CompaniesCompanyIdBankAccountsRequestBody$Outbound` instead. */ - export type Outbound = - PostV1CompaniesCompanyIdBankAccountsRequestBody$Outbound; -} - -export function postV1CompaniesCompanyIdBankAccountsRequestBodyToJSON( - postV1CompaniesCompanyIdBankAccountsRequestBody: - PostV1CompaniesCompanyIdBankAccountsRequestBody, -): string { - return JSON.stringify( - PostV1CompaniesCompanyIdBankAccountsRequestBody$outboundSchema.parse( - postV1CompaniesCompanyIdBankAccountsRequestBody, - ), - ); -} - -export function postV1CompaniesCompanyIdBankAccountsRequestBodyFromJSON( - jsonString: string, -): SafeParseResult< - PostV1CompaniesCompanyIdBankAccountsRequestBody, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1CompaniesCompanyIdBankAccountsRequestBody$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1CompaniesCompanyIdBankAccountsRequestBody' from JSON`, - ); + PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema; } /** @internal */ @@ -186,15 +94,15 @@ export const PostV1CompaniesCompanyIdBankAccountsRequest$inboundSchema: unknown > = z.object({ company_id: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), - RequestBody: z.lazy(() => - PostV1CompaniesCompanyIdBankAccountsRequestBody$inboundSchema - ), + "X-Gusto-API-Version": + PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), + "Company-Bank-Account-Request": CompanyBankAccountRequest$inboundSchema, }).transform((v) => { return remap$(v, { "company_id": "companyId", "X-Gusto-API-Version": "xGustoAPIVersion", - "RequestBody": "requestBody", + "Company-Bank-Account-Request": "companyBankAccountRequest", }); }); @@ -202,7 +110,7 @@ export const PostV1CompaniesCompanyIdBankAccountsRequest$inboundSchema: export type PostV1CompaniesCompanyIdBankAccountsRequest$Outbound = { company_id: string; "X-Gusto-API-Version": string; - RequestBody: PostV1CompaniesCompanyIdBankAccountsRequestBody$Outbound; + "Company-Bank-Account-Request": CompanyBankAccountRequest$Outbound; }; /** @internal */ @@ -213,15 +121,15 @@ export const PostV1CompaniesCompanyIdBankAccountsRequest$outboundSchema: PostV1CompaniesCompanyIdBankAccountsRequest > = z.object({ companyId: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), - requestBody: z.lazy(() => - PostV1CompaniesCompanyIdBankAccountsRequestBody$outboundSchema - ), + xGustoAPIVersion: + PostV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), + companyBankAccountRequest: CompanyBankAccountRequest$outboundSchema, }).transform((v) => { return remap$(v, { companyId: "company_id", xGustoAPIVersion: "X-Gusto-API-Version", - requestBody: "RequestBody", + companyBankAccountRequest: "Company-Bank-Account-Request", }); }); diff --git a/gusto_embedded/src/models/operations/postv1employeesemployeeidbankaccounts.ts b/gusto_embedded/src/models/operations/postv1employeesemployeeidbankaccounts.ts index 9375dab6..42cdbba5 100644 --- a/gusto_embedded/src/models/operations/postv1employeesemployeeidbankaccounts.ts +++ b/gusto_embedded/src/models/operations/postv1employeesemployeeidbankaccounts.ts @@ -26,19 +26,17 @@ import { } from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const PostV1EmployeesEmployeeIdBankAccountsAccountType = { +export const AccountType = { Checking: "Checking", Savings: "Savings", } as const; -export type PostV1EmployeesEmployeeIdBankAccountsAccountType = ClosedEnum< - typeof PostV1EmployeesEmployeeIdBankAccountsAccountType ->; +export type AccountType = ClosedEnum; export type PostV1EmployeesEmployeeIdBankAccountsRequestBody = { name: string; routingNumber: string; accountNumber: string; - accountType: PostV1EmployeesEmployeeIdBankAccountsAccountType; + accountType: AccountType; }; export type PostV1EmployeesEmployeeIdBankAccountsRequest = { @@ -62,26 +60,22 @@ export type PostV1EmployeesEmployeeIdBankAccountsResponse = { }; /** @internal */ -export const PostV1EmployeesEmployeeIdBankAccountsAccountType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostV1EmployeesEmployeeIdBankAccountsAccountType); +export const AccountType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(AccountType); /** @internal */ -export const PostV1EmployeesEmployeeIdBankAccountsAccountType$outboundSchema: - z.ZodNativeEnum = - PostV1EmployeesEmployeeIdBankAccountsAccountType$inboundSchema; +export const AccountType$outboundSchema: z.ZodNativeEnum = + AccountType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PostV1EmployeesEmployeeIdBankAccountsAccountType$ { - /** @deprecated use `PostV1EmployeesEmployeeIdBankAccountsAccountType$inboundSchema` instead. */ - export const inboundSchema = - PostV1EmployeesEmployeeIdBankAccountsAccountType$inboundSchema; - /** @deprecated use `PostV1EmployeesEmployeeIdBankAccountsAccountType$outboundSchema` instead. */ - export const outboundSchema = - PostV1EmployeesEmployeeIdBankAccountsAccountType$outboundSchema; +export namespace AccountType$ { + /** @deprecated use `AccountType$inboundSchema` instead. */ + export const inboundSchema = AccountType$inboundSchema; + /** @deprecated use `AccountType$outboundSchema` instead. */ + export const outboundSchema = AccountType$outboundSchema; } /** @internal */ @@ -94,8 +88,7 @@ export const PostV1EmployeesEmployeeIdBankAccountsRequestBody$inboundSchema: name: z.string(), routing_number: z.string(), account_number: z.string(), - account_type: - PostV1EmployeesEmployeeIdBankAccountsAccountType$inboundSchema, + account_type: AccountType$inboundSchema, }).transform((v) => { return remap$(v, { "routing_number": "routingNumber", @@ -122,8 +115,7 @@ export const PostV1EmployeesEmployeeIdBankAccountsRequestBody$outboundSchema: name: z.string(), routingNumber: z.string(), accountNumber: z.string(), - accountType: - PostV1EmployeesEmployeeIdBankAccountsAccountType$outboundSchema, + accountType: AccountType$outboundSchema, }).transform((v) => { return remap$(v, { routingNumber: "routing_number", diff --git a/gusto_embedded/src/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.ts b/gusto_embedded/src/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.ts new file mode 100644 index 00000000..e9c27004 --- /dev/null +++ b/gusto_embedded/src/models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.ts @@ -0,0 +1,310 @@ +/* + * 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 { Result as SafeParseResult } from "../../types/fp.js"; +import { + ContributionExclusion, + ContributionExclusion$inboundSchema, + ContributionExclusion$Outbound, + ContributionExclusion$outboundSchema, +} from "../components/contributionexclusion.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"; + +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody = + { + /** + * The list of contribution exclusions to update + */ + contributionExclusions: Array; + }; + +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest = + { + /** + * The UUID of the company benefit + */ + companyBenefitId: string; + /** + * 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; + requestBody: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody; + }; + +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse = + { + httpMeta: HTTPMetadata; + /** + * Example response + */ + contributionExclusionList?: Array | undefined; + }; + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$inboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + contribution_exclusions: z.array(ContributionExclusion$inboundSchema), + }).transform((v) => { + return remap$(v, { + "contribution_exclusions": "contributionExclusions", + }); + }); + +/** @internal */ +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$Outbound = + { + contribution_exclusions: Array; + }; + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$outboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$Outbound, + z.ZodTypeDef, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody + > = z.object({ + contributionExclusions: z.array(ContributionExclusion$outboundSchema), + }).transform((v) => { + return remap$(v, { + contributionExclusions: "contribution_exclusions", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$ { + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$inboundSchema` instead. */ + export const inboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$inboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$outboundSchema` instead. */ + export const outboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$outboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$Outbound` instead. */ + export type Outbound = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$Outbound; +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBodyToJSON( + putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody, +): string { + return JSON.stringify( + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$outboundSchema + .parse( + putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody, + ), + ); +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody' from JSON`, + ); +} + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + z.ZodTypeDef, + unknown + > = z.object({ + company_benefit_id: z.string(), + "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + RequestBody: z.lazy(() => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$inboundSchema + ), + }).transform((v) => { + return remap$(v, { + "company_benefit_id": "companyBenefitId", + "X-Gusto-API-Version": "xGustoAPIVersion", + "RequestBody": "requestBody", + }); + }); + +/** @internal */ +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound = + { + company_benefit_id: string; + "X-Gusto-API-Version": string; + RequestBody: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$Outbound; + }; + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound, + z.ZodTypeDef, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest + > = z.object({ + companyBenefitId: z.string(), + xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + requestBody: z.lazy(() => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestBody$outboundSchema + ), + }).transform((v) => { + return remap$(v, { + companyBenefitId: "company_benefit_id", + xGustoAPIVersion: "X-Gusto-API-Version", + requestBody: "RequestBody", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$ { + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema` instead. */ + export const inboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema` instead. */ + export const outboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound` instead. */ + export type Outbound = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$Outbound; +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestToJSON( + putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, +): string { + return JSON.stringify( + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$outboundSchema + .parse(putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest), + ); +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequestFromJSON( + jsonString: string, +): SafeParseResult< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest' from JSON`, + ); +} + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + z.ZodTypeDef, + unknown + > = z.object({ + HttpMeta: HTTPMetadata$inboundSchema, + "Contribution-Exclusion-List": z.array(ContributionExclusion$inboundSchema) + .optional(), + }).transform((v) => { + return remap$(v, { + "HttpMeta": "httpMeta", + "Contribution-Exclusion-List": "contributionExclusionList", + }); + }); + +/** @internal */ +export type PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound = + { + HttpMeta: HTTPMetadata$Outbound; + "Contribution-Exclusion-List"?: + | Array + | undefined; + }; + +/** @internal */ +export const PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema: + z.ZodType< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound, + z.ZodTypeDef, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + > = z.object({ + httpMeta: HTTPMetadata$outboundSchema, + contributionExclusionList: z.array(ContributionExclusion$outboundSchema) + .optional(), + }).transform((v) => { + return remap$(v, { + httpMeta: "HttpMeta", + contributionExclusionList: "Contribution-Exclusion-List", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$ { + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema` instead. */ + export const inboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema` instead. */ + export const outboundSchema = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema; + /** @deprecated use `PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound` instead. */ + export type Outbound = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$Outbound; +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponseToJSON( + putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse: + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +): string { + return JSON.stringify( + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$outboundSchema + .parse( + putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + ), + ); +} + +export function putV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponseFromJSON( + jsonString: string, +): SafeParseResult< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse' from JSON`, + ); +} diff --git a/gusto_embedded/src/react-query/bankAccountsCreate.ts b/gusto_embedded/src/react-query/bankAccountsCreate.ts index ef05b4e1..94238685 100644 --- a/gusto_embedded/src/react-query/bankAccountsCreate.ts +++ b/gusto_embedded/src/react-query/bankAccountsCreate.ts @@ -40,7 +40,7 @@ export type BankAccountsCreateMutationData = * * scope: `company_bank_accounts:write` * - * > 🚧 Warning + * >🚧 Warning * > * > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. */ diff --git a/gusto_embedded/src/react-query/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts b/gusto_embedded/src/react-query/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts new file mode 100644 index 00000000..ec6eed88 --- /dev/null +++ b/gusto_embedded/src/react-query/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.ts @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GustoEmbeddedCore } from "../core.js"; +import { bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId } from "../funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, +} from "../models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGustoEmbeddedContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationVariables = + { + request: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest; + options?: RequestOptions; + }; + +export type BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationData = + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse; + +/** + * Delete a company bank account + * + * @remarks + * This endpoint disables a company bank account. + * + * A bank account cannot be disabled if it is used for any unprocessed payments. + * + * scope: `company_bank_accounts:write` + */ +export function useBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutation( + options?: MutationHookOptions< + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationData, + Error, + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationVariables + >, +): UseMutationResult< + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationData, + Error, + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationVariables +> { + const client = useGustoEmbeddedContext(); + return useMutation({ + ...buildBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutation( + client, + options, + ), + ...options, + }); +} + +export function mutationKeyBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId(): MutationKey { + return [ + "@gusto/embedded-api", + "bankAccounts", + "deleteV1CompaniesCompanyIdBankAccountsBankAccountId", + ]; +} + +export function buildBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutation( + client$: GustoEmbeddedCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationVariables, + ) => Promise< + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationData + >; +} { + return { + mutationKey: + mutationKeyBankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId(), + mutationFn: + function bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationFn( + { + request, + options, + }, + ): Promise< + BankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountIdMutationData + > { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync( + bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId( + client$, + request, + mergedOptions, + ), + ); + }, + }; +} diff --git a/gusto_embedded/src/react-query/bankAccountsGet.ts b/gusto_embedded/src/react-query/bankAccountsGet.ts index d1518ea3..b70586a8 100644 --- a/gusto_embedded/src/react-query/bankAccountsGet.ts +++ b/gusto_embedded/src/react-query/bankAccountsGet.ts @@ -16,8 +16,8 @@ import { GustoEmbeddedCore } from "../core.js"; import { bankAccountsGet } from "../funcs/bankAccountsGet.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; -import { VersionHeader } from "../models/components/versionheader.js"; import { + GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion, GetV1CompaniesCompanyIdBankAccountsRequest, GetV1CompaniesCompanyIdBankAccountsResponse, } from "../models/operations/getv1companiescompanyidbankaccounts.js"; @@ -95,7 +95,11 @@ export function setBankAccountsGetData( client: QueryClient, queryKeyBase: [ companyId: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + | undefined; + }, ], data: BankAccountsGetQueryData, ): BankAccountsGetQueryData | undefined { @@ -109,7 +113,11 @@ export function invalidateBankAccountsGet( queryKeyBase: TupleToPrefixes< [ companyId: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + | undefined; + }, ] >, filters?: Omit, @@ -162,7 +170,11 @@ export function buildBankAccountsGetQuery( export function queryKeyBankAccountsGet( companyId: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion + | undefined; + }, ): QueryKey { return ["@gusto/embedded-api", "bankAccounts", "get", companyId, parameters]; } diff --git a/gusto_embedded/src/react-query/companiesSuspensionsGet.ts b/gusto_embedded/src/react-query/companiesSuspensionsGet.ts index 69e06932..d6e03e0d 100644 --- a/gusto_embedded/src/react-query/companiesSuspensionsGet.ts +++ b/gusto_embedded/src/react-query/companiesSuspensionsGet.ts @@ -16,8 +16,8 @@ import { GustoEmbeddedCore } from "../core.js"; import { companiesSuspensionsGet } from "../funcs/companiesSuspensionsGet.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; -import { VersionHeader } from "../models/components/versionheader.js"; import { + GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion, GetCompaniesCompanyUuidSuspensionsRequest, GetCompaniesCompanyUuidSuspensionsResponse, } from "../models/operations/getcompaniescompanyuuidsuspensions.js"; @@ -38,7 +38,7 @@ export type CompaniesSuspensionsGetQueryData = * @remarks * Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. * - * > 📘 To check if company is already suspended + * >📘 To check if company is already suspended * > * > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. * @@ -65,7 +65,7 @@ export function useCompaniesSuspensionsGet( * @remarks * Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. * - * > 📘 To check if company is already suspended + * >📘 To check if company is already suspended * > * > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. * @@ -103,7 +103,11 @@ export function setCompaniesSuspensionsGetData( client: QueryClient, queryKeyBase: [ companyUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + | undefined; + }, ], data: CompaniesSuspensionsGetQueryData, ): CompaniesSuspensionsGetQueryData | undefined { @@ -117,7 +121,11 @@ export function invalidateCompaniesSuspensionsGet( queryKeyBase: TupleToPrefixes< [ companyUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + | undefined; + }, ] >, filters?: Omit, @@ -172,7 +180,11 @@ export function buildCompaniesSuspensionsGetQuery( export function queryKeyCompaniesSuspensionsGet( companyUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetCompaniesCompanyUuidSuspensionsHeaderXGustoAPIVersion + | undefined; + }, ): QueryKey { return ["@gusto/embedded-api", "suspensions", "get", companyUuid, parameters]; } diff --git a/gusto_embedded/src/react-query/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts b/gusto_embedded/src/react-query/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts new file mode 100644 index 00000000..d94d2b9e --- /dev/null +++ b/gusto_embedded/src/react-query/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts @@ -0,0 +1,217 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + InvalidateQueryFilters, + QueryClient, + QueryFunctionContext, + QueryKey, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GustoEmbeddedCore } from "../core.js"; +import { companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "../funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { VersionHeader } from "../models/components/versionheader.js"; +import { + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +} from "../models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGustoEmbeddedContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; + +export type CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData = + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse; + +/** + * Get contribution exclusions for a company benefit + * + * @remarks + * Returns all contributions for a given company benefit and whether they are excluded or not. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:read` + */ +export function useCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: QueryHookOptions< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + >, +): UseQueryResult< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData, + Error +> { + const client = useGustoEmbeddedContext(); + return useQuery({ + ...buildCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQuery( + client, + request, + options, + ), + ...options, + }); +} + +/** + * Get contribution exclusions for a company benefit + * + * @remarks + * Returns all contributions for a given company benefit and whether they are excluded or not. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:read` + */ +export function useCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsSuspense( + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: SuspenseQueryHookOptions< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + >, +): UseSuspenseQueryResult< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData, + Error +> { + const client = useGustoEmbeddedContext(); + return useSuspenseQuery({ + ...buildCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQuery( + client, + request, + options, + ), + ...options, + }); +} + +export function prefetchCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + queryClient: QueryClient, + client$: GustoEmbeddedCore, + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, +): Promise { + return queryClient.prefetchQuery({ + ...buildCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQuery( + client$, + request, + ), + }); +} + +export function setCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsData( + client: QueryClient, + queryKeyBase: [ + companyBenefitId: string, + parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + ], + data: + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData, +): + | CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + | undefined +{ + const key = + queryKeyCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + ...queryKeyBase, + ); + + return client.setQueryData< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + >(key, data); +} + +export function invalidateCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [ + companyBenefitId: string, + parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + ] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gusto/embedded-api", + "companyBenefits", + "getV1CompanyBenefitsCompanyBenefitIdContributionExclusions", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gusto/embedded-api", + "companyBenefits", + "getV1CompanyBenefitsCompanyBenefitIdContributionExclusions", + ], + }); +} + +export function buildCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQuery( + client$: GustoEmbeddedCore, + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + >; +} { + return { + queryKey: + queryKeyCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + request.companyBenefitId, + { xGustoAPIVersion: request.xGustoAPIVersion }, + ), + queryFn: + async function companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryFn( + ctx, + ): Promise< + CompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsQueryData + > { + const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal); + const mergedOptions = { + ...options, + fetchOptions: { ...options?.fetchOptions, signal: sig }, + }; + + return unwrapAsync( + companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client$, + request, + mergedOptions, + ), + ); + }, + }; +} + +export function queryKeyCompanyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + companyBenefitId: string, + parameters: { xGustoAPIVersion?: VersionHeader | undefined }, +): QueryKey { + return [ + "@gusto/embedded-api", + "companyBenefits", + "getV1CompanyBenefitsCompanyBenefitIdContributionExclusions", + companyBenefitId, + parameters, + ]; +} diff --git a/gusto_embedded/src/react-query/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts b/gusto_embedded/src/react-query/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts new file mode 100644 index 00000000..a6b4cd95 --- /dev/null +++ b/gusto_embedded/src/react-query/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.ts @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GustoEmbeddedCore } from "../core.js"; +import { companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "../funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +} from "../models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGustoEmbeddedContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationVariables = + { + request: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest; + options?: RequestOptions; + }; + +export type CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationData = + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse; + +/** + * Update contribution exclusions for a company benefit + * + * @remarks + * Updates contribution exclusions for a given company benefit. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:write` + */ +export function useCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutation( + options?: MutationHookOptions< + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationData, + Error, + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationVariables + >, +): UseMutationResult< + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationData, + Error, + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationVariables +> { + const client = useGustoEmbeddedContext(); + return useMutation({ + ...buildCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutation( + client, + options, + ), + ...options, + }); +} + +export function mutationKeyCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions(): MutationKey { + return [ + "@gusto/embedded-api", + "companyBenefits", + "putV1CompanyBenefitsCompanyBenefitIdContributionExclusions", + ]; +} + +export function buildCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutation( + client$: GustoEmbeddedCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationVariables, + ) => Promise< + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationData + >; +} { + return { + mutationKey: + mutationKeyCompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions(), + mutationFn: + function companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationFn( + { + request, + options, + }, + ): Promise< + CompanyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsMutationData + > { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync( + companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + client$, + request, + mergedOptions, + ), + ); + }, + }; +} diff --git a/gusto_embedded/src/react-query/employeesList.ts b/gusto_embedded/src/react-query/employeesList.ts index 20b88c7b..b6291bb8 100644 --- a/gusto_embedded/src/react-query/employeesList.ts +++ b/gusto_embedded/src/react-query/employeesList.ts @@ -101,7 +101,9 @@ export function setEmployeesListData( | undefined; searchTerm?: string | undefined; include?: Array | undefined; + onboarded?: boolean | undefined; terminated?: boolean | undefined; + terminatedToday?: boolean | undefined; uuids?: Array | undefined; page?: number | undefined; per?: number | undefined; @@ -125,7 +127,9 @@ export function invalidateEmployeesList( | undefined; searchTerm?: string | undefined; include?: Array | undefined; + onboarded?: boolean | undefined; terminated?: boolean | undefined; + terminatedToday?: boolean | undefined; uuids?: Array | undefined; page?: number | undefined; per?: number | undefined; @@ -163,7 +167,9 @@ export function buildEmployeesListQuery( xGustoAPIVersion: request.xGustoAPIVersion, searchTerm: request.searchTerm, include: request.include, + onboarded: request.onboarded, terminated: request.terminated, + terminatedToday: request.terminatedToday, uuids: request.uuids, page: request.page, per: request.per, @@ -194,7 +200,9 @@ export function queryKeyEmployeesList( | undefined; searchTerm?: string | undefined; include?: Array | undefined; + onboarded?: boolean | undefined; terminated?: boolean | undefined; + terminatedToday?: boolean | undefined; uuids?: Array | undefined; page?: number | undefined; per?: number | undefined; diff --git a/gusto_embedded/src/sdk/bankaccounts.ts b/gusto_embedded/src/sdk/bankaccounts.ts index 2bd1ec8f..5238057f 100644 --- a/gusto_embedded/src/sdk/bankaccounts.ts +++ b/gusto_embedded/src/sdk/bankaccounts.ts @@ -4,9 +4,14 @@ import { bankAccountsCreate } from "../funcs/bankAccountsCreate.js"; import { bankAccountsCreateFromPlaidToken } from "../funcs/bankAccountsCreateFromPlaidToken.js"; +import { bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId } from "../funcs/bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId.js"; import { bankAccountsGet } from "../funcs/bankAccountsGet.js"; import { bankAccountsVerify } from "../funcs/bankAccountsVerify.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdResponse, +} from "../models/operations/deletev1companiescompanyidbankaccountsbankaccountid.js"; import { GetV1CompaniesCompanyIdBankAccountsRequest, GetV1CompaniesCompanyIdBankAccountsResponse, @@ -26,6 +31,25 @@ import { import { unwrapAsync } from "../types/fp.js"; export class BankAccounts extends ClientSDK { + /** + * Get all company bank accounts + * + * @remarks + * Returns company bank accounts. Currently, we only support a single default bank account per company. + * + * scope: `company_bank_accounts:read` + */ + async get( + request: GetV1CompaniesCompanyIdBankAccountsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bankAccountsGet( + this, + request, + options, + )); + } + /** * Create a company bank account * @@ -39,7 +63,7 @@ export class BankAccounts extends ClientSDK { * * scope: `company_bank_accounts:write` * - * > 🚧 Warning + * >🚧 Warning * > * > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. */ @@ -54,25 +78,6 @@ export class BankAccounts extends ClientSDK { )); } - /** - * Get all company bank accounts - * - * @remarks - * Returns company bank accounts. Currently, we only support a single default bank account per company. - * - * scope: `company_bank_accounts:read` - */ - async get( - request: GetV1CompaniesCompanyIdBankAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(bankAccountsGet( - this, - request, - options, - )); - } - /** * Verify a company bank account * @@ -130,4 +135,27 @@ export class BankAccounts extends ClientSDK { options, )); } + + /** + * Delete a company bank account + * + * @remarks + * This endpoint disables a company bank account. + * + * A bank account cannot be disabled if it is used for any unprocessed payments. + * + * scope: `company_bank_accounts:write` + */ + async deleteV1CompaniesCompanyIdBankAccountsBankAccountId( + request: DeleteV1CompaniesCompanyIdBankAccountsBankAccountIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync( + bankAccountsDeleteV1CompaniesCompanyIdBankAccountsBankAccountId( + this, + request, + options, + ), + ); + } } diff --git a/gusto_embedded/src/sdk/companybenefits.ts b/gusto_embedded/src/sdk/companybenefits.ts index 92351597..c768fa69 100644 --- a/gusto_embedded/src/sdk/companybenefits.ts +++ b/gusto_embedded/src/sdk/companybenefits.ts @@ -10,7 +10,9 @@ import { companyBenefitsGetEmployeeBenefits } from "../funcs/companyBenefitsGetE import { companyBenefitsGetRequirements } from "../funcs/companyBenefitsGetRequirements.js"; import { companyBenefitsGetSummary } from "../funcs/companyBenefitsGetSummary.js"; import { companyBenefitsGetSupported } from "../funcs/companyBenefitsGetSupported.js"; +import { companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "../funcs/companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; import { companyBenefitsList } from "../funcs/companyBenefitsList.js"; +import { companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions } from "../funcs/companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions.js"; import { companyBenefitsUpdate } from "../funcs/companyBenefitsUpdate.js"; import { companyBenefitsUpdateEmployeeBenefits } from "../funcs/companyBenefitsUpdateEmployeeBenefits.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; @@ -42,6 +44,10 @@ import { GetV1CompanyBenefitsCompanyBenefitIdRequest, GetV1CompanyBenefitsCompanyBenefitIdResponse, } from "../models/operations/getv1companybenefitscompanybenefitid.js"; +import { + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +} from "../models/operations/getv1companybenefitscompanybenefitidcontributionexclusions.js"; import { GetV1CompanyBenefitsCompanyBenefitIdEmployeeBenefitsRequest, GetV1CompanyBenefitsCompanyBenefitIdEmployeeBenefitsResponse, @@ -54,6 +60,10 @@ import { PutV1CompanyBenefitsCompanyBenefitIdRequest, PutV1CompanyBenefitsCompanyBenefitIdResponse, } from "../models/operations/putv1companybenefitscompanybenefitid.js"; +import { + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse, +} from "../models/operations/putv1companybenefitscompanybenefitidcontributionexclusions.js"; import { PutV1CompanyBenefitsCompanyBenefitIdEmployeeBenefitsRequest, PutV1CompanyBenefitsCompanyBenefitIdEmployeeBenefitsResponse, @@ -298,4 +308,54 @@ export class CompanyBenefits extends ClientSDK { options, )); } + + /** + * Get contribution exclusions for a company benefit + * + * @remarks + * Returns all contributions for a given company benefit and whether they are excluded or not. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:read` + */ + async getV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + request: GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, + ): Promise< + GetV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + > { + return unwrapAsync( + companyBenefitsGetV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + this, + request, + options, + ), + ); + } + + /** + * Update contribution exclusions for a company benefit + * + * @remarks + * Updates contribution exclusions for a given company benefit. + * + * Currently this endpoint only works for 401-k and Roth 401-k benefit types. + * + * scope: `company_benefits:write` + */ + async putV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + request: PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsRequest, + options?: RequestOptions, + ): Promise< + PutV1CompanyBenefitsCompanyBenefitIdContributionExclusionsResponse + > { + return unwrapAsync( + companyBenefitsPutV1CompanyBenefitsCompanyBenefitIdContributionExclusions( + this, + request, + options, + ), + ); + } } diff --git a/gusto_embedded/src/sdk/suspensions.ts b/gusto_embedded/src/sdk/suspensions.ts index 7a7039e8..57980f21 100644 --- a/gusto_embedded/src/sdk/suspensions.ts +++ b/gusto_embedded/src/sdk/suspensions.ts @@ -22,7 +22,7 @@ export class Suspensions extends ClientSDK { * @remarks * Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. * - * > 📘 To check if company is already suspended + * >📘 To check if company is already suspended * > * > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. *