Reorganise `application/common/types/` contents
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- backend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 4
- Forks
- 0
- Merge médio
- 14h 50min
- PRs com merge (30d)
- 5
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Garvan-Data-Science-Platform/ctrl
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 82/100
-
admin-client backend bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
backend bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 comentário ·
-
backend bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
backend bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Todas as issues de Garvan-Data-Science-Platform/ctrl
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
dsh-market/dsh-market#877 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
stellar/stellar-dev-skill#151 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Trial & Error: guided Blind offer squeezes on phones and sits under the touch toolbar on iPadAbertaarea:arcade game ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
fderuiter/deruiter.dev#2281 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
scope: data grid type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias