feat(oagen[2/2]): Update existing SDK modules with generated types, docs, and serializers#1536
Open
gjtorikian wants to merge 1 commit intooagen/1/new-apisfrom
Open
feat(oagen[2/2]): Update existing SDK modules with generated types, docs, and serializers#1536gjtorikian wants to merge 1 commit intooagen/1/new-apisfrom
gjtorikian wants to merge 1 commit intooagen/1/new-apisfrom
Conversation
c9684b5 to
1cbfe41
Compare
…ocs, and serializers Generated by running: npm run sdk:generate:node --target ../backend/workos-node - JSDoc on all existing service methods (pulled from OpenAPI spec) - Serialize functions and Response interfaces alongside existing deserialize functions - Six new user-management sub-services (session tokens, CORS origins, JWT templates, redirect URIs, authorized applications, data providers) wired into workos.ts - New dependency interfaces, serializers, and enum types required by the above Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1cbfe41 to
25b79ea
Compare
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.
Description
This PR is the output of running
npm run sdk:generate:node --target ../backend/workos-nodeagainst the existing SDK. Everything in this diff was produced by the generator in a single run — no manual edits.The changes fall into a few categories:
JSDoc on every public method
The generator pulls descriptions, parameter docs, return types, and error codes directly from the OpenAPI spec and attaches them as JSDoc comments. This affects every service class:
api-keys,audit-logs,authorization,directory-sync,events,feature-flags,mfa,organizations,pipes,sso,user-management, andwidgets. No method signatures or behavior changed—just documentation.Serialize functions and Response interfaces
Previously, most modules only had
deserialize*functions (wire → SDK model). The generator now produces the inverseserialize*functions (SDK model → wire) and corresponding*Responseinterfaces. These are needed for features like request body serialization and round-trip type safety, and will be consumed by service methods as additional endpoints are wired up.Six new user-management sub-services
The generator identified groups of user-management endpoints that the API spec treats as distinct resources:
UserManagementSessionTokensUserManagementCorsOriginsUserManagementJWTTemplateUserManagementRedirectUrisUserManagementUsersAuthorizedApplicationsUserManagementDataProvidersThese are wired into
workos.tsas new readonly properties. Like the naming decisions in PR #1535 (AdminPortal, Permissions), these names come from the generator and match the API docs grouping.New dependency files (244 new, 39 modified)
Each modified file may import new types that didn't exist before. The generator only integrates files that are transitively reachable from resource/client entry points via the import graph — two layers of tree-shaking (model-level in
generate-files.tsand file-level inintegrate.ts) prevent orphan serializers, fixtures, and interfaces from being written to the target.Note: this is the second of two PRs. PR #1535 introduced the new services; this one updates existing services.