feat: Add flag targets and flag target types resources - #1683
feat: Add flag targets and flag target types resources#1683Deborah-Digges wants to merge 4 commits into
Conversation
Frees the FlagTarget name for the generated /flag_targets resource model, which the oagen node emitter otherwise aliases to the poll-response shape. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated from the OpenAPI spec via oagen for the new /flag_targets and /flag_target_types endpoints (AUTH-6891): - workos.flagTargets: list/create/get/delete flag targets - workos.flagTargetTypes: list/create/get custom flag target types Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Original prompt from deborah.digges
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Greptile SummaryThe PR adds generated SDK resources for managing flag targets and flag target types and wires them into the WorkOS client. It also renames the runtime polling target interface and exports the new resource interfaces from both package entrypoints.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Description
Adds the oagen-generated SDK surface for the new flag target endpoints:
workos.flagTargets—listFlagTargets,createFlagTarget,getFlagTarget,deleteFlagTarget(/flag_targets)workos.flagTargetTypes—listFlagTargetTypes,createFlagTargetType,getFlagTargetType(/flag_target_types)All resource classes, interfaces, serializers, tests, and fixtures under
src/flag-targets/andsrc/flag-target-types/are generated by oagen from the OpenAPI spec (no hand-written wrappers, per the ticket). Hand-edited files are limited to wiring the accessors insrc/workos.tsand the interface exports insrc/index.ts.Naming note (potentially breaking, type-only): the runtime client's poll-response interface
FlagTarget { id; enabled }is renamed toFlagPollTarget, freeing theFlagTargetname for the API resource model:Without the rename, the emitter aliases the resource's return type to the existing (incompatible) poll shape. Only type-level imports of
FlagTargetfrom the poll response are affected; runtime behavior is unchanged.The endpoints are still
@ApiExcludeController()in the monorepo; making them public in the spec/docs ships separately once SDKs are released.Fixes AUTH-6891
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
API reference docs for these endpoints are generated from the monorepo spec and will ship with the PR that removes
@ApiExcludeController().Link to Devin session: https://app.devin.ai/sessions/fdf25eeb8122400891ee756d079bfbeb
Requested by: @Deborah-Digges