Skip to content

feat: add OU APIs, tree picker component, and OU_SELECT flow support#428

Merged
DonOmalVindula merged 2 commits intoasgardeo:mainfrom
DonOmalVindula:feat/ou-apis-tree-picker-invite-step
Mar 26, 2026
Merged

feat: add OU APIs, tree picker component, and OU_SELECT flow support#428
DonOmalVindula merged 2 commits intoasgardeo:mainfrom
DonOmalVindula:feat/ou-apis-tree-picker-invite-step

Conversation

@DonOmalVindula
Copy link
Copy Markdown
Contributor

@DonOmalVindula DonOmalVindula commented Mar 25, 2026

Summary

Adds Organization Unit (OU) support to @asgardeo/javascript and @asgardeo/react for the InviteUser flow.

  • New V2 API functions: getOrganizationUnit, getOrganizationUnitChildren, getUserSchemas — follow existing V2 pattern (direct fetch, url/baseUrl fallback, AsgardeoAPIError)
  • New V2 model types: OrganizationUnit, OrganizationUnitListResponse, UserSchemaInfo, UserSchemaListResponse, plus request config interfaces
  • OrganizationUnitPicker V2 component: Hierarchical tree with expand/collapse, lazy loading of children, "Load More" pagination, selected state highlight, loading skeletons, theme-aware via useTheme()
  • OU_SELECT component type: Added to EmbeddedFlowComponentType enum and handled in AuthOptionFactory — follows the existing backend-driven component rendering pattern where the backend sends OU_SELECT components with additionalData.rootOuId and the factory renders the OrganizationUnitPicker
  • Simplified InviteUser integration: No client-side step inference needed — the OU picker renders as part of the normal component tree, consistent with how all other component types (text inputs, selects, actions, etc.) are handled

Resolves: asgardeo/thunder#1946

Test plan

  • Build passes (pnpm build)
  • Link local SDK to Thunder console via pnpm link or overrides
  • InviteUser flow: select user type → backend sends OU_SELECT step → OU picker renders → select OU → continue → fill details → invite generated
  • InviteUser flow without OU: existing behavior unchanged (no OU_SELECT component sent by backend)
  • OU picker: expand/collapse nodes, lazy loading, "Load More" pagination, selected highlight

@DonOmalVindula DonOmalVindula force-pushed the feat/ou-apis-tree-picker-invite-step branch 2 times, most recently from d4cc25b to 933c856 Compare March 26, 2026 08:04
@DonOmalVindula DonOmalVindula changed the title feat: add OU APIs, tree picker V2 component, and InviteUser OU step feat: add OU APIs, tree picker component, and OU_SELECT flow support Mar 26, 2026
@DonOmalVindula DonOmalVindula force-pushed the feat/ou-apis-tree-picker-invite-step branch 4 times, most recently from 2cc242e to 1917889 Compare March 26, 2026 08:19
Add organization unit CRUD APIs (getOrganizationUnit, getOrganizationUnitChildren,
getUserSchemas) and a reusable OrganizationUnitPicker tree component with lazy
loading, expand/collapse, and pagination.

Integrate OU selection into the InviteUser flow by handling OU_SELECT as a
backend-driven component type in AuthOptionFactory, consistent with the existing
component rendering pattern. The backend sends OU_SELECT components with
additionalData.rootOuId, and the factory renders the OrganizationUnitPicker.
@DonOmalVindula DonOmalVindula force-pushed the feat/ou-apis-tree-picker-invite-step branch from 1917889 to 60ebcda Compare March 26, 2026 08:36
@asgardeo-github-bot
Copy link
Copy Markdown

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

@DonOmalVindula DonOmalVindula merged commit 8f960d4 into asgardeo:main Mar 26, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK: Add OU APIs, tree picker component, and OU_SELECT flow support

3 participants