Skip to content

feat: expose organization domains in public APIs (CM-1266)#4315

Merged
skwowet merged 9 commits into
mainfrom
CM-1266-public-api-org-domains
Jul 8, 2026
Merged

feat: expose organization domains in public APIs (CM-1266)#4315
skwowet merged 9 commits into
mainfrom
CM-1266-public-api-org-domains

Conversation

@skwowet

@skwowet skwowet commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added organizationDomains to public work experience responses
  • Made domain enrichment optional in fetchManyMemberOrgsWithOrgData so existing callers are unaffected
  • Extended GET /organizations to support lookups by domain or name
  • Added deterministic ranking when multiple organizations match
  • Included the resolved primary domain in organization create and lookup responses
  • Updated the public OpenAPI spec

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
@skwowet skwowet self-assigned this Jul 7, 2026
Copilot AI review requested due to automatic review settings July 7, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fetchManyMemberOrgsWithOrgData and surfaced organizationDomains in public work experience responses.
  • Implemented findOrganizationByNameOrDomain and updated GET /organizations to accept domain, name, or both, with deterministic ranking.
  • Updated public API responses/spec to include the resolved primary domain and 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.

Comment thread services/libs/data-access-layer/src/organizations/base.ts
Comment thread backend/src/api/public/v1/organizations/getOrganization.ts Outdated
skwowet added 2 commits July 8, 2026 00:31
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread backend/src/api/public/v1/organizations/createOrganization.ts
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread backend/src/api/public/v1/organizations/getOrganization.ts
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 05:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread backend/src/api/public/v1/organizations/getOrganization.ts
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 06:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 06:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread backend/src/api/public/v1/organizations/getOrganization.ts Outdated
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@skwowet
skwowet merged commit 16c13f0 into main Jul 8, 2026
12 checks passed
@skwowet
skwowet deleted the CM-1266-public-api-org-domains branch July 8, 2026 08:11
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.

2 participants