feat!: bump @gusto/embedded-api to v2026-02-01#2255
Open
jeffredodd wants to merge 2 commits into
Open
Conversation
Mechanical version-string sweep across src/, sdk-app/, docs/, build/, e2e/, and instruction files. package.json swap + lockfile regeneration. Type fixups required for the bump to compile: - src/components/Payroll/usePreparedPayrollData.ts: removed `QueryParamSortBy` import (no longer exported from putv1companiescompanyidpayrollspayrollidprepare op; collapsed to plain `string` in v2026-02-01). Critical runtime sweep: - src/contexts/ApiProvider/apiVersionHook.ts: flipped `CURRENT_API_VERSION = '2026-02-01'` (the bare-date X-Gusto-API-Version header constant). Without this flip the upgrade would be a runtime no-op — types claim the new version but the SDK would still send the old version on every request. Test assertions in apiVersionHook.test.ts (3 sites) and ApiProvider.test.tsx (1 site) updated to match. Drive-by: added language tags (`text`/`bash`) to 4 fenced code blocks in AGENTS.md and 2 in src/CLAUDE.md to satisfy markdownlint MD040, surfaced by the version-string touch on those files. See base PR description for the full breaking-change matrix and verification trail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the SDK from
@gusto/embedded-api-v-2025-11-15to@gusto/embedded-api-v-2026-02-01.Every breaking change in v2026-02-01 is either:
normalizeToSDKError→errorHandling.error.fieldErrors[]→ inline UI render)Breaking changes & how this PR verifies them
QueryParamSortByremoved fromputv1companiescompanyidpayrollspayrollidprepareop (collapsed tostring)src/components/Payroll/usePreparedPayrollData.ts— removed the import, typedsortBy?: string. Typecheck CI.SortByremoved fromgetv1companiescompanyidpayrollspayrollidop (collapsed tostring)src/.GetV1CompanyFormsQueryParamSortByremoved fromgetv1companyformsopsrc/.PostV1CompaniesCompanyIdReportsEmployeesAnnualFicaWageResponseBodyremovedsrc/.VersionHeadercomponent removed (replaced by per-opHeaderXGustoAPIVersion)src/.Brexenum value removed fromCompany.defaultFundingType; new values added (partner_disbursement,rtp,line_of_credit)src/narrows on'brex'.MigrationStatusenum ("success") removed fromPartnerManagedCompanyMigrateResponse; replaced with newerrors[]/warnings[]shapesrc/.PartnerManagedCompanyMigrateRequestbody collapsed to{}(removedemail,ipAddress,externalUserId; ToS signer now resolved server-side from authenticated payroll-admin user)src/.Errors/Warningstypes onpartnermanagedcompanymigrationreadinessresponserenamed toPartnerManagedCompanyMigrationReadinessResponseErrors/…Warningssrc/.PayrollCreditBlockerUnblockOptionWaitForReverseWireMetadatacollapsed to{}(lostreverseWireDetailId,bankAccountLastFourDigits)src/.PeopleBatch.PartialSuccessenum value removedsrc/.EmployeeBenefit.deductionReducesTaxableIncomerequired → optional (widening)companiesAcceptTermsOfService/companiesRetrieveTermsOfServicedeprecated (use newpartner_managed_companies/{uuid}/terms_of_serviceendpoints instead)src/. Flag in partner release notes.emailnow required at the serversrc/components/Employee/Profile/shared/useEmployeeDetailsForm/buildFormSchema.tsand existing unit tests atbuildFormSchema.test.ts:382-412anduseEmployeeDetailsForm.test.tsx:106already cover the gate. If the server rule were to disagree with the client refinement, the SDK'snormalizeToSDKError→errorHandling.error.fieldErrors[]→ inline UI render path surfaces the server message identically to the client gate.What's in this PR
package.json+package-lock.json: dep swap (@gusto/embedded-api-v-2025-11-15→@gusto/embedded-api-v-2026-02-01@^0.0.1).src/files: import-path rename (covers source, tests, MSW mocks undersrc/test/mocks/apis/, and hand-written cache-key string literals — e.g.createSdkQueryClient.ts,ApiProvider.tsx,TimeOff/*,Company/Locations/LocationForm/LocationForm.tsx).sdk-app/files: import-path rename + cache-key flips indesign/prototypes/contractor-management/*.AGENTS.md,CLAUDE.md,src/CLAUDE.md,docs/hooks/*.md,docs/reference/index.md,docs/reference/utilities.md,docs/appendix/jobs-and-compensations.md,build/deriveEndpointInventory.ts,e2e/utils/validationErrorCollector.test.ts): version string updates.X-Gusto-API-Versionconstant flipped from'2025-11-15'→'2026-02-01'insrc/contexts/ApiProvider/apiVersionHook.ts:3, plus matching assertions inapiVersionHook.test.ts(3 sites) andApiProvider.test.tsx(1 site). Without this flip the upgrade would be a runtime no-op — types claim the new version but the SDK would still send the old one on every HTTP request.src/components/Payroll/usePreparedPayrollData.ts— removedQueryParamSortByimport (no longer exported); typedsortBy?: string.AGENTS.mdand 2 insrc/CLAUDE.mdto satisfy markdownlint MD040 (pre-existing violations surfaced by the version-string sweep).Deprecations to flag to partners
companiesAcceptTermsOfService/companiesRetrieveTermsOfServiceare marked@deprecatedin v2026-02-01. They continue to work but partners should migrate toPOST/PUT/GET /v1/partner_managed_companies/{company_uuid}/terms_of_service. The SDK does not consume either hook.payrollCreditBlockerUnblockOptionWaitForReverseWire.reverseWireDetailId(the bare DB id) is deprecated in favor ofreverseWireDetailUuid(when partners exist who use this; the SDK does not).Test plan
@gusto/embedded-api-v-2025-11-15refs outsideCHANGELOG.md/.reports/(verified locally; grep returns empty)createSdkQueryClient.ts)X-Gusto-API-VersionHTTP header sends2026-02-01on every request (verified byapiVersionHook.test.tsandApiProvider.test.tsx)Acknowledgements
This PR was produced autonomously by the
api-version-upgradeskill (#2243) as the canonical demonstration of the autonomous upgrade workflow.🤖 Generated with Claude Code