Skip to content

chore: regenerate types from dhis2 2.43 - #972

Open
Chisomchima wants to merge 5 commits into
masterfrom
chore/regenerate-generated-types
Open

Chisomchima wants to merge 5 commits into
masterfrom
chore/regenerate-generated-types

Conversation

@Chisomchima

@Chisomchima Chisomchima commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Regenerate types from DHIS2 2.43

Updates src/types/generated/models.ts from the DHIS2 2.43 OpenAPI spec and fixes all TypeScript errors introduced by the new type shapes.

What changed

Generated types (src/types/generated/)

  • models.ts — fully regenerated from the 2.43 OpenAPI spec
  • utility.ts — loosened ModelCollectionResponse<T> constraint (removed extends IdentifiableObject) so PickWithFieldFilters results remain usable; fixed Prettify<T> intersection (& unknown → & {})
  • index.ts — kept export * instead of export type * so enum values are re-exported correctly; added eslint-disable for the intentional SystemSettings shadow in types/models.ts

Notable breaking type changes in 2.43

  • BaseIdentifiableObject now has many required fields (access, sharing, translations, attributeValues, etc.)
  • DataInputPeriod.period is now optional; closingDate/openingDate are now required
  • DataSet.displayOptions changed from string → Record<string, any>
  • Program.programStages / programTrackedEntityAttributes changed to Array<BaseIdentifiableObject>
  • CategoryCombo.categories changed to Array<IdentifiableObject> (no displayName, dataDimensionType, or categoryOptions)
  • Sharing type no longer includes external

App-side fixes (73 files)

  • Updated enum references to use standalone exported enum types (e.g. ProgramRuleVariable.valueType.TEXT → ValueType.TEXT)
  • Added explicit casts where model field shapes narrowed (e.g. Sharing, DataInputPeriod.period, programStages)
  • Replaced PickWithFieldFilters usages that produced never with explicit inline types (e.g. CategoriesSelector)
  • Fixed conditional JSON parsing where displayOptions can now be an object or string
  • Added // NOSONAR suppressions on redundant type alias lines in the generated file to satisfy SonarCloud quality gate

@netlify

netlify Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit c473c9a
🔍 Latest deploy log https://app.netlify.com/projects/dhis2-maintenance-app-beta/deploys/6a319f95e332000008529087
😎 Deploy Preview https://deploy-preview-972.maintenance-app-beta.netlify.dhis2.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@Chisomchima Chisomchima changed the title chore: regenerate types from DHIS2 2.43 and fix all resulting TypeScr… chore: regenerate types from dhis2 2.43 Jun 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Chisomchima
Chisomchima requested a review from a team June 16, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant