Reorganise `application/common/types/` contents
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4
- Forks
- 0
- Ø Merge
- 14 Std. 50 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Garvan-Data-Science-Platform/ctrl
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
admin-client backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 Kommentar ·
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Alle Issues in Garvan-Data-Science-Platform/ctrl
Ähnliche Issues
-
useFragment does not require `variables` when the fragment's variables type has required fieldsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
apollographql/apollo-client#13493 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsEvtl. vergeben @roboomp hat das heute übernommen. Offenbug prio:p2 providers triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
can1357/oh-my-pi#15798 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
code-yeongyu/oh-my-openagent#10172 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
PDFCraftTool/pdfcraft#189 ·
-
Add the Yahoo chart API duplicate last-day row (yfinance#573) to incidents.md (about 1 hour)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offendata docs good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
pacocartones/market-data-sanity-checker#160 ·
Maintainer antworten meist innerhalb von 1 Tag