feat!: bump @gusto/embedded-api to v2026-06-15#2312
Draft
jeffredodd wants to merge 3 commits into
Draft
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/Common/OnboardingStatusBadge/index.tsx: alias contractor's
and employee's distinct OnboardingStatus types (contractor's renamed from
ContractorOnboardingStatus1).
- src/shared/constants.ts: alias both OnboardingStatus imports
(contractor vs employee API) — same name in two different sources.
- src/components/Contractor/Profile/useContractorProfile.ts: WageType →
ContractorWageType.
- src/components/Contractor/Payments/CreatePayment/*: ContractorPayments
alias from new PostV1CompaniesCompanyIdContractorPaymentGroupsContractorPayments.
- src/components/Payroll/PayrollHistory/PayrollHistory.tsx: SortOrder
alias from new QueryParamSortOrder.
- src/components/Payroll/PayrollEditEmployee/* + helpers.ts: rename
PayrollEmployeeCompensationsType{Fixed,Hourly}Compensations and
PayrollEmployeeCompensationsTypeReimbursements to their new short names
(FixedCompensations, HourlyCompensations, Reimbursements).
- src/components/TimeOff/.../useSelectEmployeesData.ts: Include alias
from new GetV1CompaniesCompanyIdEmployeesQueryParamInclude.
- src/test/mocks/apis/contractor_payment_method.ts: Type alias from new
PutV1ContractorsContractorIdPaymentMethodType.
- src/components/Company/StateTaxes/StateTaxesList/List.tsx: drop legacy
setupComplete fallback (field removed in v2026-06-15) — use setupStatus
with InProgress as default.
Real consumer impact — number → string serialization of payroll dollar
amounts in v2026-06-15:
- EmployeeCompensations.grossPay/netPay/checkAmount changed from
`number | null` to `string | null` (server now returns string-formatted
decimals like "1234.56").
- src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx:
wrap reads with Number() at four sites (getCompanyCost arithmetic and
three formatCurrency calls).
- Storybook fixtures + unit-test mocks in PayrollOverview,
PayrollEditEmployee, and PayrollConfiguration regenerated to use string
literals for these fields.
Models import-path rename:
- @gusto/embedded-api-v-.../models/components/payroll →
@gusto/embedded-api-v-.../models/components/payrollshow (~7 SDK files).
Same exports (Payroll, PayrollPrepared, OffCycleReasonType,
EmployeeCompensations); only the source file moved.
X-Gusto-API-Version header constant flipped from '2026-02-01' to
'2026-06-15' in src/contexts/ApiProvider/apiVersionHook.ts (and matching
test assertions). Without this flip the upgrade is a runtime no-op.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- sdk-app prototype `ContractorProfile.tsx`: missed by the WageType → ContractorWageType rename (sdk-app has a separate tsconfig that tsc --noEmit didn't typecheck, so the bad import only surfaced in vite's rollup build). - Test fixtures (JSON + inline mock builders) for payroll show responses: flip `gross_pay`/`net_pay`/`check_amount` from numbers to strings to match the v2026-06-15 Zod schema. Affects two JSON fixtures, the inline `createCompensation` builder in PayrollConfiguration.test.tsx (+ one override), and the inline employee_compensations literal in OffCycleExecution.test.tsx. - `get-v1-companies-company_id-tax_requirements.json`: drop the removed `setup_complete` field and use `setup_status` instead. Update the matching StateTaxesList tests: delete the two "backward compatibility: setup_complete without setup_status" specs and the "with legacy setup_complete field only" describe block (the fallback branch they exercised was removed alongside the field), replace with a single spec covering the new "no setup_status → default to in_progress" fallback. 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
Stacked on top of #2255 (
upgrade/api-2026-02-01). Upgrades the SDK from@gusto/embedded-api-v-2026-02-01to@gusto/embedded-api-v-2026-06-15.Produced autonomously by the
api-version-upgradeskill (#2243). v2026-02-01 → v2026-06-15 was eval #3 in that skill's validation suite; this is the first real-world run.Every breaking change in v2026-06-15 is either:
number→ string-formatted decimal) caught at the call site bytscand fixed in place withNumber()wrapstsc --noEmitpassing cleanBreaking changes & how this PR verifies them
EmployeeCompensations.grossPay/netPay/checkAmount:number | null→string | null(server now returns string-formatted decimals like"1234.56")src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx(4 sites — wrap reads withNumber()); fixtures regenerated inPayrollOverview.stories.tsx,PayrollEditEmployee.stories.tsx,PayrollConfiguration.stories.tsx, and matching.test.tsx. Existinge2e/tests/payroll/91-regular-submit.spec.tsexercisesPayrollOverviewend-to-end as part of the regular flow — receipt-total assertion would fail ifgrossPay/netPayrendered asNaN. Typecheck CI.models/components/payrollremoved → moved tomodels/components/payrollshow(same exports:Payroll,PayrollPrepared,OffCycleReasonType,EmployeeCompensations)helpers.ts,usePreparedPayrollData.ts,payrollTypes.ts,PayrollConfiguration/*,PayrollEditEmployee/*,PayrollHistory/*,PayrollList/*,PayrollOverview/*,helpers.test.ts). Typecheck CI.ContractorOnboardingStatus1→OnboardingStatus(inmodels/components/contractor)src/shared/constants.tsaliases both the contractor's and employee'sOnboardingStatus(same name, two different sources) asContractorApiOnboardingStatus/EmployeeApiOnboardingStatus.src/components/Common/OnboardingStatusBadge/index.tsxre-aliased to use the per-domain types. Typecheck CI.WageType→ContractorWageType(inmodels/components/contractor)src/components/Contractor/Profile/useContractorProfile.ts:WageType as ApiWageType→ContractorWageType as ApiWageType. Typecheck CI.ContractorPaymentsremoved frompostv1companiescompanyidcontractorpaymentgroups→ renamed toPostV1CompaniesCompanyIdContractorPaymentGroupsContractorPaymentsCreatePayment.tsx,CreatePaymentPresentation.tsx,CreatePaymentPresentation.stories.tsx. Typecheck CI + existinge2e/tests/contractor/93-payment-submit.spec.ts.PayrollEmployeeCompensationsTypeFixedCompensations→FixedCompensations(and…Hourly…→HourlyCompensations,…Reimbursements→Reimbursements)helpers.ts,helpers.test.ts,PayrollEditEmployeePresentation.tsx,sdk-app/.../PayrollEditEmployeeConfigurations.tsx. Typecheck CI.Includeremoved fromgetv1companiescompanyidemployees→ renamed toGetV1CompaniesCompanyIdEmployeesQueryParamIncludeuseSelectEmployeesData.ts. Typecheck CI + existinge2e/tests/time-off/04-policy-add-employees-edge-cases.spec.ts.SortOrderremoved fromgetv1companiescompanyidpayrolls→ renamed toQueryParamSortOrderPayrollHistory.tsx. Typecheck CI.PutV1ContractorsContractorIdPaymentMethodTyperemoved → renamed toTypesrc/test/mocks/apis/contractor_payment_method.ts. Typecheck CI.TaxRequirementStatesList.setupCompleteremoved (legacy field;setupStatusis the replacement and existed in v2026-02-01)src/components/Company/StateTaxes/StateTaxesList/List.tsx:getSetupStatusnow returnsreq.setupStatus ?? SetupStatus.InProgress, dropping the unreachablesetupCompletefallback branch. Typecheck CI.models/components/*renamed (e.g.BenefitSummaryEmployees→Employees,ContractorPaymentReceiptLicensee→Licensee,EmployeeOnboardingDocumentsConfig→OnboardingDocumentsConfig, etc. — 30+ component files affected)src/imports these nested aliases directly; only top-level types (Employee,Contractor,Payroll,BenefitSummary, …) are imported.UnprocessableEntityErrorremoved fromcompaniesAcceptTermsOfService/companiesRetrieveTermsOfService/ 4× contractor rehire+termination mutation error unionsUnprocessableEntityErrorclass itself still exists; SDK consumers useerr instanceof UnprocessableEntityErrorfor runtime narrowing, which still works against the broader error type.PayrollPayrollStatusMetaType.initialCheckDate/payrollLatewidened to nullablePayrollConfiguration.tsx:409-410handle null correctly. No code change required.PeopleBatch.PartialSuccessenum value re-added (had been removed in v2026-02-01)versionheader.d.tsre-added inmodels/components/(had been removed in v2026-02-01); some react-query hooks now importVersionHeaderinstead of per-opHeaderXGustoAPIVersionaliasessrc/importsVersionHeaderdirectly.Options,SubmissionBlockerson contractor payment group ops;Splits/SplitByon employee payment method)What's in this PR
package.json+package-lock.json: dep swap (@gusto/embedded-api-v-2026-02-01→@gusto/embedded-api-v-2026-06-15@^0.0.1).src/files: import-path rename (covers source, tests, MSW mocks undersrc/test/mocks/apis/, hand-written cache-key string literals).sdk-app/files: import-path rename + cache-key flips.AGENTS.md,CLAUDE.md,src/CLAUDE.md,docs/hooks/*.md,docs/reference/*.md,docs/appendix/jobs-and-compensations.md,build/deriveEndpointInventory.ts,e2e/utils/validationErrorCollector.test.ts): version string updates.X-Gusto-API-Versionconstant flipped from'2026-02-01'→'2026-06-15'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.src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.tsx: 4 sites wrappinggrossPay/netPayreads withNumber()to handle the new string serialization.src/components/Company/StateTaxes/StateTaxesList/List.tsx: simplifiedgetSetupStatusto drop thesetupCompletefallback (field removed).880rewritten as'880'forgrossPay/netPay/checkAmount.src/shared/constants.ts+OnboardingStatusBadge/index.tsx: alias the two distinctOnboardingStatustypes (contractor vs employee API) by domain.Deprecations to flag to partners
None new in this version (the v2026-02-01 deprecations of
companiesAcceptTermsOfService/companiesRetrieveTermsOfServicecarry forward unchanged).Test plan
@gusto/embedded-api-v-2026-02-01refs outsideCHANGELOG.md/.reports/(verified locally; grep returns empty)X-Gusto-API-VersionHTTP header sends2026-06-15on every request (verified byapiVersionHook.test.tsandApiProvider.test.tsx)e2e/tests/payroll/91-regular-submit.spec.tsgreen — exercisesPayrollOverviewwith the new string-typedgrossPay/netPay; receipt total would fail to render if theNumber()wraps were missing.Acknowledgements
Stacked on top of #2255. After #2255 merges, this PR's base should be retargeted to
main.🤖 Generated with Claude Code