Update @mitodl/mitxonline-api-axios to 2026.8.6 - #3734
Open
ChristopherChudzicki wants to merge 1 commit into
Open
Update @mitodl/mitxonline-api-axios to 2026.8.6#3734ChristopherChudzicki wants to merge 1 commit into
ChristopherChudzicki wants to merge 1 commit into
Conversation
| } = useQuery(managerOrganizationQueries.managerOrganizationsList()) | ||
|
|
||
| const org = managerOrgs?.find(matchOrganizationBySlug(orgSlug)) | ||
| const orgUuid = getOrgUuid(org) |
Contributor
Author
There was a problem hiding this comment.
Previously, this did
const value = (org as { sso_organization_id?: unknown } | undefined)
?.sso_organization_id
return typeof value === "string" && value.length > 0 ? value : nullI.e., it was a type-safe way of getting sso_organization_id before it was included in the API client.
(I guess it also omitted empty string "" uuids. The new version, direct access, does not do that. But if the uuid is empty, then we have bigger problems... we should trust the API)
ChristopherChudzicki
marked this pull request as ready for review
August 6, 2026 20:48
Three required-field additions in the regenerated client are breaking: - `ManagerEnrollmentCode` gains `email_status` and `email_status_event_timestamp` - `OrganizationPage` gains `sso_organization_id: string | null` - `b2bManagerOrganizationsList` gains a positional `sso_organization_id` parameter ahead of `options` (our only caller passes no arguments, so it is unaffected) Everything else in the release is additive and currently unused: `OrderStatus`/`ordersStatusRetrieve`, `b2bServiceOrganizationManagerCheck`, `EmailStatusEnum`, `anonymous_id` on baskets, and optional `LegalAddress` fields. `Basket.user`/`BasketWithProduct.user` also loosened to `number | null | undefined`; nothing reads `.user`. Give the two factories the new fields. `OrganizationCards.test.tsx` built eleven `OrganizationPage` literals by hand; route them through the factory the file already uses elsewhere so the next required field does not break them again. Every field except `sso_organization_id` was already explicitly overridden and `mergeOverrides` overwrites arrays rather than merging, so the objects are unchanged. Drop the `Analytics/orgUuid.ts` shim, which carried a TODO to delete itself once this client landed, and read `org.sso_organization_id` directly. Behavior is unchanged: all four analytics queries are gated on `enabled: analyticsAvailable`, which requires a truthy `orgUuid`, so an absent, null, or empty UUID still reads as "analytics unavailable" and never reaches the API with `undefined` in the path. Pin the version exactly rather than with a caret, matching `@mitodl/mit-learn-api-axios` and `@mitodl/smoot-design`. A caret on a date-versioned generated client lets a plain `yarn install` pull one that adds required fields, which is exactly the breakage above. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ChristopherChudzicki
force-pushed
the
update-mitxonline-api-client
branch
from
August 7, 2026 14:05
15449b9 to
d4c7011
Compare
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
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.
What are the relevant tickets?
None, but doing this as a prereq to #3709
Description (What does it do?)
Bumps the mitxonline api client; adds fields to factories, etc.
How can this be tested?
Tests should pass