Reorganise `application/common/types/` contents
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- backend
Piste de recherche
Start with the imports and type files named in the review: application/common/types/api/users/ParticipantProfile.ts, participants/participant.ts, participants/invite.ts, and the root survey.ts and invite.ts. Trace their imports and usages, including the four types identified as unused, before deciding which moves belong in this follow-up. Done means shared types are organized at folder level, imports use the folder exports, and the generated spec remains unchanged.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
From @iamtanuj18 's review of #937:
application/commont/types/invite.ts includes this line: import { AlternativeContact, ContactMethod, StateTerritory } from './api/users/ParticipantProfile'
Suggestion: This line reaches into api/users/ParticipantProfile.ts, which holds shared domain types (ContactMethod, StateTerritory, AlternativeContact and so on) rather than one endpoint's request and response. No index.ts exports it, so 16 imports in the backend, both clients and integrations reach into it the same way, and participants/participant.ts and participants/invite.ts (InviteStatus) sit in endpoint folders too. Since you mentioned types/api has no clear pattern, ParticipantProfile.ts and participant.ts could move up to types/, next to survey.ts, and InviteStatus could join the root invite.ts. ParticipantWithProfile (participants/participant.ts:16) could move into getParticipantById.ts, its only user, since it builds on GetParticipantProfileResponse. The moves leave the generated spec unchanged, because TSOA names schemas by type name, not by file.
The wider tidy-up could follow the same idea. ProfilesController and InvitesController get their own folders, each index.ts exports its whole folder (export type for types, plain export for enums and consts), and a no-restricted-imports rule keeps imports at folder level. Four types are never used and could go at the same time: RevokeInviteRequest, GetSurveyVersionByIdResponse, GetUserSurveyStepRequest and GetUserSurveyStepsRequest. All of this could be a follow-up issue if this PR is big enough already.
- Langage dominant
- TypeScript
- Étoiles
- 4
- Forks
- 0
- Merge moyen
- 14 h 50 min
- PR mergées (30 j)
- 5
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Garvan-Data-Science-Platform/ctrl
-
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
-
admin-client backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 commentaire ·
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Toutes les issues de Garvan-Data-Science-Platform/ctrl
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
high priority
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 commentaire ·
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated messagePeut-être pris @CapThunder19 l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
joinmarket-webui/jam#1538 ·
Les mainteneurs répondent en général sous 1 jour
-
t0ggles
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
nolimits4web/swiper#8240 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour