Repository navigation
refactor(client): type request bodies via shared contract aliases - #2801
Merged
Merged
Conversation
Replace every typeof <x>Contract.<op>.<part>._type|._input extraction in apps/client with type aliases exported from packages/shared contracts (ClientInferRequest), matching the zone, deployment, and stage conventions. CreateProject keeps an output-typed alias (CreateProjectData) for the form model consumed by ProjectSettings. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: I9490a12c2325d48da7d48c725f1e8d8e6a6a6964
|
StephaneTrebel
approved these changes
Sep 30, 2026
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.

1 New Issue
0 Fixed Issues
0 Accepted Issues
Issues liées
Refs #1889
Quel est le comportement actuel ?
apps/clientextrait les types de requête par accès internes zod :typeof <x>Contract.<op>.<part>._typeou._input— 15 occurrences dans 8 fichiers (stores, utils, vues).Quel est le nouveau comportement ?
Chaque occurrence est remplacée par un alias exporté de
packages/shared/src/contracts/*:ClientInferRequest<typeof xContract.op>['body' | 'query'], la convention déjà établie parzone,deploymentetstage.admin-role.ts:PatchAdminRolesBodyadmin-token.ts:ListAdminTokensQuery,CreateAdminTokenBodyproject.ts:UpdateProjectBody,ListProjectsQuery,BulkActionProjectBody(+CreateProjectData, saveur outputz.inferpour le modèle de formulaire deCreateProject.vueconsommé parProjectSettings—CoerceBooleanSchemadiverge en entrée/sortie)system.ts:ListSystemSettingsQueryproject-member.ts:PatchMembersBodyproject-role.ts:PatchProjectRolesBody,CreateProjectRoleBodyCreateProjectBodyexistant reste inchangé ;stores/token.tsetstores/users.tsne sont pas touchés (déjà couverts par #2279, et en collision avec #2738 surcontracts/user.ts— à traiter dans cette PR).Cette PR introduit-elle un breaking change ?
Non.
Autres informations
Aucune occurrence brute ne subsiste en dehors de ces deux fichiers. Vérifié : build shared,
vue-tscclient, 88 tests shared, 77 tests client, eslint. Aucun changement d'exécution (types effacés à la compilation).