feat: expose organization domains in public APIs (CM-1266)#4315
Merged
Conversation
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the public API surface to expose verified organization domains: work-experience payloads now include organizationDomains, and the /organizations lookup endpoint supports searching by domain and/or exact name, with deterministic “most active” ranking when multiple matches exist.
Changes:
- Added optional domain enrichment to
fetchManyMemberOrgsWithOrgDataand surfacedorganizationDomainsin public work experience responses. - Implemented
findOrganizationByNameOrDomainand updatedGET /organizationsto acceptdomain,name, or both, with deterministic ranking. - Updated public API responses/spec to include the resolved primary
domainand added OpenAPI updates.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/libs/types/src/organizations.ts | Extends member-org role type to optionally carry organizationDomains. |
| services/libs/data-access-layer/src/organizations/base.ts | Adds DAL helper to look up orgs by name/domain with deterministic ranking + returns a resolved domain. |
| services/libs/data-access-layer/src/members/organizations.ts | Adds optional domain join/aggregation to member-org fetch and improves map construction. |
| backend/src/utils/mapper.ts | Includes organizationDomains in mapped work experience responses (defaults to []). |
| backend/src/api/public/v1/organizations/getOrganization.ts | Extends lookup to accept name and/or domain using new DAL helper. |
| backend/src/api/public/v1/organizations/createOrganization.ts | Includes resolved domain in create response payload. |
| backend/src/api/public/v1/members/work-experiences/verifyMemberWorkExperience.ts | Requests domains during verification response generation. |
| backend/src/api/public/v1/members/work-experiences/updateMemberWorkExperience.ts | Requests domains when returning updated work experience. |
| backend/src/api/public/v1/members/work-experiences/getMemberWorkExperiences.ts | Requests domains for work experience list responses. |
| backend/src/api/public/v1/members/work-experiences/createMemberWorkExperience.ts | Requests domains when returning created work experience. |
| backend/src/api/public/openapi.yaml | Updates endpoint docs and schemas to include domains + lookup-by-name support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.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
This PR adds organization domain support to the public APIs.
Work experience responses now include organization domains, and the organization lookup endpoint can now find organizations by either primary domain or exact display name.
Changes
organizationDomainsto public work experience responsesfetchManyMemberOrgsWithOrgDataso existing callers are unaffectedGET /organizationsto support lookups bydomainornamedomainin organization create and lookup responses