Skip to content

Conversation

@davidcornu
Copy link
Contributor

Description

The types that the functions that deal with feature flags return (FeatureFlag and FeatureFlagResponse)

async listOrganizationFeatureFlags(
options: ListOrganizationFeatureFlagsOptions,
): Promise<AutoPaginatable<FeatureFlag>> {
aren't visible from the package entrypoint which means they can't be imported by third-party code.

This differs from other functionality (e.g. organizations) which

  1. Have an index.ts file which re-exports all their interfaces
    export * from './create-organization-options.interface';
    export * from './domain-data.interface';
    export * from './list-organization-feature-flags-options.interface';
    export * from './list-organizations-options.interface';
    export * from './organization.interface';
    export * from './update-organization-options.interface';
  2. Re-export these index files from the main entrypoint
    export * from './organizations/interfaces';

Changes

  1. Adds a feature-flags/interfaces/index.ts file to mirror the other namespaces
  2. Adds a export * from the above in src/index.ts

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@davidcornu davidcornu requested a review from a team as a code owner November 21, 2025 16:27
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 21, 2025

Greptile Overview

Greptile Summary

This PR exposes FeatureFlag and FeatureFlagResponse interfaces from the package entrypoint, making them importable by third-party code. The changes follow the established repository pattern used by other namespaces.

  • Created src/feature-flags/interfaces/index.ts to re-export feature flag interfaces
  • Added feature-flags interfaces export to main src/index.ts entrypoint
  • Changes align with existing patterns in the codebase (organizations, roles, etc.)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and follow the exact pattern already established in the codebase for other namespaces. No logic changes, security concerns, or breaking modifications—purely additive interface exports that improve the public API.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/feature-flags/interfaces/index.ts 5/5 Added interface re-export file following repository pattern
src/index.ts 5/5 Added feature-flags interfaces export to main entrypoint

Sequence Diagram

sequenceDiagram
    participant ThirdParty as Third-party Code
    participant MainIndex as src/index.ts
    participant FFIndex as src/feature-flags/interfaces/index.ts
    participant FFInterface as src/feature-flags/interfaces/feature-flag.interface.ts
    
    ThirdParty->>MainIndex: import { FeatureFlag, FeatureFlagResponse }
    MainIndex->>FFIndex: export * from './feature-flags/interfaces'
    FFIndex->>FFInterface: export * from './feature-flag.interface'
    FFInterface-->>FFIndex: FeatureFlag, FeatureFlagResponse
    FFIndex-->>MainIndex: Re-exported interfaces
    MainIndex-->>ThirdParty: FeatureFlag, FeatureFlagResponse available
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@stanleyphu stanleyphu merged commit b48829e into workos:main Nov 21, 2025
5 checks passed
@davidcornu davidcornu deleted the feature-flag-interfaces branch November 21, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants