From 891e48b826d2d821ac96aa98f9de5fc6e8e0b233 Mon Sep 17 00:00:00 2001 From: Davis799 Date: Mon, 25 Sep 2023 15:43:07 +0300 Subject: [PATCH 001/253] feat: routes Set up routing --- d2.config.js | 14 +- i18n/en.pot | 30 + package.json | 100 +-- src/App.module.css | 14 +- src/App.tsx | 12 +- src/modules/Configuration/Configuration.tsx | 5 + src/modules/Configuration/index.ts | 1 + src/modules/Layout/Layout.tsx | 24 + .../components/SideNav/SideNav.module.css | 22 + .../Layout/components/SideNav/SideNav.tsx | 44 ++ .../Layout/components/SideNav/index.ts | 1 + src/modules/Layout/index.ts | 1 + src/modules/Reports/Reports.tsx | 5 + src/modules/Reports/index.ts | 1 + src/modules/Routes/Routes.tsx | 40 + .../Routes/components/MainNavigator.tsx | 9 + .../Routes/components/PageNotFound.tsx | 18 + src/modules/Routes/constants/nav.tsx | 64 ++ src/modules/Routes/index.ts | 1 + src/modules/Routes/utils/nav.tsx | 23 + src/modules/TBAdherence/TBAdherence.tsx | 10 + src/modules/TBAdherence/constants/filters.ts | 3 + src/modules/TBAdherence/index.ts | 1 + src/modules/shared/components/ErrorPage.tsx | 50 ++ .../shared/components/Loaders/index.tsx | 25 + src/styles/common.css | 197 +++++ src/types/index.d.ts | 9 +- yarn.lock | 689 +++++++++++++++++- 28 files changed, 1341 insertions(+), 72 deletions(-) create mode 100644 i18n/en.pot create mode 100644 src/modules/Configuration/Configuration.tsx create mode 100644 src/modules/Configuration/index.ts create mode 100644 src/modules/Layout/Layout.tsx create mode 100644 src/modules/Layout/components/SideNav/SideNav.module.css create mode 100644 src/modules/Layout/components/SideNav/SideNav.tsx create mode 100644 src/modules/Layout/components/SideNav/index.ts create mode 100644 src/modules/Layout/index.ts create mode 100644 src/modules/Reports/Reports.tsx create mode 100644 src/modules/Reports/index.ts create mode 100644 src/modules/Routes/Routes.tsx create mode 100644 src/modules/Routes/components/MainNavigator.tsx create mode 100644 src/modules/Routes/components/PageNotFound.tsx create mode 100644 src/modules/Routes/constants/nav.tsx create mode 100644 src/modules/Routes/index.ts create mode 100644 src/modules/Routes/utils/nav.tsx create mode 100644 src/modules/TBAdherence/TBAdherence.tsx create mode 100644 src/modules/TBAdherence/constants/filters.ts create mode 100644 src/modules/TBAdherence/index.ts create mode 100644 src/modules/shared/components/ErrorPage.tsx create mode 100644 src/modules/shared/components/Loaders/index.tsx create mode 100644 src/styles/common.css diff --git a/d2.config.js b/d2.config.js index 6dc95bc..444bb3a 100644 --- a/d2.config.js +++ b/d2.config.js @@ -1,9 +1,9 @@ const config = { - type: 'app', - title: "DAT Custom App", - entryPoints: { - app: './src/App.tsx', - }, -} + type: "app", + title: "Tanzania ETLs", + entryPoints: { + app: "./src/App.tsx", + }, +}; -module.exports = config +module.exports = config; diff --git a/i18n/en.pot b/i18n/en.pot new file mode 100644 index 0000000..5b5e2d2 --- /dev/null +++ b/i18n/en.pot @@ -0,0 +1,30 @@ +msgid "" +msgstr "" +"Project-Id-Version: i18next-conv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"POT-Creation-Date: 2023-09-25T10:26:17.153Z\n" +"PO-Revision-Date: 2023-09-25T10:26:17.153Z\n" + +msgid "Something went wrong" +msgstr "Something went wrong" + +msgid "The page you are looking for does not exist." +msgstr "The page you are looking for does not exist." + +msgid "Go to home page" +msgstr "Go to home page" + +msgid "TB Adherence" +msgstr "TB Adherence" + +msgid "Reports" +msgstr "Reports" + +msgid "Configuration" +msgstr "Configuration" + +msgid "Reload" +msgstr "Reload" diff --git a/package.json b/package.json index 3a03aa7..fe93180 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,53 @@ { - "name": "etls-data-app", - "version": "1.0.0", - "description": "", - "license": "BSD-3-Clause", - "private": true, - "scripts": { - "build": "d2-app-scripts build", - "start": "dotenv -- cross-var d2-app-scripts start --proxy %DHIS2_PROXY_TO%", - "deploy": "d2-app-scripts deploy", - "cy:start": "REACT_APP_NODE_ENV=test BROWSER=none yarn start", - "cy:prepare": "start-server-and-test 'yarn cy:start' http://localhost:3000", - "test:open": "yarn cy:prepare 'yarn cypress open --env networkMode=live'", - "_cy:live": "dotenv -- cross-var yarn cypress run --env networkMode=live --key %CYPRESS_RECORD_KEY%", - "test:live": "yarn cy:prepare 'yarn _cy:live'", - "_cy:capture": "yarn cypress run --env networkMode=capture", - "test:capture": "yarn cy:prepare 'yarn _cy:capture'", - "_cy:stub": "dotenv -- cross-var yarn cypress run --env networkMode=stub", - "test": "yarn cy:prepare 'yarn _cy:live'", - "prepare": "husky install" - }, - "devDependencies": { - "@badeball/cypress-cucumber-preprocessor": "16.0.3", - "@cypress/webpack-preprocessor": "^6.0.0", - "@dhis2/cli-app-scripts": "^10.3.10", - "@dhis2/cypress-commands": "^10.0.3", - "@dhis2/cypress-plugins": "^10.0.3", - "@typescript-eslint/eslint-plugin": "^6.7.2", - "@typescript-eslint/parser": "^6.7.2", - "cross-var": "^1.1.0", - "cypress": "^13.2.0", - "dotenv": "^16.3.1", - "dotenv-cli": "^7.3.0", - "eslint": "^8.49.0", - "eslint-plugin-react": "^7.33.2", - "husky": ">=6", - "lint-staged": ">=10", - "prettier": "3.0.3", - "start-server-and-test": "^2.0.0", - "ts-loader": "^9.4.4", - "typescript": "^5.2.2" - }, - "dependencies": { - "@dhis2/app-runtime": "^3.9.4", - "@dhis2/ui": "^8.14.4" - }, - "lint-staged": { - "*.js": "eslint --cache --fix", - "*.{js,css,md}": "prettier --write" - } + "name": "etls-data-app", + "version": "1.0.0", + "description": "", + "license": "BSD-3-Clause", + "private": true, + "scripts": { + "build": "d2-app-scripts build", + "start": "dotenv -- cross-var d2-app-scripts start --proxy %DHIS2_PROXY%", + "deploy": "d2-app-scripts deploy", + "cy:start": "REACT_APP_NODE_ENV=test BROWSER=none yarn start", + "cy:prepare": "start-server-and-test 'yarn cy:start' http://localhost:3000", + "test:open": "yarn cy:prepare 'yarn cypress open --env networkMode=live'", + "_cy:live": "dotenv -- cross-var yarn cypress run --env networkMode=live --key %CYPRESS_RECORD_KEY%", + "test:live": "yarn cy:prepare 'yarn _cy:live'", + "_cy:capture": "yarn cypress run --env networkMode=capture", + "test:capture": "yarn cy:prepare 'yarn _cy:capture'", + "_cy:stub": "dotenv -- cross-var yarn cypress run --env networkMode=stub", + "test": "yarn cy:prepare 'yarn _cy:live'", + "prepare": "husky install" + }, + "devDependencies": { + "@badeball/cypress-cucumber-preprocessor": "16.0.3", + "@cypress/webpack-preprocessor": "^6.0.0", + "@dhis2/cli-app-scripts": "^10.3.10", + "@dhis2/cypress-commands": "^10.0.3", + "@dhis2/cypress-plugins": "^10.0.3", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "cross-var": "^1.1.0", + "cypress": "^13.2.0", + "dotenv": "^16.3.1", + "dotenv-cli": "^7.3.0", + "eslint": "^8.49.0", + "eslint-plugin-react": "^7.33.2", + "husky": ">=6", + "lint-staged": ">=10", + "prettier": "3.0.3", + "start-server-and-test": "^2.0.0", + "ts-loader": "^9.4.4", + "typescript": "^5.2.2" + }, + "dependencies": { + "@dhis2/app-runtime": "^3.9.4", + "@dhis2/ui": "^8.14.5", + "react-router": "^6.16.0", + "react-router-dom": "^6.16.0" + }, + "lint-staged": { + "*.js": "eslint --cache --fix", + "*.{js,css,md}": "prettier --write" + } } diff --git a/src/App.module.css b/src/App.module.css index a824cff..f33264d 100644 --- a/src/App.module.css +++ b/src/App.module.css @@ -1,9 +1,9 @@ .container { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: 1rem; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 1rem; } diff --git a/src/App.tsx b/src/App.tsx index 4012377..5f67bab 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,13 @@ -import React from "react"; -import classes from "./App.module.css"; +import "./styles/common.css"; +import React, { Suspense } from "react"; +import { Routes } from "./modules/Routes"; +import { FullPageLoader } from "./modules/shared/components/Loaders"; const MyApp = () => ( -
-

DAT Custom App

+
+ }> + +
); diff --git a/src/modules/Configuration/Configuration.tsx b/src/modules/Configuration/Configuration.tsx new file mode 100644 index 0000000..68e8252 --- /dev/null +++ b/src/modules/Configuration/Configuration.tsx @@ -0,0 +1,5 @@ +import React from "react"; + +export function Configuration() { + return
Configuration
; +} diff --git a/src/modules/Configuration/index.ts b/src/modules/Configuration/index.ts new file mode 100644 index 0000000..876f55e --- /dev/null +++ b/src/modules/Configuration/index.ts @@ -0,0 +1 @@ +export * from "./Configuration"; diff --git a/src/modules/Layout/Layout.tsx b/src/modules/Layout/Layout.tsx new file mode 100644 index 0000000..fb99cb3 --- /dev/null +++ b/src/modules/Layout/Layout.tsx @@ -0,0 +1,24 @@ +import React, { Suspense } from "react"; +import { Outlet } from "react-router-dom"; +import { SideNav } from "./components/SideNav"; +import { FullPageLoader } from "../shared/components/Loaders"; + +export function Layout() { + return ( +
+ +
+ }> + + +
+
+ ); +} diff --git a/src/modules/Layout/components/SideNav/SideNav.module.css b/src/modules/Layout/components/SideNav/SideNav.module.css new file mode 100644 index 0000000..17b8d35 --- /dev/null +++ b/src/modules/Layout/components/SideNav/SideNav.module.css @@ -0,0 +1,22 @@ +.menu-item { + margin-top: 15px; + padding-left: 20px !important; + font-size: 16px !important; + border-left: 7px solid transparent; + background: #f3f5f7 !important; +} + +.selected { + border-left: 7px solid var(--main); + background: var(--background-color) !important; + + & a { + font-weight: bold !important; + } +} + +.aside { + background: #f3f5f7; + border-right: 2px solid #d5dde5; + height: auto; +} diff --git a/src/modules/Layout/components/SideNav/SideNav.tsx b/src/modules/Layout/components/SideNav/SideNav.tsx new file mode 100644 index 0000000..29f76f0 --- /dev/null +++ b/src/modules/Layout/components/SideNav/SideNav.tsx @@ -0,0 +1,44 @@ +import React from "react"; +import { ROUTES } from "../../../Routes/constants/nav"; +import { Menu, MenuItem } from "@dhis2/ui"; +import classes from "./SideNav.module.css"; +import classNames from "classnames"; +import { useMatches, useNavigate } from "react-router-dom"; + +export function SideNav() { + const matches = useMatches(); + const navigate = useNavigate(); + + return ( + + ); +} diff --git a/src/modules/Layout/components/SideNav/index.ts b/src/modules/Layout/components/SideNav/index.ts new file mode 100644 index 0000000..f039eea --- /dev/null +++ b/src/modules/Layout/components/SideNav/index.ts @@ -0,0 +1 @@ +export * from "./SideNav"; diff --git a/src/modules/Layout/index.ts b/src/modules/Layout/index.ts new file mode 100644 index 0000000..f7ad548 --- /dev/null +++ b/src/modules/Layout/index.ts @@ -0,0 +1 @@ +export * from "./Layout"; diff --git a/src/modules/Reports/Reports.tsx b/src/modules/Reports/Reports.tsx new file mode 100644 index 0000000..d33abee --- /dev/null +++ b/src/modules/Reports/Reports.tsx @@ -0,0 +1,5 @@ +import React from "react"; + +export function Reports() { + return
Reports
; +} diff --git a/src/modules/Reports/index.ts b/src/modules/Reports/index.ts new file mode 100644 index 0000000..b0f3ae9 --- /dev/null +++ b/src/modules/Reports/index.ts @@ -0,0 +1 @@ +export * from "./Reports"; diff --git a/src/modules/Routes/Routes.tsx b/src/modules/Routes/Routes.tsx new file mode 100644 index 0000000..eeb473a --- /dev/null +++ b/src/modules/Routes/Routes.tsx @@ -0,0 +1,40 @@ +import { createHashRouter, RouterProvider } from "react-router-dom"; +import { MainNavigator } from "./components/MainNavigator"; +import { ROUTES } from "./constants/nav"; +import { resolveRoute } from "./utils/nav"; +import React, { Suspense } from "react"; +import { FullPageLoader } from "../shared/components/Loaders"; +import ErrorPage from "../shared/components/ErrorPage"; +import { Layout } from "../Layout"; + +import { PageNotFound } from "./components/PageNotFound"; + +const router = createHashRouter([ + { + path: "*", + element: , + }, + + { + path: "/", + element: , + errorElement: , + children: [ + { + path: "/", + element: , + errorElement: , + index: true, + }, + ...ROUTES.map(resolveRoute), + ], + }, +]); + +export function Routes() { + return ( + }> + + + ); +} diff --git a/src/modules/Routes/components/MainNavigator.tsx b/src/modules/Routes/components/MainNavigator.tsx new file mode 100644 index 0000000..f932ce6 --- /dev/null +++ b/src/modules/Routes/components/MainNavigator.tsx @@ -0,0 +1,9 @@ +import React from "react"; +import { Navigate } from "react-router-dom"; +import { head } from "lodash"; +import { ROUTES } from "../constants/nav"; + +export function MainNavigator() { + const initialNav = head(ROUTES); + return ; +} diff --git a/src/modules/Routes/components/PageNotFound.tsx b/src/modules/Routes/components/PageNotFound.tsx new file mode 100644 index 0000000..bc9cc2d --- /dev/null +++ b/src/modules/Routes/components/PageNotFound.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import {Button, colors, IconError24} from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; +import {useNavigate} from "react-router-dom"; + +export function PageNotFound() { + const navigate = useNavigate(); + return ( +
+
+ +
+

{i18n.t("Something went wrong")}

+

{i18n.t("The page you are looking for does not exist.")}

+ +
+ ); +} diff --git a/src/modules/Routes/constants/nav.tsx b/src/modules/Routes/constants/nav.tsx new file mode 100644 index 0000000..e879af9 --- /dev/null +++ b/src/modules/Routes/constants/nav.tsx @@ -0,0 +1,64 @@ +import React from "react"; +import { TBAdherenceOutlet, TBAdherencePage } from "../../TBAdherence"; +import { Reports } from "../../Reports"; + +import { + IconDashboardWindow24, + IconSettings24, + IconVisualizationColumn24, +} from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; + +import { Navigate } from "react-router-dom"; + +import { getDefaultTBAdherenceFilters } from "../../TBAdherence/constants/filters"; + +import { Configuration } from "../../Configuration"; + +export interface NavItem { + label?: string | ((data: any) => any); + id: string; + path: string; + icon?: React.JSXElementConstructor; + element?: React.JSXElementConstructor; + subItems?: NavItem[]; +} + +export const ROUTES: NavItem[] = [ + { + id: "tbadherence", + path: "tbadherence", + element: TBAdherenceOutlet, + icon: IconVisualizationColumn24, + label: i18n.t("TB Adherence"), + subItems: [ + { + path: "", + id: "tbadherence-redirect", + element: () => { + const defaultParams = getDefaultTBAdherenceFilters(); + return ; + }, + }, + { + path: "list", + id: "tbadherence-list", + element: TBAdherencePage, + }, + ], + }, + { + id: "reports", + path: "reports", + element: Reports, + icon: IconDashboardWindow24, + label: i18n.t("Reports"), + }, + { + id: "configuration", + path: "configuration", + element: Configuration, + icon: IconSettings24, + label: i18n.t("Configuration"), + }, +]; diff --git a/src/modules/Routes/index.ts b/src/modules/Routes/index.ts new file mode 100644 index 0000000..1c001fc --- /dev/null +++ b/src/modules/Routes/index.ts @@ -0,0 +1 @@ +export * from "./Routes"; diff --git a/src/modules/Routes/utils/nav.tsx b/src/modules/Routes/utils/nav.tsx new file mode 100644 index 0000000..e9feece --- /dev/null +++ b/src/modules/Routes/utils/nav.tsx @@ -0,0 +1,23 @@ +import { Outlet, type RouteObject } from "react-router-dom"; +import { type NavItem } from "../constants/nav"; +import React from "react"; +import ErrorPage from "../../shared/components/ErrorPage"; + +export function resolveRoute({ + element, + path, + subItems, + label, +}: NavItem): RouteObject { + const Element = element ?? Outlet; + return { + path, + element: , + errorElement: , + children: subItems?.map(resolveRoute), + handle: { + crumb: label, + }, + hasErrorBoundary: true, + }; +} diff --git a/src/modules/TBAdherence/TBAdherence.tsx b/src/modules/TBAdherence/TBAdherence.tsx new file mode 100644 index 0000000..edad441 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherence.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import { Outlet } from "react-router-dom"; + +export function TBAdherenceOutlet() { + return ; +} + +export function TBAdherencePage() { + return
TB Adherence
; +} diff --git a/src/modules/TBAdherence/constants/filters.ts b/src/modules/TBAdherence/constants/filters.ts new file mode 100644 index 0000000..d60ba04 --- /dev/null +++ b/src/modules/TBAdherence/constants/filters.ts @@ -0,0 +1,3 @@ +export function getDefaultTBAdherenceFilters() { + return ""; +} diff --git a/src/modules/TBAdherence/index.ts b/src/modules/TBAdherence/index.ts new file mode 100644 index 0000000..eaa562d --- /dev/null +++ b/src/modules/TBAdherence/index.ts @@ -0,0 +1 @@ +export * from "./TBAdherence"; diff --git a/src/modules/shared/components/ErrorPage.tsx b/src/modules/shared/components/ErrorPage.tsx new file mode 100644 index 0000000..00b627a --- /dev/null +++ b/src/modules/shared/components/ErrorPage.tsx @@ -0,0 +1,50 @@ +import { Button, ButtonStrip, colors, IconError24 } from "@dhis2/ui"; +import React, { useState } from "react"; +import { useRouteError } from "react-router-dom"; +import i18n from "@dhis2/d2-i18n"; + +export default function ErrorPage ({ + error: errorFromBoundary, + resetErrorBoundary +}: { error?: Error, resetErrorBoundary?: () => void }) { + const error = errorFromBoundary ?? useRouteError() as Error; + const [showStack, setShowStack] = useState(false); + return ( +
+
+ +
+

{i18n.t("Something went wrong")}

+

{error.message}

+ { + showStack && ( +
+ + {error.stack} + +
+ ) + } + + + + +
+ ); +} diff --git a/src/modules/shared/components/Loaders/index.tsx b/src/modules/shared/components/Loaders/index.tsx new file mode 100644 index 0000000..0e332f6 --- /dev/null +++ b/src/modules/shared/components/Loaders/index.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import {CenteredContent, CircularLoader} from "@dhis2/ui"; + +export function FullPageLoader({ + minHeight, + message +}: { + minHeight?: number | string + message?: string +}): React.ReactElement { + return ( +
+ + {(message != null) &&

{message}

} +
+ ); +} + +export function CardLoader() { + return ( + + + + ); +} diff --git a/src/styles/common.css b/src/styles/common.css new file mode 100644 index 0000000..2b18fda --- /dev/null +++ b/src/styles/common.css @@ -0,0 +1,197 @@ +flex .column { + display: flex; + flex-direction: column; +} + +:root { + --primary: #1565c0; + --main: #2d6693; + --background-color: #e8eef1; + width: 100%; + background: var(--background-color); +} + +/*Make all asterisks red:*/ +label > span:nth-child(2) { + color: red; +} + +.text-center { + text-align: center; +} + +.row { + display: flex; +} + +.wrap { + flex-wrap: wrap; +} + +/*main axis alignment*/ +.center { + justify-content: center; +} + +.stretch { + justify-content: stretch; +} + +.align-stretch { + align-items: stretch; +} + +.start { + justify-content: flex-start; +} + +.end { + justify-content: flex-end; +} + +.space-between { + justify-content: space-between; +} + +/*cross axis alignment*/ +.align-center { + align-items: center; +} + +.align-start { + align-items: flex-start; +} + +.align-end { + align-items: flex-end; +} + +.gap-8 { + gap: 8px; +} + +.gap-16 { + gap: 16px; +} + +.gap-32 { + gap: 32px; +} + +.gap-64 { + gap: 64px; +} + +/*layout*/ +.full-width { + width: 100%; +} + +.w-100 { + width: 100%; +} + +.h-100 { + height: 100%; +} + +/*padding*/ +.p-16 { + padding: 16px; +} + +.p-32 { + padding: 32px; +} + +.p-8 { + padding: 8px; +} + +.pv-8 { + padding-bottom: 8px; + padding-top: 8px; +} + +.pv-16 { + padding-bottom: 16px; + padding-top: 16px; +} + +.ph-16 { + padding-left: 16px; + padding-right: 16px; +} + +.pb-32 { + padding-bottom: 32px; +} + +.pt-16 { + padding-top: 16px; +} + +/*icons*/ +.icon-size-32 > svg { + width: 32px; + height: 32px; +} + +.icon-size-64 > svg { + width: 64px; + height: 64px; +} + +.flex-1 { + flex: 1; +} + +.m-auto { + margin: auto; +} + +.h-30 { + height: 30%; +} + +.h-70 { + height: 70%; +} + +.custom-report-container { + margin: 0 8px; + padding-bottom: 16px; +} + +.custom-report-table { + width: 100%; + overflow-x: scroll; +} + +.m-0 { + margin: 0; +} + +.size-32 > svg { + width: 32px; + height: 32px; +} + +.size-64 > svg { + width: 64px; + height: 64px; +} + +.size-48 > svg { + width: 48px; + height: 48px; +} + +@media print { + .portrait-print { + @page { + size: A4 portrait !important; + margin: 2cm; + } + } +} diff --git a/src/types/index.d.ts b/src/types/index.d.ts index acb5195..65e43fd 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1,4 +1,5 @@ -declare module "*.css" -declare module "*.png" -declare module "@dhis2/cypress-plugins" -declare module "@dhis2/cypress-commands" +declare module "*.css"; +declare module "*.png"; +declare module "@dhis2/cypress-plugins"; +declare module "@dhis2/cypress-commands"; +declare module "@dhis2/ui"; diff --git a/yarn.lock b/yarn.lock index d82cfd1..cf366c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1541,6 +1541,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/alert@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/alert/-/alert-8.14.5.tgz#a943853898b2903b80dcde0a27940e82a41a2b7d" + integrity sha512-B83gUAJJxEy2IGi6H3+jRY6ea7NISIWERDFgezwIxSjvShyEEqhKf0wRHSAil4Rv2a0bBXr43SyVBaMILMXQTA== + dependencies: + "@dhis2-ui/portal" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/box@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-8.14.4.tgz#1ba2721e20c6db7e9dac65365944290aa4f983ff" @@ -1551,6 +1563,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/box@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-8.14.5.tgz#6f86d925e44a7c799232abafcb1c2db036aa6dda" + integrity sha512-B+6nGuB2jXM37wzDiSWe5pyyobSSTEwmbgQXA8KuskdRQ16GDszPKXc6QcP04bNhwEB7SNSepNZjPJAORX85Kg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/button@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-8.14.4.tgz#8a91d0a7ab42e646838801e5002372d63926306c" @@ -1565,6 +1587,20 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/button@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-8.14.5.tgz#e94fcba1afb74c49ac4b409509bf982a0f4a7adf" + integrity sha512-jNzRNctR6qARqRb48MBxDl60Jv6Rk89HDeCgZREnupK5In1ZGegG1tl294tfxBhTSq0/ROEXNxevfNlTqQBq+g== + dependencies: + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/calendar@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-8.14.4.tgz#60d7f57ff7f69512a68da11104350bc81588c704" @@ -1582,6 +1618,23 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/calendar@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-8.14.5.tgz#5e65ff92d98266f952034b73039d6336211c16f1" + integrity sha512-4+OZDmlIoEvvuNzXJUBaqoLgbl1pKWaNIHpn0bpl8uJggnl5eO/SaKGowANnOXbmrL5AD/2sqyz83hCaazrZAg== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2/multi-calendar-dates" "1.0.2" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/card@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-8.14.4.tgz#d578d3c49de17c6af32f4ae88a70efe871533faf" @@ -1592,6 +1645,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/card@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-8.14.5.tgz#127239b35a7388ced44a3b413723887061dc940f" + integrity sha512-YTwlYvE/BXyL7XILrGdRveBzy/51lwsK6Tb1QGQoZ6X7kchcrA6bCKwPlNwOiaz6g8QcDvG/xnfnBuGI0BD8rw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/center@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-8.14.4.tgz#0135ac308fa9b6c1b5673b4502c553f310500d3f" @@ -1602,6 +1665,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/center@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-8.14.5.tgz#050660cdd710813350a71bda773413870e4bdbed" + integrity sha512-BxOUMs52F/0xctxU57U1tVh+anHcAIsjmmJ3re8B1NnXP8kzYWI2FP88+BoC3v6qD1pobOkFx/Qr3xofJPIRAA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/checkbox@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-8.14.4.tgz#4a41828f97e81c35c14b9cd68afa1f4a861f3ba9" @@ -1614,6 +1687,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/checkbox@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-8.14.5.tgz#cd555482b21176563fae70344b70223eb3128729" + integrity sha512-AKd60wmGQY/wANB77y6jYfceMGmAGu73zHoQYAyKdw3B4noaTqeuvjfQf1C7qJA+ofF0XizKB7jXq6y5YTpZHQ== + dependencies: + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/required" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/chip@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-8.14.4.tgz#53589d0b216f78953cb8229704cc7e3ed2b62462" @@ -1624,6 +1709,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/chip@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-8.14.5.tgz#e86253fb19721a13ae2ced30cfa5d24b223929ac" + integrity sha512-wXpdrJX5Jtth5ISujeesRchbP7tKio3Oq8m7Ekwad8550dXiKj04u1I4qSD+Pxemutr4czZQBmkwY9fQfd5dCQ== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/cover@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-8.14.4.tgz#e2a20411216ad8c7fcc36b9be8abbaa3ca3480c7" @@ -1634,6 +1729,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/cover@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-8.14.5.tgz#4b848d9ba4fedf3142d2ad05e5746f7b42662b6c" + integrity sha512-QuuktAZON7f24Kxb62vCElKkStqzhTvR+TlHDenw9QfT4uoKa0AugIJsqdc11z3UgRahtIZEN8XuNIjK8dNVrQ== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/css@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-8.14.4.tgz#cf991df1d0cd1b49452a0f7788a721427a752e7e" @@ -1644,6 +1749,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/css@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-8.14.5.tgz#26a79357f874497f408ea2f2d7cb31b6cf68bd9d" + integrity sha512-7SZPHvI3dDszHhixrFVoueWSAfYJgBYeBbDSPlaaWUWtTY3QX3fpw5j2PMjp94xGLvJXDdvJLj6m6uP9ofFoeg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/divider@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-8.14.4.tgz#7445e7a0688c3e3d307aa6957727c6ced57779c0" @@ -1654,6 +1769,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/divider@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-8.14.5.tgz#59f8151aa290e28d12664d65eb8cbfb6d227b982" + integrity sha512-KEl62QO/T7kANphyqFaad3vXPTASiGKK+vTY4UE9gd94JzicqBeqDgQDLjZyOpT5OGL2ad9dwY5667WkPT0i2w== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/field@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-8.14.4.tgz#be7f5b17817a646e54fb390daf1670c2c57eb485" @@ -1667,6 +1792,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/field@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-8.14.5.tgz#f50b928e51c2e4919f12f90c47da22be8bcc80a6" + integrity sha512-wl0E8BKf/7oLHgPjpMegj/udnqjA36GgKaHWZ9h/1YKRAoYJoh+4N6nsOzyJwOMnfJ53nBd2pKbIMn8H5jWP6Q== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/help" "8.14.5" + "@dhis2-ui/label" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/file-input@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-8.14.4.tgz#8bb30eef82a1ad9c55fd8e18840f716ca082f302" @@ -1683,6 +1821,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/file-input@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-8.14.5.tgz#930f8f14d03f33412aa433da0f8754251b5eb58e" + integrity sha512-jutdpB8lM4iGPGDtAwR+2s/onXUAgoHXgvTy6cEQE5A0BFMfFphVJ0kdQMab9GYCH1/ufdAKdwjFtBM4tJjymg== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/label" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/status-icon" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/header-bar@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-8.14.4.tgz#bb0a27ec97ff0ad602ba3ddbb328d62b53834629" @@ -1707,6 +1861,30 @@ moment "^2.29.1" prop-types "^15.7.2" +"@dhis2-ui/header-bar@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-8.14.5.tgz#34dc19cec5eff6e720cc1d1e17e919ed2c6188f9" + integrity sha512-yiOREw+ZITGPFoR5ohalzSNNYz0BILEpo2J8KsRGJWgCTYhB1Pt2m68sOLEhLD1bvO6oVHmvxSP4binpoLv31A== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/center" "8.14.5" + "@dhis2-ui/divider" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/logo" "8.14.5" + "@dhis2-ui/menu" "8.14.5" + "@dhis2-ui/modal" "8.14.5" + "@dhis2-ui/user-avatar" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + moment "^2.29.1" + prop-types "^15.7.2" + "@dhis2-ui/help@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-8.14.4.tgz#0bc2916b0d2c32e7af6a1b4c632ec8ce3bb030bc" @@ -1717,6 +1895,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/help@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-8.14.5.tgz#6d05d94624ac19436ec3dc244db93cc8118f671c" + integrity sha512-4fX+jKXOn56YdaHwW5HWIN6HcXGUajlOJsZY73JA4eh2Bg6aiUAyNhJe7s0/6W0wl0k4PS0dvDi52emd1irtMQ== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/input@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-8.14.4.tgz#bf98c6d8aa2d2504d4805d825ff6b530ac1ea1ec" @@ -1733,6 +1921,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/input@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-8.14.5.tgz#82371e5b5eb4c8aed6040eeb631fddb06e08be43" + integrity sha512-BiQK6W+JIBm98oEMuoml7J4VdBgZb7P4oJVyrTQEUOXJvuZS1JZg9YFF4BFoPymRr5TremZ56LDxmPT3ShOWIA== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/status-icon" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/intersection-detector@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-8.14.4.tgz#4f91429d198f5ff1a4192e732f739be03f65ef31" @@ -1743,6 +1947,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/intersection-detector@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-8.14.5.tgz#53fb6fd4c0e45f135f4e32da72996f334ce3638f" + integrity sha512-pU51aBU0kkAyadItHG2sDAWyhbQVXBqUjjpNdwewu2yWmGDbpOoa+TACxl27fJshUTboAw5Xs5AQt3HR4832iA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/label@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-8.14.4.tgz#954dfce9ff6c24faa7966321e6ec7783c7846953" @@ -1754,6 +1968,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/label@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-8.14.5.tgz#5018d677623f209b78c09010ee81c69df8441ed4" + integrity sha512-Td2VfFo9P8rDwv9PxwsIPZZrYpvRbWeN0UCxX/U/+HOSz3th0HuV8KuG9N9ITwXDmq0RXHRRUpcD+FIC88JnkA== + dependencies: + "@dhis2-ui/required" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/layer@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-8.14.4.tgz#9a3c3ff0718943ac510de0a3b406f92ef4a1de69" @@ -1765,6 +1990,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/layer@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-8.14.5.tgz#b83d325162036200a21f06a69d04d1ce44953991" + integrity sha512-8MEQwSBNc/GjtfnvMD2ELMvoAw54Bv7IkQ75ifpmciPlo2N00bSTwB+wWApvr6bbZ1elsNjWd72saPzNZceJ/w== + dependencies: + "@dhis2-ui/portal" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/legend@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-8.14.4.tgz#7cc8da079870f2ee375dd28c96f8767b931ad9f2" @@ -1776,6 +2012,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/legend@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-8.14.5.tgz#a7545da6b0c567e7080508ac1e8b45227d9a6ebf" + integrity sha512-ATT18B7JAUIecyEdKuiFhiZevnhMmtFK/NVq/FdDyq+7I5gl1uGZ5S/ePFFUEreuZEHmyGoVRtjhlb/a/rdjZg== + dependencies: + "@dhis2-ui/required" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/loader@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-8.14.4.tgz#7f05127246fdf347c0d90e518c0aff3727b11987" @@ -1786,6 +2033,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/loader@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-8.14.5.tgz#1da467dcebf5e5f095a43b0839f1decb8b709279" + integrity sha512-8S7iomHlhLVSPJ4TsJoI2sC9eXrxz94ZHsRtVg8zFXuL0AtQAk0L/2WgDJlfVkj/fwwmhF/2qkcC01lOtwT/ZA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/logo@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-8.14.4.tgz#609cda1f8dd3760c5e1226158f61992e06a40d54" @@ -1796,6 +2053,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/logo@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-8.14.5.tgz#5605b1f7ceb101126aa63de3b0fcc0ab17dba5ed" + integrity sha512-OGUE2jxASFYJ2/hl5gv+zPWmOoxgzT9yYxbhF9vMi33qdALTIFlDnCqMaLkDIZMmjPl3tnJ+etLQaHyCP+T3aw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/menu@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-8.14.4.tgz#7ee83db0c8c1e2c77266821dfdc6fe693f3860cc" @@ -1812,6 +2079,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/menu@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-8.14.5.tgz#fc2ada6c1a16d393c329879f947cb706d3d6f9bf" + integrity sha512-V2Uw/1Yn0IZya5lh2erZJWHV8M3Y0VbApieDckmrd+WtLRbUA7dbC4ZGeT3eDdWP8H7GWbXKzxoFM3ENja5p5Q== + dependencies: + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/divider" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2-ui/portal" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/modal@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-8.14.4.tgz#e28e3212056f7dce30c411de740d096fd1a3c91b" @@ -1827,6 +2110,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/modal@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-8.14.5.tgz#6c6d4243a4e76949a3480109ae1c269579ade149" + integrity sha512-MA7NKcbhw95np7P5If3wHFFA4Mv1xKXV8LwWDUmlTKBBJvLemNHWbF48UsWWhJ/zAhLJxU+nqK7pXpZ38CRJgQ== + dependencies: + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/center" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/portal" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/node@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-8.14.4.tgz#7c731ebf70c0a6e7c611da9610f5f71bbf120197" @@ -1838,6 +2136,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/node@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-8.14.5.tgz#f9bfbc9bc10372d017fc705ae49cdd9d7e326449" + integrity sha512-xY/l+IGi/r+56IdRPqyxaSxUweD1zd1zZ1t47mILsvPbPC21P7QY+iNS+UGZ7jQwFDdP6CtQkb1y4PSniANPyA== + dependencies: + "@dhis2-ui/loader" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/notice-box@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-8.14.4.tgz#84bc5fc0a49ad3a4c28b9215c91570d5f3a2a00a" @@ -1849,6 +2158,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/notice-box@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-8.14.5.tgz#8492392d06485d1a95874fd83c254cdfa23fec62" + integrity sha512-df8PhmRShZ+tckBWwkj+j3Go2vYmh6bXrh6IkDpMTR18SI6PmthTidEO0qzTHAaCY3gIW3gue93taSrQc/Cm7w== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/organisation-unit-tree@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-8.14.4.tgz#3a50dab74f6e1ad1482233bbe4d8fa4acf3c2448" @@ -1862,6 +2182,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/organisation-unit-tree@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-8.14.5.tgz#57d21b8ae7ab28f7d22b0ad4ea28aa0a0c02afb2" + integrity sha512-82QMk7Qcp0tQpQ1chSj+w9lcwWuvuE+0yyRvY2Lv0HN7P4WF/OQAfktJSuG8FkyKzHs74JGgcr1C00RnRlBvrg== + dependencies: + "@dhis2-ui/checkbox" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/node" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/pagination@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-8.14.4.tgz#c3b484c1fae990d7376503a396adf988f207041e" @@ -1875,6 +2208,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/pagination@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-8.14.5.tgz#c0a59dfe49c192a8ef17d6778e149ba7bb7d4aa3" + integrity sha512-tjAGzkZ7JhCzQsLSCQ5kptdEdB8zvOE7w39ndc6dfd6MIQumZIbk1PxIhBU4zH0EjEFOPris5k/1CK61nX8LXQ== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/select" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/popover@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-8.14.4.tgz#ae2a38db1ae4991e61765016259e97bad69cd25c" @@ -1887,6 +2233,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/popover@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-8.14.5.tgz#403982edfa403108b8eaab6204b8bf21e1253160" + integrity sha512-vLFWuLbw5hlUc+WI1M9Vla3FQ2CyZqVlxK7yCxIEuT9VqFaltuexpDGOxAXll6AyvUwBeWiFt20o/GHqSQBndQ== + dependencies: + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/popper@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-8.14.4.tgz#40f101da95036db363912f1cd82160644085b39a" @@ -1900,6 +2258,19 @@ react-popper "^2.2.5" resize-observer-polyfill "^1.5.1" +"@dhis2-ui/popper@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-8.14.5.tgz#060633aa69101a58a309c15c748cff7aad826dd1" + integrity sha512-xL8eHsk05ZzF1xkZc4YeAhD4QM7Bqd0koFbVhZcj3RFO2UTP100xS2G0g21ASM6IqObCudrpG8ytnZr1SCmRzg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@popperjs/core" "^2.10.1" + classnames "^2.3.1" + prop-types "^15.7.2" + react-popper "^2.2.5" + resize-observer-polyfill "^1.5.1" + "@dhis2-ui/portal@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-8.14.4.tgz#e9b74d0f2095e8553d4e07215716fec242dbf7fa" @@ -1908,6 +2279,14 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/portal@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-8.14.5.tgz#57e80547065d2a42871ddcbdf881f4939aba8990" + integrity sha512-bWrqPneQJwFjMnvlWrWrOJTqcV3siUzkEhxQUoYqHHw/KUT44WDJ0GXOMKoWSH/w0xbr8AzY4i1nU34rkcGVew== + dependencies: + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/radio@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-8.14.4.tgz#84a0699e015b056121dafa4cd35c5155430cfb49" @@ -1918,6 +2297,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/radio@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-8.14.5.tgz#4ea5e31e3f1607ae409e8d9e159aa05d381dd2d5" + integrity sha512-6MdZNYBx4K3H7DVlOPclSmtIhHaJDB9GLWoxVBmcNTzl4F0CYJKepT6BIu9qkbvRbv2jWeKahMp4XL847BAQgg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/required@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-8.14.4.tgz#70b6e36f680f12498b5ae333840373d191ef63a0" @@ -1928,6 +2317,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/required@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-8.14.5.tgz#7982483b22f47dd6e91473b86c14ddee61c29300" + integrity sha512-mnZ7sigc6uJciB3C1PMLRiCTAWVpw9JH1Oq+SYWg8ZsFRuBRDIwdRk6Cl9/3gAiY/FIyWKaIw7U7ThRXo/c0mA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/segmented-control@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-8.14.4.tgz#29356dfbb82113cb832a90acf04050b971a15dff" @@ -1938,6 +2337,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/segmented-control@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-8.14.5.tgz#6a78de5f0b9c98b792fb3e07e82c70ea8a1a9335" + integrity sha512-KxuLwztlRHe0+K/ky+zcGBzTE1S6UGoGxNxZumQcnRjm6aoTGtYC35jvBaMoFozyLmKq/QXDcl+rJegq4RX8Iw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/select@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-8.14.4.tgz#335cd1aaa0a9e11a4dd9b9b63a06a2addd893741" @@ -1960,6 +2369,28 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/select@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-8.14.5.tgz#ce8eb3a2b920365277a0ce664579632b18d5f9a4" + integrity sha512-MsoNKAAOfeTPr9wMxL1vQcvfvssJm7srLmtihukGT8h8vMJg9EZkMTvMgAgRF7IhSSjTcW5vO/zAByTAyiFZSg== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/checkbox" "8.14.5" + "@dhis2-ui/chip" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2-ui/status-icon" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/selector-bar@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-8.14.4.tgz#81921f7bb1f0ae3b5a5ff0ee1dd597a81762f533" @@ -1975,6 +2406,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/selector-bar@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-8.14.5.tgz#6b70bc632a147ca54e7c5adc052075142e4edf1a" + integrity sha512-7lkhZYLlHZH1yrTVaoQ/i1Hz/12xnp0gEbSPsevhZWMQ455lVcLMGIaVc3oRewRvYAS4SZtfH/vE6+QsFBcPCA== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + "@testing-library/react" "^12.1.2" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/sharing-dialog@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-8.14.4.tgz#cbbabd2768fc2fcdf958ce8a0df1985fecfcfcba" @@ -2001,6 +2447,32 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/sharing-dialog@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-8.14.5.tgz#5cc2a4b41c89653bfa995ed7495ebf7a6e360751" + integrity sha512-fxU8QkpQwoJJJN71Gx6x96qyi8G2rLTNZWpsF3rc3KJ+ZS9tFO8rr7l3LDc5R6L8MRsgy/wLxthl2LF0fp/4YA== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/divider" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/menu" "8.14.5" + "@dhis2-ui/modal" "8.14.5" + "@dhis2-ui/notice-box" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2-ui/select" "8.14.5" + "@dhis2-ui/tab" "8.14.5" + "@dhis2-ui/tooltip" "8.14.5" + "@dhis2-ui/user-avatar" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + "@react-hook/size" "^2.1.2" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/status-icon@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-8.14.4.tgz#a0ce09e8f92944291df3644a252602a90e8dc98d" @@ -2013,6 +2485,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/status-icon@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-8.14.5.tgz#204d50ad2595845203f63c2423d6cf58ad0a1b5e" + integrity sha512-miqIfH0J1+KMChqeNoxkqiOm2vAOLXp8qMRJPTB60DZN2FaytiBZA7kUHf8XYFodbO+LbnIHa9VtYHt1POmKBA== + dependencies: + "@dhis2-ui/loader" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/switch@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-8.14.4.tgz#46e2474800a631db6c26692e266dfcf589fe2391" @@ -2025,6 +2509,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/switch@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-8.14.5.tgz#5163940f49ac9008c6b631c2f554a0184b06a2e4" + integrity sha512-ybRhRZEUltQ9CLLsIPmUNh4Rhjxde/rd3o1hiDJ3chGMrPT/19bYZ5wwQ8rfJEb5f/6d9vqtmLdwfOKIUNCsTA== + dependencies: + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/required" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tab@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-8.14.4.tgz#840b4976aa135b4d03271e7a490e26b83b177982" @@ -2036,6 +2532,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tab@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-8.14.5.tgz#e86e0a8d8e20df7869e237b23e488c285680e0c4" + integrity sha512-0qOt9LcG2bcvcQRaw5OnsVHl9q6GQh9jMwzwXt4I/v4uCS6dh4u/ntNBfA3Kkg1TNqipSe1dmjCP/ma28RyK8g== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/table@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-8.14.4.tgz#af7a02f6000dbc9a40a4eff4be3eb8afb14a6c95" @@ -2047,6 +2554,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/table@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-8.14.5.tgz#333e8ab4a66f6be1b4bf4107e95f64f9a4cb9840" + integrity sha512-MFwR1BgwWIhvxwXEK4nC8cE5Tc6kS1Veo+0TqdsyBS/3SX8kCSgbg29i/Rl9DedD34GWAUQyBsyH6RrWX8x+7Q== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tag@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-8.14.4.tgz#023fda68bdac5b7ba6bfa90d9225ba4c080c7f5a" @@ -2057,6 +2575,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tag@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-8.14.5.tgz#45a98f2c6a8b7466af6b9a5f9655dcfa37eb0848" + integrity sha512-cOWVjSM8wjoXCg74ZrnCjhOA/PBkGKiuu2RaDco9WFb0y4R73SljqVL4zuijxytc3BaxOltvBJOb0nLjKiW5Ww== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/text-area@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-8.14.4.tgz#5ee39689bd555acb6c6804088477c335beac6eea" @@ -2072,6 +2600,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/text-area@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-8.14.5.tgz#810601b373a3cece802823489c8db619817b9768" + integrity sha512-pDBTxQ5ZfDYvjTfgsqkAk8EpjtaID2jiJ1DF9GE+zlB74GE0Mjof5ZgwDaBjvlmT+Cg3EJjBw4eHhuZlw7PNag== + dependencies: + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/status-icon" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tooltip@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-8.14.4.tgz#73164131516d456acdf89d64f352e64e87a780aa" @@ -2084,6 +2627,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tooltip@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-8.14.5.tgz#97128332d953feca90115093885fb0780861c16c" + integrity sha512-iGDXLXP6HsJBN7DpStsvc0z0vL8gJZ8NbFuZ5UNcGJDcRkzWSwmFFWyEszFryoUMEQVBADpgL5cdzfsqsNUtyA== + dependencies: + "@dhis2-ui/popper" "8.14.5" + "@dhis2-ui/portal" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/transfer@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-8.14.4.tgz#931c6f788fb4a4f87483ca1699e4930cd8864406" @@ -2099,6 +2654,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/transfer@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-8.14.5.tgz#926a7ca75d2dc75f97328ace46eccaa9698ef3ec" + integrity sha512-K69/68JreNqQV+ROBtGPuRFeN0bXoiiIcyodTYI7HEMxqs3JnvALhQFAZAzJxhhNpXksq3dAegGNucFFxThWWw== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/intersection-detector" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/user-avatar@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-8.14.4.tgz#985d03d4694c136524c2cd79d724f474933fbcf7" @@ -2109,6 +2679,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/user-avatar@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-8.14.5.tgz#8f02f6eb0440d80c4ab6fc4505972b4c3557a8e8" + integrity sha512-hDjJZL0P8YUC+8kS9JXL/CZcaai3rWYGsz8ee11F+Uh943qFKw6/kb13egt3zQnTsCyvJWqz+eB7DguxlNbHtQ== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "8.14.5" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2/app-adapter@10.3.10": version "10.3.10" resolved "https://registry.yarnpkg.com/@dhis2/app-adapter/-/app-adapter-10.3.10.tgz#31e8bc93cdb3793db412707cdaf6f2d086c06d39" @@ -2293,6 +2873,13 @@ dependencies: prop-types "^15.7.2" +"@dhis2/ui-constants@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-8.14.5.tgz#68da92906855a6a1d4f1fdc74e5d96deb4d97679" + integrity sha512-azmg85q6RiD3tfaXMXEkWD1BevVUOgKPY1wBU7Dnw4Cq1m35YOoGkxEuCGxjpXUNvOuWWxmFJqO7xK1lqnN6iw== + dependencies: + prop-types "^15.7.2" + "@dhis2/ui-forms@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-8.14.4.tgz#1b99d0b0709dabf0a9f118d3f42d1376b0c14da5" @@ -2313,12 +2900,37 @@ prop-types "^15.7.2" react-final-form "^6.5.3" +"@dhis2/ui-forms@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-8.14.5.tgz#2774bbf759019d284a71be3ac0133f90da5ffedd" + integrity sha512-yy+zflkgUb2WDH5czyl3z3wFePulbz3ECrKIBUP+lqRCh5D0Cg4t455uaDiXeBlUhIIuauRk/q7h2VoJ7cuZZg== + dependencies: + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/checkbox" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/file-input" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/radio" "8.14.5" + "@dhis2-ui/select" "8.14.5" + "@dhis2-ui/switch" "8.14.5" + "@dhis2-ui/text-area" "8.14.5" + "@dhis2/prop-types" "^3.1.2" + classnames "^2.3.1" + final-form "^4.20.2" + prop-types "^15.7.2" + react-final-form "^6.5.3" + "@dhis2/ui-icons@8.14.4": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-8.14.4.tgz#87614885895c376da44e8a4e12fd8b63983d4aec" integrity sha512-M7iisUXlaMEpBPkszIA8nPMUKFSZ6DR3s64nr86vJSynoYAxoua0FWQCItI7r7wiF5glzdEPE+35I5Gw2NKe+g== -"@dhis2/ui@^8.12.3", "@dhis2/ui@^8.14.4": +"@dhis2/ui-icons@8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-8.14.5.tgz#0e2efd2d8c055f40cbe08133b7f447b63daac786" + integrity sha512-PeXvoBqr68ZF7cjvMHq6Shqti8zQG1RtBJS/22h8MRCcSg5/5oHtbdedu+/51pe6kIKULRHFU1qj58a9l87O+A== + +"@dhis2/ui@^8.12.3": version "8.14.4" resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-8.14.4.tgz#d26376b893b9727de25e80ee9be4429b56d5fff2" integrity sha512-ILvUkT5Y0/PW/NNxd2HNhjiOpVxzoKJS6c/4D8UUgWTjy1u6I4ydoJl4u+4k5PK5XECvJVwlU3QtBIDWR23NHg== @@ -2373,6 +2985,61 @@ "@dhis2/ui-icons" "8.14.4" prop-types "^15.7.2" +"@dhis2/ui@^8.14.5": + version "8.14.5" + resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-8.14.5.tgz#ad5ede5db832aa5c121aec1531d0b7549fae983e" + integrity sha512-DMF6m2PED7XeWvHdGzu8w2MBin8nw22mtCCfLpy6CAHUPcukSNGuFD/a5nT5n+sXvA22Bl+qgl211cREAPV42Q== + dependencies: + "@dhis2-ui/alert" "8.14.5" + "@dhis2-ui/box" "8.14.5" + "@dhis2-ui/button" "8.14.5" + "@dhis2-ui/calendar" "8.14.5" + "@dhis2-ui/card" "8.14.5" + "@dhis2-ui/center" "8.14.5" + "@dhis2-ui/checkbox" "8.14.5" + "@dhis2-ui/chip" "8.14.5" + "@dhis2-ui/cover" "8.14.5" + "@dhis2-ui/css" "8.14.5" + "@dhis2-ui/divider" "8.14.5" + "@dhis2-ui/field" "8.14.5" + "@dhis2-ui/file-input" "8.14.5" + "@dhis2-ui/header-bar" "8.14.5" + "@dhis2-ui/help" "8.14.5" + "@dhis2-ui/input" "8.14.5" + "@dhis2-ui/intersection-detector" "8.14.5" + "@dhis2-ui/label" "8.14.5" + "@dhis2-ui/layer" "8.14.5" + "@dhis2-ui/legend" "8.14.5" + "@dhis2-ui/loader" "8.14.5" + "@dhis2-ui/logo" "8.14.5" + "@dhis2-ui/menu" "8.14.5" + "@dhis2-ui/modal" "8.14.5" + "@dhis2-ui/node" "8.14.5" + "@dhis2-ui/notice-box" "8.14.5" + "@dhis2-ui/organisation-unit-tree" "8.14.5" + "@dhis2-ui/pagination" "8.14.5" + "@dhis2-ui/popover" "8.14.5" + "@dhis2-ui/popper" "8.14.5" + "@dhis2-ui/portal" "8.14.5" + "@dhis2-ui/radio" "8.14.5" + "@dhis2-ui/required" "8.14.5" + "@dhis2-ui/segmented-control" "8.14.5" + "@dhis2-ui/select" "8.14.5" + "@dhis2-ui/selector-bar" "8.14.5" + "@dhis2-ui/sharing-dialog" "8.14.5" + "@dhis2-ui/switch" "8.14.5" + "@dhis2-ui/tab" "8.14.5" + "@dhis2-ui/table" "8.14.5" + "@dhis2-ui/tag" "8.14.5" + "@dhis2-ui/text-area" "8.14.5" + "@dhis2-ui/tooltip" "8.14.5" + "@dhis2-ui/transfer" "8.14.5" + "@dhis2-ui/user-avatar" "8.14.5" + "@dhis2/ui-constants" "8.14.5" + "@dhis2/ui-forms" "8.14.5" + "@dhis2/ui-icons" "8.14.5" + prop-types "^15.7.2" + "@esbuild/android-arm64@0.17.19": version "0.17.19" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz#bafb75234a5d3d1b690e7c2956a599345e84a2fd" @@ -2910,6 +3577,11 @@ "@react-hook/passive-layout-effect" "^1.2.0" "@react-hook/resize-observer" "^1.2.1" +"@remix-run/router@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.9.0.tgz#9033238b41c4cbe1e961eccb3f79e2c588328cf6" + integrity sha512-bV63itrKBC0zdT27qYm6SDZHlkXwFL1xMBuhkn+X7l0+IIhNaH5wuuvZKp6eKhCD4KFhujhfhCT1YxXW6esUIA== + "@rollup/plugin-babel@^5.2.0": version "5.3.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283" @@ -12641,6 +13313,21 @@ react-refresh@^0.11.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== +react-router-dom@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.16.0.tgz#86f24658da35eb66727e75ecbb1a029e33ee39d9" + integrity sha512-aTfBLv3mk/gaKLxgRDUPbPw+s4Y/O+ma3rEN1u8EgEpLpPe6gNjIsWt9rxushMHHMb7mSwxRGdGlGdvmFsyPIg== + dependencies: + "@remix-run/router" "1.9.0" + react-router "6.16.0" + +react-router@6.16.0, react-router@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.16.0.tgz#abbf3d5bdc9c108c9b822a18be10ee004096fb81" + integrity sha512-VT4Mmc4jj5YyjpOi5jOf0I+TYzGpvzERy4ckNSvSh2RArv8LLoCxlsZ2D+tc7zgjxcY34oTz2hZaeX5RVprKqA== + dependencies: + "@remix-run/router" "1.9.0" + react-scripts@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003" From 0a7eb1713a7941ccbeb8d40c349c5370a8930597 Mon Sep 17 00:00:00 2001 From: Davis799 Date: Mon, 25 Sep 2023 19:52:12 +0300 Subject: [PATCH 002/253] feat: added the filter area --- i18n/en.pot | 25 ++++++++- package.json | 5 +- src/modules/TBAdherence/TBAdherence.tsx | 23 ++++++++- .../components/FilterArea/FilterArea.tsx | 51 +++++++++++++++++++ .../FilterArea/components/FilterField.tsx | 37 ++++++++++++++ .../components/PropertiesFilter.tsx | 37 ++++++++++++++ .../FilterArea/constants/filters.ts | 10 ++++ .../components/FilterArea/index.ts | 1 + .../components/FilterArea/types/filter.ts | 5 ++ src/modules/shared/constants/attributes.ts | 1 + src/modules/shared/constants/config.ts | 1 + src/modules/shared/constants/index.ts | 4 ++ src/modules/shared/constants/languages.ts | 20 ++++++++ src/modules/shared/constants/metadata.ts | 1 + src/modules/shared/constants/settings.ts | 19 +++++++ yarn.lock | 10 ++++ 16 files changed, 246 insertions(+), 4 deletions(-) create mode 100644 src/modules/TBAdherence/components/FilterArea/FilterArea.tsx create mode 100644 src/modules/TBAdherence/components/FilterArea/components/FilterField.tsx create mode 100644 src/modules/TBAdherence/components/FilterArea/components/PropertiesFilter.tsx create mode 100644 src/modules/TBAdherence/components/FilterArea/constants/filters.ts create mode 100644 src/modules/TBAdherence/components/FilterArea/index.ts create mode 100644 src/modules/TBAdherence/components/FilterArea/types/filter.ts create mode 100644 src/modules/shared/constants/attributes.ts create mode 100644 src/modules/shared/constants/config.ts create mode 100644 src/modules/shared/constants/index.ts create mode 100644 src/modules/shared/constants/languages.ts create mode 100644 src/modules/shared/constants/metadata.ts create mode 100644 src/modules/shared/constants/settings.ts diff --git a/i18n/en.pot b/i18n/en.pot index 5b5e2d2..89ef65b 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2023-09-25T10:26:17.153Z\n" -"PO-Revision-Date: 2023-09-25T10:26:17.153Z\n" +"POT-Creation-Date: 2023-09-25T16:39:40.579Z\n" +"PO-Revision-Date: 2023-09-25T16:39:40.579Z\n" msgid "Something went wrong" msgstr "Something went wrong" @@ -26,5 +26,26 @@ msgstr "Reports" msgid "Configuration" msgstr "Configuration" +msgid "Reset" +msgstr "Reset" + +msgid "Searching..." +msgstr "Searching..." + +msgid "Search" +msgstr "Search" + +msgid "Search Criteria" +msgstr "Search Criteria" + +msgid "TB District Number" +msgstr "TB District Number" + +msgid "Device EMI Number" +msgstr "Device EMI Number" + +msgid "Organisation Unit" +msgstr "Organisation Unit" + msgid "Reload" msgstr "Reload" diff --git a/package.json b/package.json index fe93180..3a121bc 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,11 @@ "dependencies": { "@dhis2/app-runtime": "^3.9.4", "@dhis2/ui": "^8.14.5", + "lodash": "^4.17.21", + "luxon": "^3.4.3", "react-router": "^6.16.0", - "react-router-dom": "^6.16.0" + "react-router-dom": "^6.16.0", + "usehooks-ts": "^2.9.1" }, "lint-staged": { "*.js": "eslint --cache --fix", diff --git a/src/modules/TBAdherence/TBAdherence.tsx b/src/modules/TBAdherence/TBAdherence.tsx index edad441..6fdfb21 100644 --- a/src/modules/TBAdherence/TBAdherence.tsx +++ b/src/modules/TBAdherence/TBAdherence.tsx @@ -1,10 +1,31 @@ import React from "react"; import { Outlet } from "react-router-dom"; +import { DATA_TEST_PREFIX } from "../shared/constants"; +import { FilterArea } from "./components/FilterArea"; +import i18n from "@dhis2/d2-i18n"; export function TBAdherenceOutlet() { return ; } export function TBAdherencePage() { - return
TB Adherence
; + // const { patients, pagination, refetch, loading } = + // useTBAdherenceTableData(); + + return ( +
+

{i18n.t("TB Adherence")}

+ +
+ {/* */} +
+
+ ); } diff --git a/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx b/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx new file mode 100644 index 0000000..99f0e4e --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { Box, Button, ButtonStrip, Card, IconSearch24 } from "@dhis2/ui"; + +import { PropertiesFilter } from "./components/PropertiesFilter"; +import i18n from "@dhis2/d2-i18n"; +import { getDefaultFilters } from "./constants/filters"; +import { useSearchParams } from "react-router-dom"; + +export interface FilterAreaProps { + loading: boolean; +} + +export function FilterArea({ loading }: FilterAreaProps) { + const [, setParams] = useSearchParams(); + + // const onFilterClick = () => { + // onFetch({ + // filters, + // }); + // }; + const onResetClick = () => { + const defaultValue = getDefaultFilters(); + setParams(defaultValue); + }; + + return ( + + +
+ +
+ + + + +
+
+
+ ); +} diff --git a/src/modules/TBAdherence/components/FilterArea/components/FilterField.tsx b/src/modules/TBAdherence/components/FilterArea/components/FilterField.tsx new file mode 100644 index 0000000..f115119 --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/components/FilterField.tsx @@ -0,0 +1,37 @@ +import React from "react"; +import { InputField } from "@dhis2/ui"; +import { useSearchParams } from "react-router-dom"; + +export interface FilterFieldProps { + name: string; + label: string; + options?: string[]; + type: "orgUnit" | "text" | "select"; + multiSelect?: boolean; +} + +export function FilterField({ name, label, type }: FilterFieldProps) { + const [params, setParams] = useSearchParams(); + const value = params.get(name); + const onChange = ({ value }: { value: string }) => { + setParams((params) => { + const updatedParams = new URLSearchParams(params); + updatedParams.set(name, value); + return updatedParams; + }); + }; + + if (type === "orgUnit") { + return null; + } + + return ( + + ); +} diff --git a/src/modules/TBAdherence/components/FilterArea/components/PropertiesFilter.tsx b/src/modules/TBAdherence/components/FilterArea/components/PropertiesFilter.tsx new file mode 100644 index 0000000..0517ecf --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/components/PropertiesFilter.tsx @@ -0,0 +1,37 @@ +import React from "react"; +import i18n from "@dhis2/d2-i18n"; +import { FilterField } from "./FilterField"; + +export function PropertiesFilter() { + return ( +
+

+ {i18n.t("Search Criteria")} +

+
+ + + +
+
+ ); +} diff --git a/src/modules/TBAdherence/components/FilterArea/constants/filters.ts b/src/modules/TBAdherence/components/FilterArea/constants/filters.ts new file mode 100644 index 0000000..c2d5ec1 --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/constants/filters.ts @@ -0,0 +1,10 @@ +import { DateTime } from "luxon"; + +export function getDefaultFilters() { + const endDate = DateTime.now(); + const startDate = endDate.minus({ week: 1 }); + return new URLSearchParams({ + endDate: endDate.toFormat("yyyy-MM-dd"), + startDate: startDate.toFormat("yyyy-MM-dd"), + }); +} diff --git a/src/modules/TBAdherence/components/FilterArea/index.ts b/src/modules/TBAdherence/components/FilterArea/index.ts new file mode 100644 index 0000000..5ee983a --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/index.ts @@ -0,0 +1 @@ +export * from "./FilterArea"; diff --git a/src/modules/TBAdherence/components/FilterArea/types/filter.ts b/src/modules/TBAdherence/components/FilterArea/types/filter.ts new file mode 100644 index 0000000..9205692 --- /dev/null +++ b/src/modules/TBAdherence/components/FilterArea/types/filter.ts @@ -0,0 +1,5 @@ +export interface FilterParams { + tbDistrcitNumber?: string; + deviceEmiNumber?: string; + orgUnit?: string; +} diff --git a/src/modules/shared/constants/attributes.ts b/src/modules/shared/constants/attributes.ts new file mode 100644 index 0000000..20defd2 --- /dev/null +++ b/src/modules/shared/constants/attributes.ts @@ -0,0 +1 @@ +export const SHARED_ATTRIBUTES = {}; diff --git a/src/modules/shared/constants/config.ts b/src/modules/shared/constants/config.ts new file mode 100644 index 0000000..bebfe63 --- /dev/null +++ b/src/modules/shared/constants/config.ts @@ -0,0 +1 @@ +export const EXPIRE_DAYS = 3; diff --git a/src/modules/shared/constants/index.ts b/src/modules/shared/constants/index.ts new file mode 100644 index 0000000..2d9dc48 --- /dev/null +++ b/src/modules/shared/constants/index.ts @@ -0,0 +1,4 @@ +export * from "./attributes"; +export * from "./metadata"; +export * from "./settings"; +export * from "./config"; diff --git a/src/modules/shared/constants/languages.ts b/src/modules/shared/constants/languages.ts new file mode 100644 index 0000000..01dc9f0 --- /dev/null +++ b/src/modules/shared/constants/languages.ts @@ -0,0 +1,20 @@ +export interface Language { + locale: string; + name: string; + flag?: string; +} + +export const defaultLanguage = "en"; + +export const LANGUAGES: Language[] = [ + { + name: "English", + locale: "en", + flag: "🇬🇧", + }, + { + name: "Swahili", + locale: "sw", + flag: "🇹🇿", + }, +]; diff --git a/src/modules/shared/constants/metadata.ts b/src/modules/shared/constants/metadata.ts new file mode 100644 index 0000000..b05a501 --- /dev/null +++ b/src/modules/shared/constants/metadata.ts @@ -0,0 +1 @@ +export const DATA_TEST_PREFIX = "d2-dat"; diff --git a/src/modules/shared/constants/settings.ts b/src/modules/shared/constants/settings.ts new file mode 100644 index 0000000..beaa4c3 --- /dev/null +++ b/src/modules/shared/constants/settings.ts @@ -0,0 +1,19 @@ +export interface TBAdherenceConfig { + name: string; + id: string; //Primary-screening + columns: Array<{ + key: string; + label: string; + path: string | Array; + }>; +} + +export const reports: TBAdherenceConfig[] = []; + +export const DEFAULT_SETTINGS = { + settings: {}, +} as const; + +export const IN_APP_SETTINGS = {}; + +export type DSSettings = keyof typeof DEFAULT_SETTINGS; diff --git a/yarn.lock b/yarn.lock index cf366c7..edccb7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11402,6 +11402,11 @@ luxon@3.2.1: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.2.1.tgz#14f1af209188ad61212578ea7e3d518d18cee45f" integrity sha512-QrwPArQCNLAKGO/C+ZIilgIuDnEnKx5QYODdDtbFaxzsbZcc/a7WFq7MhsVYgRlwawLtvOUESTlfJ+hc/USqPg== +luxon@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.3.tgz#8ddf0358a9492267ffec6a13675fbaab5551315d" + integrity sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg== + lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" @@ -15552,6 +15557,11 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== +usehooks-ts@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/usehooks-ts/-/usehooks-ts-2.9.1.tgz#953d3284851ffd097432379e271ce046a8180b37" + integrity sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA== + util-arity@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/util-arity/-/util-arity-1.1.0.tgz#59d01af1fdb3fede0ac4e632b0ab5f6ce97c9330" From a94ed7a447c61afe42b3325b3ca188350ef77c51 Mon Sep 17 00:00:00 2001 From: Davis799 Date: Thu, 5 Oct 2023 09:16:10 +0300 Subject: [PATCH 003/253] feat(tb-adherence): feat - Implemented the adherence details page --- i18n/en.pot | 101 +- package.json | 53 +- src/App.tsx | 36 +- .../components/SideNav/SideNav.module.css | 2 +- src/modules/Routes/constants/nav.tsx | 6 + src/modules/TBAdherence/TBAdherence.tsx | 40 +- .../TBAdherenceDetails/TBAdherenceDetails.tsx | 100 + .../adherenceCalendar.module.css | 21 + .../adherenceCalendar/adherenceCalendar.tsx | 91 + .../components/doseStatus/doseStatus.tsx | 34 + .../TBAdherenceDetails/hooks/data.ts | 53 + .../TBAdherenceDetails/state/data.ts | 53 + .../components/FilterArea/FilterArea.tsx | 27 +- .../FilterArea/components/FilterField.tsx | 11 +- .../OrganisationUnitSelector/index.tsx | 81 + .../FilterArea/constants/filters.ts | 3 +- .../components/Table/hooks/data.ts | 183 + .../TBAdherence/components/Table/index.tsx | 65 + src/modules/TBAdherence/constants/filters.ts | 10 +- src/modules/TBAdherence/state/filters.ts | 14 + src/modules/TBAdherence/utils/download.ts | 205 + src/modules/TBAdherence/utils/orgUnits.ts | 32 + .../CollapsibleArea/CollapsibleArea.tsx | 53 + .../components/CollapsibleArea/index.ts | 1 + .../shared/components/Loaders/index.tsx | 18 +- .../components/ProfileArea/EditDevice.tsx | 103 + .../ProfileArea/ProfileArea.module.css | 124 + .../shared/components/ProfileArea/index.tsx | 262 + src/modules/shared/components/StatusBadge.tsx | 14 + src/modules/shared/constants/attributes.ts | 32 +- src/modules/shared/constants/metadata.ts | 11 + src/modules/shared/constants/settings.ts | 39 +- src/modules/shared/models/index.ts | 2 + src/modules/shared/models/profile.ts | 76 + .../shared/models/trackedEntityModel.ts | 66 + src/modules/shared/state/engine.ts | 11 + src/modules/shared/state/index.ts | 1 + src/modules/shared/types/dhis2.ts | 10886 ++++++++++++++++ src/modules/shared/types/index.ts | 1 + src/types/index.d.ts | 3 + yarn.lock | 3003 +++-- 41 files changed, 14474 insertions(+), 1453 deletions(-) create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/TBAdherenceDetails.tsx create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.module.css create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.tsx create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/components/doseStatus/doseStatus.tsx create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/hooks/data.ts create mode 100644 src/modules/TBAdherence/TBAdherenceDetails/state/data.ts create mode 100644 src/modules/TBAdherence/components/FilterArea/components/OrganisationUnitSelector/index.tsx create mode 100644 src/modules/TBAdherence/components/Table/hooks/data.ts create mode 100644 src/modules/TBAdherence/components/Table/index.tsx create mode 100644 src/modules/TBAdherence/state/filters.ts create mode 100644 src/modules/TBAdherence/utils/download.ts create mode 100644 src/modules/TBAdherence/utils/orgUnits.ts create mode 100644 src/modules/shared/components/CollapsibleArea/CollapsibleArea.tsx create mode 100644 src/modules/shared/components/CollapsibleArea/index.ts create mode 100644 src/modules/shared/components/ProfileArea/EditDevice.tsx create mode 100644 src/modules/shared/components/ProfileArea/ProfileArea.module.css create mode 100644 src/modules/shared/components/ProfileArea/index.tsx create mode 100644 src/modules/shared/components/StatusBadge.tsx create mode 100644 src/modules/shared/models/index.ts create mode 100644 src/modules/shared/models/profile.ts create mode 100644 src/modules/shared/models/trackedEntityModel.ts create mode 100644 src/modules/shared/state/engine.ts create mode 100644 src/modules/shared/state/index.ts create mode 100644 src/modules/shared/types/dhis2.ts create mode 100644 src/modules/shared/types/index.ts diff --git a/i18n/en.pot b/i18n/en.pot index 89ef65b..9f87f13 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,11 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2023-09-25T16:39:40.579Z\n" -"PO-Revision-Date: 2023-09-25T16:39:40.579Z\n" +"POT-Creation-Date: 2023-10-05T05:33:01.440Z\n" +"PO-Revision-Date: 2023-10-05T05:33:01.440Z\n" + +msgid "39" +msgstr "39" msgid "Something went wrong" msgstr "Something went wrong" @@ -26,6 +29,33 @@ msgstr "Reports" msgid "Configuration" msgstr "Configuration" +msgid "Back" +msgstr "Back" + +msgid "Summary" +msgstr "Summary" + +msgid "Enrollment time" +msgstr "Enrollment time" + +msgid "Device Health" +msgstr "Device Health" + +msgid "Very good" +msgstr "Very good" + +msgid "Battery Health" +msgstr "Battery Health" + +msgid "100%" +msgstr "100%" + +msgid "A traveler UHC code is required" +msgstr "A traveler UHC code is required" + +msgid "Patient with TB Device {{id}} could not be found" +msgstr "Patient with TB Device {{id}} could not be found" + msgid "Reset" msgstr "Reset" @@ -35,6 +65,12 @@ msgstr "Searching..." msgid "Search" msgstr "Search" +msgid "Organisation Unit" +msgstr "Organisation Unit" + +msgid "Select Organisation unit" +msgstr "Select Organisation unit" + msgid "Search Criteria" msgstr "Search Criteria" @@ -44,8 +80,65 @@ msgstr "TB District Number" msgid "Device EMI Number" msgstr "Device EMI Number" -msgid "Organisation Unit" -msgstr "Organisation Unit" +msgid "There is no data for the selected filters" +msgstr "There is no data for the selected filters" + +msgid "Downloading..." +msgstr "Downloading..." msgid "Reload" msgstr "Reload" + +msgid "Device IMEI number" +msgstr "Device IMEI number" + +msgid "Assign the device number, or click clear to clear previous device" +msgstr "Assign the device number, or click clear to clear previous device" + +msgid "Hide" +msgstr "Hide" + +msgid "Save" +msgstr "Save" + +msgid "TB Client" +msgstr "TB Client" + +msgid "Name" +msgstr "Name" + +msgid "Age" +msgstr "Age" + +msgid "Sex" +msgstr "Sex" + +msgid "Adherence Frequency" +msgstr "Adherence Frequency" + +msgid "Phone" +msgstr "Phone" + +msgid "DAT device information" +msgstr "DAT device information" + +msgid "Edit Device" +msgstr "Edit Device" + +msgid "Total Openings" +msgstr "Total Openings" + +msgid "Battery Level" +msgstr "Battery Level" + +msgid "97%" +msgstr "97%" + +msgid "Next dose Alarm" +msgstr "Next dose Alarm" + +msgid "Next refill Alarm" +msgstr "Next refill Alarm" + +msgid "Last updated" +msgstr "Last updated" diff --git a/package.json b/package.json index 3a121bc..e4dab5f 100644 --- a/package.json +++ b/package.json @@ -20,15 +20,21 @@ "prepare": "husky install" }, "devDependencies": { - "@badeball/cypress-cucumber-preprocessor": "16.0.3", - "@cypress/webpack-preprocessor": "^6.0.0", + "@badeball/cypress-cucumber-preprocessor": "^18.0.6", + "@cucumber/cucumber": "^9.4.0", + "@cypress/react": "^7.0.3", + "@cypress/webpack-preprocessor": "^5.17.1", "@dhis2/cli-app-scripts": "^10.3.10", + "@dhis2/cli-utils-cypress": "^10.0.3", "@dhis2/cypress-commands": "^10.0.3", "@dhis2/cypress-plugins": "^10.0.3", - "@typescript-eslint/eslint-plugin": "^6.7.2", - "@typescript-eslint/parser": "^6.7.2", + "@types/file-saver": "^2.0.5", + "@types/jest": "^29.5.3", + "@types/lodash": "^4.14.197", + "@types/luxon": "^3.3.2", + "@types/node": "^20.5.3", "cross-var": "^1.1.0", - "cypress": "^13.2.0", + "cypress": "^12.17.4", "dotenv": "^16.3.1", "dotenv-cli": "^7.3.0", "eslint": "^8.49.0", @@ -38,16 +44,41 @@ "prettier": "3.0.3", "start-server-and-test": "^2.0.0", "ts-loader": "^9.4.4", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "webpack-node-externals": "^3.0.0" }, "dependencies": { + "@dhis2-ui/calendar": "^8.14.0", "@dhis2/app-runtime": "^3.9.4", - "@dhis2/ui": "^8.14.5", + "@dhis2/app-service-datastore": "^1.0.0-beta.3", + "@dhis2/ui": "^8.14.0", + "@hisptz/dhis2-ui": "^1.0.55", + "@hisptz/dhis2-utils": "^1.0.52", + "@hookform/resolvers": "^3.3.0", + "async-es": "^3.2.4", + "eslint-config-react-app": "^7.0.1", + "file-saver": "^2.0.5", "lodash": "^4.17.21", - "luxon": "^3.4.3", - "react-router": "^6.16.0", - "react-router-dom": "^6.16.0", - "usehooks-ts": "^2.9.1" + "luxon": "^3.4.2", + "react": "16.14.0", + "react-collapsible": "^2.10.0", + "react-dom": "16.14.0", + "react-hook-form": "^7.46.1", + "react-qr-reader": "^3.0.0-beta-1", + "react-router": "^6.15.0", + "react-router-dom": "^6.15.0", + "react-scripts": "5.0.1", + "react-to-print": "^2.14.13", + "recoil": "^0.7.7", + "shared": "*", + "usehooks-ts": "^2.9.1", + "xlsx": "^0.18.5", + "zod": "^3.22.2" + }, + "resolutions": { + "react": "16.14.0", + "react-dom": "16.14.0", + "react-router-dom": "^6.15.0" }, "lint-staged": { "*.js": "eslint --cache --fix", diff --git a/src/App.tsx b/src/App.tsx index 5f67bab..60e8ce0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,13 +2,35 @@ import "./styles/common.css"; import React, { Suspense } from "react"; import { Routes } from "./modules/Routes"; import { FullPageLoader } from "./modules/shared/components/Loaders"; +import { DataStoreProvider } from "@dhis2/app-service-datastore"; +import { MutableSnapshot, RecoilRoot } from "recoil"; +import { + DATASTORE_NAMESPACE, + DEFAULT_SETTINGS, +} from "./modules/shared/constants"; +import { useDataEngine } from "@dhis2/app-runtime"; +import { DataEngineState } from "./modules/shared/state"; -const MyApp = () => ( -
- }> - - -
-); +function MyApp() { + const engine = useDataEngine(); + + function initEngine({ set }: MutableSnapshot) { + set(DataEngineState, engine); + } + + return ( + } + > + + }> + + + + + ); +} export default MyApp; diff --git a/src/modules/Layout/components/SideNav/SideNav.module.css b/src/modules/Layout/components/SideNav/SideNav.module.css index 17b8d35..4e8b248 100644 --- a/src/modules/Layout/components/SideNav/SideNav.module.css +++ b/src/modules/Layout/components/SideNav/SideNav.module.css @@ -17,6 +17,6 @@ .aside { background: #f3f5f7; - border-right: 2px solid #d5dde5; + border-right: 1.5px solid #d5dde5; height: auto; } diff --git a/src/modules/Routes/constants/nav.tsx b/src/modules/Routes/constants/nav.tsx index e879af9..b188dfd 100644 --- a/src/modules/Routes/constants/nav.tsx +++ b/src/modules/Routes/constants/nav.tsx @@ -14,6 +14,7 @@ import { Navigate } from "react-router-dom"; import { getDefaultTBAdherenceFilters } from "../../TBAdherence/constants/filters"; import { Configuration } from "../../Configuration"; +import { TBAdherenceDetails } from "../../TBAdherence/TBAdherenceDetails/TBAdherenceDetails"; export interface NavItem { label?: string | ((data: any) => any); @@ -45,6 +46,11 @@ export const ROUTES: NavItem[] = [ id: "tbadherence-list", element: TBAdherencePage, }, + { + path: ":id", + id: "tbadherence-details", + element: TBAdherenceDetails, + }, ], }, { diff --git a/src/modules/TBAdherence/TBAdherence.tsx b/src/modules/TBAdherence/TBAdherence.tsx index 6fdfb21..1ea775d 100644 --- a/src/modules/TBAdherence/TBAdherence.tsx +++ b/src/modules/TBAdherence/TBAdherence.tsx @@ -1,30 +1,50 @@ -import React from "react"; -import { Outlet } from "react-router-dom"; +import React, { useEffect } from "react"; +import { Outlet, useSearchParams } from "react-router-dom"; import { DATA_TEST_PREFIX } from "../shared/constants"; import { FilterArea } from "./components/FilterArea"; import i18n from "@dhis2/d2-i18n"; +import TBAdherenceTable from "./components/Table"; +import { + useFilters, + useTBAdherenceTableData, +} from "./components/Table/hooks/data"; export function TBAdherenceOutlet() { return ; } export function TBAdherencePage() { - // const { patients, pagination, refetch, loading } = - // useTBAdherenceTableData(); + const [params, setParams] = useSearchParams(); + const { filters, endDate, startDate } = useFilters(); + const orgUnit = params.get("ou"); + const { patients, pagination, refetch, loading } = + useTBAdherenceTableData(); + + useEffect(() => { + refetch({ + page: 1, + filters, + endDate, + startDate, + orgUnit, + }); + }, []); return (
-

{i18n.t("TB Adherence")}

- +

+ {i18n.t("TB Adherence")} +

+
- {/* */} + />
); diff --git a/src/modules/TBAdherence/TBAdherenceDetails/TBAdherenceDetails.tsx b/src/modules/TBAdherence/TBAdherenceDetails/TBAdherenceDetails.tsx new file mode 100644 index 0000000..b6bb768 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/TBAdherenceDetails.tsx @@ -0,0 +1,100 @@ +import React from "react"; + +import { usePatient } from "./hooks/data"; +import { Button, Card, IconArrowLeft24 } from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; + +import { useNavigate } from "react-router-dom"; +import { FullPageLoader } from "../../shared/components/Loaders"; +import ErrorPage from "../../shared/components/ErrorPage"; +import { DATA_TEST_PREFIX } from "../../shared/constants"; +import { ProfileArea } from "../../shared/components/ProfileArea"; +import DoseStatus from "./components/doseStatus/doseStatus"; +import AdherenceCalendar from "./components/adherenceCalendar/adherenceCalendar"; + +export function TBAdherenceDetails() { + const { patient, error, loading } = usePatient(); + const navigate = useNavigate(); + + const Dose = [ + { + color: "#42a5f5", + status: "Enrollment Date", + }, + { + color: "#4caf50", + status: "Taken the Dosage", + }, + { + color: "#f44336", + status: "Missed the Dosage", + }, + { + color: "#f2f3f7", + status: "N/A", + }, + ]; + + if (loading && !patient) { + return ; + } + + if (error) { + return ; + } + + if (!patient) { + return null; + } + + return ( +
+
+
+ +
+ +
+ +
+
+ +
+
+ {Dose.map((dose, index) => { + return ( + + ); + })} +
+ +
+
+
+
+
+ ); +} diff --git a/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.module.css b/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.module.css new file mode 100644 index 0000000..15b5fd6 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.module.css @@ -0,0 +1,21 @@ +.profile-container { + flex: 1; + display: grid; + grid-template-rows: repeat(2, 1fr); + gap: 32px; + width: 100%; +} + +.grid-item { + display: flex; + flex-direction: column; +} + +.label-title { + font-size: 13px; +} + +.label-value { + font-size: 17px; + font-weight: 500; +} diff --git a/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.tsx b/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.tsx new file mode 100644 index 0000000..d03eb16 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/components/adherenceCalendar/adherenceCalendar.tsx @@ -0,0 +1,91 @@ +import React from "react"; +import i18n from "@dhis2/d2-i18n"; +import styles from "./adherenceCalendar.module.css"; +import { PatientProfile } from "../../../../shared/models"; + +export interface ProfileAreaProps { + profile: PatientProfile; +} + +function AdherenceCalendar({ profile }: ProfileAreaProps) { + return ( +
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ ); +} + +export default AdherenceCalendar; diff --git a/src/modules/TBAdherence/TBAdherenceDetails/components/doseStatus/doseStatus.tsx b/src/modules/TBAdherence/TBAdherenceDetails/components/doseStatus/doseStatus.tsx new file mode 100644 index 0000000..2a3c9e0 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/components/doseStatus/doseStatus.tsx @@ -0,0 +1,34 @@ +import React from "react"; +import { Box } from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; + +interface DoseStatusProps { + color: string; + status: string; +} + +function DoseStatus({ color, status }: DoseStatusProps) { + return ( +
+
+ +
+ {i18n.t(status)} +
+ ); +} + +export default DoseStatus; diff --git a/src/modules/TBAdherence/TBAdherenceDetails/hooks/data.ts b/src/modules/TBAdherence/TBAdherenceDetails/hooks/data.ts new file mode 100644 index 0000000..955c895 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/hooks/data.ts @@ -0,0 +1,53 @@ +import { useParams } from "react-router"; +import { + atomFamily, + useRecoilCallback, + useRecoilState, + useRecoilValueLoadable, +} from "recoil"; +import { PatientState } from "../state/data"; +import { useEffect, useMemo } from "react"; +import { PatientProfile } from "../../../shared/models"; +import { TrackedEntity } from "../../../shared/types"; + +const ActualPatientState = atomFamily( + { + key: "patientState", + default: null as PatientProfile | null, + } +); + +export function usePatient() { + const { id } = useParams(); + const patientState = useRecoilValueLoadable(PatientState(id)); + const [patientTei, setPatient] = useRecoilState( + ActualPatientState(id) + ); + const refresh = useRecoilCallback( + ({ refresh }) => + () => + refresh(PatientState(id)) + ); + const loading = patientState.state === "loading"; + const error = + patientState.state === "hasError" ? patientState.contents : null; + + useEffect(() => { + if (patientState.state == "hasValue") { + setPatient(patientState.contents as TrackedEntity); + } + }, [patientState.state]); + + const patient = useMemo(() => { + if (patientTei) { + return new PatientProfile(patientTei); + } + }, [patientTei]); + + return { + patient, + error, + loading, + refresh, + }; +} diff --git a/src/modules/TBAdherence/TBAdherenceDetails/state/data.ts b/src/modules/TBAdherence/TBAdherenceDetails/state/data.ts new file mode 100644 index 0000000..3240287 --- /dev/null +++ b/src/modules/TBAdherence/TBAdherenceDetails/state/data.ts @@ -0,0 +1,53 @@ +import { selectorFamily } from "recoil"; +import { head } from "lodash"; +import i18n from "@dhis2/d2-i18n"; +import { + DAT_PROGRAM, + SHARED_ATTRIBUTES, + TEI_FIELDS, + TRACKED_ENTITY_ATTRIBUTES, +} from "../../../shared/constants"; +import { TrackedEntity } from "../../../shared/types"; +import { DataEngineState } from "../../../shared/state"; +import { PatientProfile } from "../../../shared/models"; + +const query: any = { + traveler: { + resource: "tracker/trackedEntities", + params: ({ id }: { id: string }) => ({ + trackedEntity: id, + ouMode: "ACCESSIBLE", + program: DAT_PROGRAM, + fields: TEI_FIELDS, + }), + }, +}; + +export const PatientState = selectorFamily({ + key: "patient-state", + get: + (id?: string) => + async ({ get }) => { + if (!id) { + throw Error(i18n.t("A traveler UHC code is required")); + } + + const engine = get(DataEngineState); + const response = await engine.query(query, { + variables: { + id, + }, + }); + const trackedEntity = head((response?.traveler as any)?.instances); + + if (!trackedEntity) { + throw Error( + i18n.t("Patient with TB Device {{id}} could not be found", { + id, + }) + ); + } + + return trackedEntity; + }, +}); diff --git a/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx b/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx index 99f0e4e..81fa205 100644 --- a/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx +++ b/src/modules/TBAdherence/components/FilterArea/FilterArea.tsx @@ -5,19 +5,30 @@ import { PropertiesFilter } from "./components/PropertiesFilter"; import i18n from "@dhis2/d2-i18n"; import { getDefaultFilters } from "./constants/filters"; import { useSearchParams } from "react-router-dom"; +import { useDataQuery } from "@dhis2/app-runtime"; +import { useFilters } from "../Table/hooks/data"; +import { OrganizationUnitState } from "../../state/filters"; +import { useRecoilState } from "recoil"; export interface FilterAreaProps { loading: boolean; + onFetch: ReturnType["refetch"]; } -export function FilterArea({ loading }: FilterAreaProps) { - const [, setParams] = useSearchParams(); +export function FilterArea({ loading, onFetch }: FilterAreaProps) { + const [params, setParams] = useSearchParams(); + const { filters, endDate, startDate } = useFilters(); - // const onFilterClick = () => { - // onFetch({ - // filters, - // }); - // }; + const orgUnit = params.get("ou") ?? null; + const onFilterClick = () => { + onFetch({ + page: 1, + filters, + endDate, + startDate, + orgUnit, + }); + }; const onResetClick = () => { const defaultValue = getDefaultFilters(); setParams(defaultValue); @@ -35,7 +46,7 @@ export function FilterArea({ loading }: FilterAreaProps) { + {loading ? null : ( + { + setHide(!hide); + }} + onUpdate={async (val: any) => { + setOrganizationUnitState(val.orgUnits); + onChange({ value: val.orgUnits }); + if (val.orgUnits.length == 0) { + setOrganizationUnitState(organizationUnits); + onChange({ value: organizationUnits }); + } + setHide(!hide); + }} + /> + )} +
+ ); +} diff --git a/src/modules/TBAdherence/components/FilterArea/constants/filters.ts b/src/modules/TBAdherence/components/FilterArea/constants/filters.ts index c2d5ec1..939bd69 100644 --- a/src/modules/TBAdherence/components/FilterArea/constants/filters.ts +++ b/src/modules/TBAdherence/components/FilterArea/constants/filters.ts @@ -2,9 +2,10 @@ import { DateTime } from "luxon"; export function getDefaultFilters() { const endDate = DateTime.now(); - const startDate = endDate.minus({ week: 1 }); + const startDate = endDate.minus({ year: 1 }); return new URLSearchParams({ endDate: endDate.toFormat("yyyy-MM-dd"), startDate: startDate.toFormat("yyyy-MM-dd"), + ou: "CAWjYmd5Dea", }); } diff --git a/src/modules/TBAdherence/components/Table/hooks/data.ts b/src/modules/TBAdherence/components/Table/hooks/data.ts new file mode 100644 index 0000000..1e049f3 --- /dev/null +++ b/src/modules/TBAdherence/components/Table/hooks/data.ts @@ -0,0 +1,183 @@ +import { useDataQuery } from "@dhis2/app-runtime"; +import { useEffect, useState } from "react"; +import { OptionSet, Pagination } from "@hisptz/dhis2-utils"; +import { useSearchParams } from "react-router-dom"; +import { compact, isEmpty } from "lodash"; +import { useDownloadData } from "../../../utils/download"; +import { PatientProfile } from "../../../../shared/models"; +import { + DAT_PROGRAM, + SHARED_ATTRIBUTES, + TEI_FIELDS, +} from "../../../../shared/constants"; +import { TrackedEntity } from "../../../../shared/types"; + +const query: any = { + patients: { + resource: "tracker/trackedEntities", + params: ({ + page, + pageSize, + filters, + startDate, + endDate, + program, + orgUnit, + }: { + page: number; + pageSize: number; + filters?: string[]; + startDate?: string; + endDate?: string; + program: string; + orgUnit?: string; + }) => ({ + pageSize, + page, + enrollmentEnrolledAfter: startDate, + enrollmentEnrolledBefore: endDate, + program, + orgUnit, + rootJunction: "OR", + filter: filters, + totalPages: true, + ouMode: "DESCENDANTS", + fields: TEI_FIELDS, + }), + }, +}; + +type Data = { + patients: { + instances: TrackedEntity[]; + page: number; + pageSize: number; + total: number; + }; +}; +const filtersConfig: any = { + tbDistrictNumber: { + attribute: SHARED_ATTRIBUTES.TB_DISTRICT_NUMBER, + operator: "eq", + }, + deviceEMInumber: { + attribute: SHARED_ATTRIBUTES.TB_DISTRICT_NUMBER, + operator: "eq", + }, +}; + +export function useFilters() { + const [params] = useSearchParams(); + const filters = compact( + Array.from(params.keys()).map((filter) => { + const filterConfig = filtersConfig[filter]; + if (filterConfig) { + const value = params.get(filter); + if (value) { + return `${filterConfig.attribute}:${filterConfig.operator}:${value}`; + } + } + }) + ); + + return { + filters, + startDate: params.get("startDate"), + endDate: params.get("endDate"), + }; +} + +export function useTBAdherenceTableData() { + const { filters, startDate, endDate } = useFilters(); + const [patients, setPatients] = useState([]); + + const [pagination, setPagination] = useState(); + const [params] = useSearchParams(); + const orgUnit = params.get("ou"); + + const { data, loading, error, refetch } = useDataQuery(query, { + variables: { + page: 1, + pageSize: 10, + program: DAT_PROGRAM, + filters, + startDate, + endDate, + orgUnit, + }, + lazy: true, + }); + + const onPageChange = (page: number) => { + refetch({ + page, + filters, + startDate, + endDate, + orgUnit, + }); + }; + const onPageSizeChange = (pageSize: number) => { + refetch({ + page: 1, + pageSize, + filters, + startDate, + endDate, + orgUnit, + }); + }; + + useEffect(() => { + if (data) { + setPatients( + data?.patients.instances.map((tei) => { + return new PatientProfile(tei); + }) ?? [] + ); + setPagination({ + page: data?.patients.page, + pageSize: data?.patients.pageSize, + total: data?.patients.total, + pageCount: Math.ceil( + data?.patients.total / data?.patients.pageSize + ), + }); + } + }, [data]); + + const { download, downloading } = useDownloadData({ + resource: "tracker/trackedEntities", + query: query, + queryKey: "report", + mapping: (data: TrackedEntity) => { + return new PatientProfile(data).tableData; + }, + }); + + const onDownload = (type: "xlsx" | "csv" | "json") => { + if (!isEmpty(orgUnit) && !isEmpty(startDate) && !isEmpty(endDate)) { + download(type, { + orgUnit, + startDate, + endDate, + filters, + program: DAT_PROGRAM, + }); + } + }; + + return { + pagination: { + ...pagination, + onPageSizeChange, + onPageChange, + }, + patients, + downloading, + download: onDownload, + loading, + error, + refetch, + }; +} diff --git a/src/modules/TBAdherence/components/Table/index.tsx b/src/modules/TBAdherence/components/Table/index.tsx new file mode 100644 index 0000000..239911b --- /dev/null +++ b/src/modules/TBAdherence/components/Table/index.tsx @@ -0,0 +1,65 @@ +import React from "react"; +import { + CustomDataTable, + CustomDataTableColumn, + CustomDataTableRow, +} from "@hisptz/dhis2-ui"; +import { Card } from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; +import { Pagination } from "@hisptz/dhis2-utils"; +import { useSetting } from "@dhis2/app-service-datastore"; +import { FullPageLoader } from "../../../shared/components/Loaders"; + +import { isEmpty } from "lodash"; +import { useNavigate, useSearchParams } from "react-router-dom"; +import { PatientProfile } from "../../../shared/models/profile"; + +export interface ReportTableProps { + loading: boolean; + patients: PatientProfile[]; + pagination: Pagination; +} + +export default function TBAdherenceTable({ + loading, + patients, + pagination, +}: ReportTableProps) { + const [TBAdherence] = useSetting("TBAdherence", { global: true }); + const navigate = useNavigate(); + + const onRowClick = (id: string) => { + const row = patients.find((patient) => patient.id === id); + + if (row) { + navigate(`/tbadherence/${row.id}`); + } + }; + + return ( +
+ +
+ {loading && isEmpty(patients) ? ( + + ) : ( + { + return { + ...(patient.tableData as CustomDataTableRow), + }; + })} + /> + )} +
+
+
+ ); +} diff --git a/src/modules/TBAdherence/constants/filters.ts b/src/modules/TBAdherence/constants/filters.ts index d60ba04..bca1103 100644 --- a/src/modules/TBAdherence/constants/filters.ts +++ b/src/modules/TBAdherence/constants/filters.ts @@ -1,3 +1,11 @@ +import { DateTime } from "luxon"; + export function getDefaultTBAdherenceFilters() { - return ""; + const endDate = DateTime.now(); + const startDate = endDate.minus({ year: 1 }); + return new URLSearchParams({ + endDate: endDate.toFormat("yyyy-MM-dd"), + startDate: startDate.toFormat("yyyy-MM-dd"), + ou: "CAWjYmd5Dea", + }); } diff --git a/src/modules/TBAdherence/state/filters.ts b/src/modules/TBAdherence/state/filters.ts new file mode 100644 index 0000000..e73b2cf --- /dev/null +++ b/src/modules/TBAdherence/state/filters.ts @@ -0,0 +1,14 @@ +import { atom } from "recoil"; +import { OrganisationUnit } from "@hisptz/dhis2-utils"; + +export const OrganizationUnitState = atom({ + key: "organization-unit-state", + default: [ + { + id: " ", + displayName: " ", + path: "/ ", + children: [], + }, + ], +}); diff --git a/src/modules/TBAdherence/utils/download.ts b/src/modules/TBAdherence/utils/download.ts new file mode 100644 index 0000000..f185ce7 --- /dev/null +++ b/src/modules/TBAdherence/utils/download.ts @@ -0,0 +1,205 @@ +import * as XLSX from "xlsx"; +import i18n from "@dhis2/d2-i18n"; +import { asyncify, mapSeries } from "async-es"; +import { useAlert, useDataQuery } from "@dhis2/app-runtime"; +import { useCallback, useEffect, useState } from "react"; +import { Pagination } from "@hisptz/dhis2-utils"; +import { flattenDeep, get, isEmpty, range } from "lodash"; +import { saveAs } from "file-saver"; + +export async function downloadFile( + type: "xlsx" | "json" | "csv", + data: any[], + options?: { filename?: string } +) { + if (type === "json") { + saveAs( + new File([JSON.stringify(data)] as any, "data.json", { + type: "json", + }), + `${options?.filename ?? "data"}.json` + ); + } else if (type === "xlsx") { + const excel = await import("xlsx"); + const workbook = excel.utils.book_new(); + const worksheet = excel.utils.json_to_sheet(data); + excel.utils.book_append_sheet(workbook, worksheet, "data"); + excel.writeFile(workbook, `${options?.filename ?? "data"}.xlsx`); + } else if (type === "csv") { + const excel = await import("xlsx"); + const worksheet = excel.utils.json_to_sheet(data); + const csvData = excel.utils.sheet_to_csv(worksheet); + saveAs( + new File([csvData], "data.csv", { + type: "csv", + }), + `${options?.filename ?? "data"}.csv` + ); + } +} + +async function getPagination( + refetch: any, + { + queryVariables, + queryKey, + }: { queryVariables: Record; queryKey: string } +): Promise { + const data = await refetch({ + ...queryVariables, + totalPages: true, + skipData: true, + }); + return { + page: get(data, [queryKey, "page"]), + total: get(data, [queryKey, "total"]), + pageSize: get(data, [queryKey, "pageSize"]), + } as Pagination; +} + +async function getData( + refetch: any, + { + options, + queryKey, + resource, + mapping, + page, + }: { + options: any; + queryKey: string; + resource: string; + mapping: any; + page: number; + } +): Promise>> { + const data = await refetch({ ...options, page }); + const rawData = get(data, [queryKey, "instances"]); + if (!isEmpty(rawData)) { + return rawData.map(mapping); + } + return []; +} + +export function useDownloadData({ + query, + queryKey, + resource, + mapping, +}: { + query: any; + queryKey: string; + resource: string; + mapping: (data: any) => Record; +}) { + const { show, hide } = useAlert( + ({ message }) => message, + ({ type }) => ({ ...type, duration: 10000 }) + ); + + const [downloading, setDownloading] = useState(false); + const [pageCount, setPageCount] = useState(0); + const [progress, setProgress] = useState(0); + + const { refetch } = useDataQuery(query, { lazy: true }); + + useEffect(() => { + if (downloading && pageCount > 0) { + show({ + type: { + info: true, + }, + message: `${i18n.t("Downloading...")} ${progress}/${pageCount}`, + }); + } else { + hide(); + } + }, [progress, show, downloading, pageCount, hide]); + + const download = useCallback( + async ( + type: "xlsx" | "csv" | "json", + queryVariables: Record + ) => { + try { + setDownloading(true); + const pagination = await getPagination(refetch, { + queryVariables: queryVariables, + queryKey, + }); + + if (pagination) { + const pageCount = Math.ceil( + pagination.total! / pagination.pageSize! + ); + setPageCount(pageCount); + const dataFetch = async (page: number) => { + return await getData(refetch, { + options: queryVariables, + queryKey, + resource, + mapping, + page, + }).then((data) => { + setProgress(page); + show({ + type: { + info: true, + }, + message: `${i18n.t( + "Downloading..." + )} ${progress}/${pageCount}`, + }); + return data; + }); + }; + if (pageCount >= 1) { + const data = flattenDeep( + await mapSeries( + range(1, pageCount + 1), + asyncify(dataFetch) + ) + ); + await downloadFile(type, data); + } + } + } catch (e: any) { + show({ message: e.message, type: { critical: true } }); + setTimeout(() => hide(), 5000); + } finally { + setDownloading(false); + setProgress(0); + setPageCount(0); + hide(); + } + }, + [hide, mapping, queryKey, refetch, resource, show] + ); + + return { + download, + downloading, + }; +} + +export function downloadJSON(rows: any, reportName = "report"): void { + const dataStr = JSON.stringify(rows); + const dataUri = + "data:application/json;charset=utf-8," + encodeURIComponent(dataStr); + const exportFileDefaultName = `${reportName}.json`; + const linkElement = document.createElement("a"); + linkElement.setAttribute("href", dataUri); + linkElement.setAttribute("download", exportFileDefaultName); + linkElement.click(); +} + +export function downloadLineListingReport( + format: string, + rows: any[], + reportName = "report" +): void { + const workSheet = XLSX.utils.json_to_sheet(rows); + const workbook = XLSX.utils.book_new(); + XLSX.utils.book_append_sheet(workbook, workSheet); + XLSX.writeFile(workbook, `${reportName}.${format}`); +} diff --git a/src/modules/TBAdherence/utils/orgUnits.ts b/src/modules/TBAdherence/utils/orgUnits.ts new file mode 100644 index 0000000..1ab5529 --- /dev/null +++ b/src/modules/TBAdherence/utils/orgUnits.ts @@ -0,0 +1,32 @@ +import { useDataQuery } from "@dhis2/app-runtime"; +import { type OrganisationUnit } from "@hisptz/dhis2-utils"; +import { useSearchParams } from "react-router-dom"; + +export function useOrgUnit() { + const [params, setParams] = useSearchParams(); + const values = params.get("ou"); + const orgUnits = values?.split(";").join(","); + + const orgUnitQuery = { + ou: { + resource: "organisationUnits", + params: { + fields: ["id", "displayName", "path", "level"], + filter: `id:in:[${orgUnits!}]`, + }, + }, + }; + + const { refetch, data, loading } = useDataQuery<{ ou: OrganisationUnit }>( + orgUnitQuery, + { + lazy: !values, + }, + ); + + return { + loading, + orgUnit: data?.ou.organisationUnits, + refetch, + }; +} diff --git a/src/modules/shared/components/CollapsibleArea/CollapsibleArea.tsx b/src/modules/shared/components/CollapsibleArea/CollapsibleArea.tsx new file mode 100644 index 0000000..7a940f9 --- /dev/null +++ b/src/modules/shared/components/CollapsibleArea/CollapsibleArea.tsx @@ -0,0 +1,53 @@ +import React from "react"; +import Collapsible from "react-collapsible"; +import { useBoolean } from "usehooks-ts"; +import { Button, Divider, IconChevronDown24, IconChevronUp24 } from "@dhis2/ui"; + +export interface CollapsibleAreaProps { + header: string; + children: React.ReactElement; + defaultOpen?: boolean; +} + +export function CollapsibleArea({ + header, + children, + defaultOpen, +}: CollapsibleAreaProps) { + const { + value: open, + setTrue: onOpen, + setFalse: onClose, + toggle, + } = useBoolean(defaultOpen); + + return ( + +
+

{header}

+
+ + + } + > + {children} +
+ ); +} diff --git a/src/modules/shared/components/CollapsibleArea/index.ts b/src/modules/shared/components/CollapsibleArea/index.ts new file mode 100644 index 0000000..afb6830 --- /dev/null +++ b/src/modules/shared/components/CollapsibleArea/index.ts @@ -0,0 +1 @@ +export * from "./CollapsibleArea"; diff --git a/src/modules/shared/components/Loaders/index.tsx b/src/modules/shared/components/Loaders/index.tsx index 0e332f6..c42a6e4 100644 --- a/src/modules/shared/components/Loaders/index.tsx +++ b/src/modules/shared/components/Loaders/index.tsx @@ -1,25 +1,25 @@ import React from "react"; -import {CenteredContent, CircularLoader} from "@dhis2/ui"; +import { CenteredContent, CircularLoader } from "@dhis2/ui"; export function FullPageLoader({ minHeight, - message + message, }: { - minHeight?: number | string - message?: string + minHeight?: number | string; + message?: string; }): React.ReactElement { return ( -
- - {(message != null) &&

{message}

} -
+ + + {message != null &&

{message}

} +
); } export function CardLoader() { return ( - + ); } diff --git a/src/modules/shared/components/ProfileArea/EditDevice.tsx b/src/modules/shared/components/ProfileArea/EditDevice.tsx new file mode 100644 index 0000000..bb93de7 --- /dev/null +++ b/src/modules/shared/components/ProfileArea/EditDevice.tsx @@ -0,0 +1,103 @@ +import React from "react"; +import { + Button, + Modal, + ModalTitle, + ModalContent, + ModalActions, + ButtonStrip, + SingleSelectField, + SingleSelectOption, +} from "@dhis2/ui"; +import i18n from "@dhis2/d2-i18n"; +import { useRecoilState } from "recoil"; +import { AddDevice } from "../../state"; + +interface editDeviceProps { + name: string; + value: string; + options: [{ name: string; code: string }]; +} + +function EditDevice({ name, options, value }: editDeviceProps) { + const [hide, setHide] = useRecoilState(AddDevice); + + const onChange = ({ value }: { value: string }) => { + null; + }; + return ( +
+ { + setHide(true); + }} + > + +

+ {i18n.t(`Assign DAT device to ${name}`)} +

+
+ +
+ 5} + onChange={({ selected }: { selected: string }) => + onChange({ value: selected }) + } + value={value} + name={name} + label={i18n.t("Device IMEI number")} + > + {options?.map(({ name, code }) => ( + + ))} + + +
+
+ + + + + + +
+
+ ); +} + +export default EditDevice; diff --git a/src/modules/shared/components/ProfileArea/ProfileArea.module.css b/src/modules/shared/components/ProfileArea/ProfileArea.module.css new file mode 100644 index 0000000..f191a93 --- /dev/null +++ b/src/modules/shared/components/ProfileArea/ProfileArea.module.css @@ -0,0 +1,124 @@ +.profile-area { + display: flex; + flex-direction: column; + flex: 1; + gap: 32px; + padding: 32px; + width: 100%; + align-self: center; +} + +.profile-container { + flex: 1; + display: grid; + grid-template-columns: repeat(4, 0.2fr); + grid-template-rows: repeat(2, 1fr); + gap: 20px; + width: 100%; +} + +.grid-item { + display: flex; + flex-direction: column; +} + +.profile { + display: flex; + gap: 16px; + justify-content: space-between; + align-items: center; +} + +.label-title { + font-size: 13px; +} + +.label-value { + font-size: 17px; + font-weight: 500; +} + +@media only screen and (max-width: 768px) { + .profile-area { + width: 90vw; + padding: 16px; + } +} + +@media only screen and (max-width: 700px) { + .profile { + flex-direction: column; + gap: 32px; + } +} + +.qr-code-container { + display: flex; + flex-direction: column; + gap: 16px; +} + +.print-header { + display: none; +} + +.print-area { + display: flex; + flex-direction: column; + gap: 8px; + align-items: center; +} + +.edit-button { + border: none; + border-radius: 50%; + padding: 4px; + height: 32px; + width: 32px; + display: flex; + align-items: center; + justify-content: center; + background: none; +} + +.edit-button:hover { + background: #e3e1e1; +} + +.edit-button:hover:active { + background: #ccc8c8; +} + +@media print { + .profile-area { + width: 100%; + } + + .print-button { + display: none !important; + } + + .edit-button { + display: none !important; + } + .status { + display: none; + } + + .print-header { + display: flex; + flex-direction: column; + gap: 8px; + width: 100%; + text-align: center; + } + + .print-area { + width: 100%; + } + + @page { + size: A4 landscape; + margin: 2cm; + } +} diff --git a/src/modules/shared/components/ProfileArea/index.tsx b/src/modules/shared/components/ProfileArea/index.tsx new file mode 100644 index 0000000..ceb9df4 --- /dev/null +++ b/src/modules/shared/components/ProfileArea/index.tsx @@ -0,0 +1,262 @@ +import i18n from "@dhis2/d2-i18n"; +import styles from "./ProfileArea.module.css"; +import { Button, IconEdit24, Card } from "@dhis2/ui"; +import React from "react"; +import EditDevice from "./EditDevice"; +import { SHARED_ATTRIBUTES } from "../../constants"; +import { PatientProfile } from "../../models"; +import { useRecoilState } from "recoil"; +import { AddDevice } from "../../state"; + +export interface ProfileAreaProps { + profile: PatientProfile; +} + +export function ProfileArea({ profile }: ProfileAreaProps) { + const [, setHide] = useRecoilState(AddDevice); + const sex = + profile.sex == "M" ? "Male" : profile.sex == "F" ? "Female" : null; + + return ( +
+
+ +
+
+
+

+ {i18n.t("TB Client")} +

+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+
+ +
+
+
+

+ {i18n.t("DAT device information")} +

+
+
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+
+ +
+ ); +} diff --git a/src/modules/shared/components/StatusBadge.tsx b/src/modules/shared/components/StatusBadge.tsx new file mode 100644 index 0000000..ea0f9eb --- /dev/null +++ b/src/modules/shared/components/StatusBadge.tsx @@ -0,0 +1,14 @@ +import { Tag } from "@dhis2/ui"; +import React, { useMemo } from "react"; + +export interface StatusBadgeProps { + status: string; +} + +export function StatusBadge({ status }: StatusBadgeProps) { + return ( + + {status} + + ); +} diff --git a/src/modules/shared/constants/attributes.ts b/src/modules/shared/constants/attributes.ts index 20defd2..b762a2d 100644 --- a/src/modules/shared/constants/attributes.ts +++ b/src/modules/shared/constants/attributes.ts @@ -1 +1,31 @@ -export const SHARED_ATTRIBUTES = {}; +export const SHARED_ATTRIBUTES = { + TB_DISTRICT_NUMBER: "aihxG1tTqba", + DEVICE_NUMBER: "aihxG1tTqba", +}; + +export enum TRACKED_ENTITY_ATTRIBUTES { + INSTANCE_ID = "", + FIRST_NAME = "iAaQt0MfyFj", + OTHER_NAMES = "yaNdF4auOw6", + SURNAME = "WrvTFV6yrbj", + SEX = "lYMzXiSb00n", + AGE = "ycm08j1RuKr", + VILLAGE = "FWWRXotVNoo", + WARD = "bLPFnE5ueEW", + STREET_CHAIRPERSON = "W8tQbY13n97", + WORKPLACE = "HSjZ3gIuNIW", + REFERRAL = "HdXQqJcXHbY", + TB_DISTRICT_NUMBER = "aihxG1tTqba", + PHONE_NUMBER = "b11aBXG3igq", + DISEASE_CLASSIFICATION = "bxiZ2tUj9BR", + HISTORY_OF_TREATMENT = "AnkK8cKeigj", + STREET_OF_DOMICILE_TB = "Bx3SKt4tmkf", + DOT_OPTION = "QMdTG6G8liX", + TB_NO = "MoTxA4qflOd", + START_OF_TB_TREATMENT = "AqIZbcx93Yj", + PRE_TREATMENT_LAB_RESULT_DATE = "MNA6nJn1bew", + STARTED_TREATMENT_QUESTION = "xxY3qFYXABA", + TB_REGIMEN = "JjySGEpaVza", +} + +export enum DATA_ELEMENTS {} diff --git a/src/modules/shared/constants/metadata.ts b/src/modules/shared/constants/metadata.ts index b05a501..867e5f8 100644 --- a/src/modules/shared/constants/metadata.ts +++ b/src/modules/shared/constants/metadata.ts @@ -1 +1,12 @@ export const DATA_TEST_PREFIX = "d2-dat"; +export const DATASTORE_NAMESPACE = "dat-app"; +export const DAT_PROGRAM = "tj4u1ip0tTF"; + +export const TEI_FIELDS = [ + "trackedEntity", + "created", + "lastUpdated", + "orgUnit", + "attributes[*]", + "enrollments[orgUnitName,enrollment,enrolledAt,orgUnit,program,events[event,dataValues,programStage,enrollment,occurredAt,program,orgUnit]]", +]; diff --git a/src/modules/shared/constants/settings.ts b/src/modules/shared/constants/settings.ts index beaa4c3..fadfed0 100644 --- a/src/modules/shared/constants/settings.ts +++ b/src/modules/shared/constants/settings.ts @@ -1,17 +1,40 @@ export interface TBAdherenceConfig { - name: string; - id: string; //Primary-screening - columns: Array<{ - key: string; - label: string; - path: string | Array; - }>; + key: string; + label: string; + path: string | Array; } -export const reports: TBAdherenceConfig[] = []; +export const TBAdherence: TBAdherenceConfig[] = [ + { + key: "tbDistrictNumber", + label: "TB District Number", + path: "tbDistrictNumber", + }, + { + key: "name", + label: "Name", + path: "name", + }, + { + key: "deviceIMEINumber", + label: "Device IMEI Number", + path: "deviceIMEINumber", + }, + { + key: "adherenceFrequency", + label: "Adherence Frequency", + path: "adherenceFrequency", + }, + { + key: "adherenceStreak", + label: "Adherence Streak", + path: "adherenceStreak", + }, +]; export const DEFAULT_SETTINGS = { settings: {}, + TBAdherence, } as const; export const IN_APP_SETTINGS = {}; diff --git a/src/modules/shared/models/index.ts b/src/modules/shared/models/index.ts new file mode 100644 index 0000000..c1b1738 --- /dev/null +++ b/src/modules/shared/models/index.ts @@ -0,0 +1,2 @@ +export * from "./trackedEntityModel"; +export * from "./profile"; diff --git a/src/modules/shared/models/profile.ts b/src/modules/shared/models/profile.ts new file mode 100644 index 0000000..c70519b --- /dev/null +++ b/src/modules/shared/models/profile.ts @@ -0,0 +1,76 @@ +import { TrackedEntityModel } from "./trackedEntityModel"; +import { DateTime } from "luxon"; +import { + DATA_ELEMENTS, + EXPIRE_DAYS, + SHARED_ATTRIBUTES, + TRACKED_ENTITY_ATTRIBUTES, +} from "../constants"; + +import { Option, TrackedEntity } from "../types"; +import { filter, find, forIn, head, isEmpty } from "lodash"; + +export class PatientProfile extends TrackedEntityModel { + constructor(trackedEntity: TrackedEntity) { + super(trackedEntity); + } + + get id(): string { + return this.trackedEntity as string; + } + + get name() { + return `${ + this.getAttributeValue(TRACKED_ENTITY_ATTRIBUTES.FIRST_NAME) ?? "" + } ${this.getAttributeValue(TRACKED_ENTITY_ATTRIBUTES.SURNAME) ?? ""}`; + } + + get tbDistrictNumber(): string { + return this.getAttributeValue( + SHARED_ATTRIBUTES.TB_DISTRICT_NUMBER + ) as string; + } + + get orgUnitFilter(): string { + return this.enrollment?.orgUnit ?? ""; + } + + get sex() { + return this.getAttributeValue(TRACKED_ENTITY_ATTRIBUTES.SEX); + } + + get age() { + return this.getAttributeValue(TRACKED_ENTITY_ATTRIBUTES.AGE) as string; + } + + get phoneNumber(): string { + return this.getAttributeValue( + TRACKED_ENTITY_ATTRIBUTES.PHONE_NUMBER + ) as string; + } + + get tbIdentificationNumber(): string { + return this.getAttributeValue( + TRACKED_ENTITY_ATTRIBUTES.TB_NO + ) as string; + } + + get tableData(): Record { + const name = this.name; + const tbDistrictNumber = this.tbDistrictNumber; + const tbNo = this.tbIdentificationNumber; + const age = this.age; + const sex = this.sex; + const phoneNumber = this.phoneNumber; + + return { + id: this.id as string, + tbNo, + tbDistrictNumber, + name, + age, + sex, + phoneNumber, + }; + } +} diff --git a/src/modules/shared/models/trackedEntityModel.ts b/src/modules/shared/models/trackedEntityModel.ts new file mode 100644 index 0000000..f88b750 --- /dev/null +++ b/src/modules/shared/models/trackedEntityModel.ts @@ -0,0 +1,66 @@ +import { uid } from "@hisptz/dhis2-utils"; +import { + TrackedEntity, + WebapiControllerTrackerViewRelationshipItem_Enrollment, + WebapiControllerTrackerViewRelationshipItem_Event, +} from "../types"; +import { find, head } from "lodash"; +import { SHARED_ATTRIBUTES } from "../constants"; + +export class TrackedEntityModel { + public instance?: TrackedEntity; + public trackedEntity?: string; + public attributes?: TrackedEntity["attributes"] = []; + public enrollment?: WebapiControllerTrackerViewRelationshipItem_Enrollment; + public events: Array = + []; + public program?: string; + public orgUnit?: string; + private meta?: Record; + + constructor(trackedEntity?: TrackedEntity) { + const { + trackedEntity: teiId, + enrollments, + attributes, + orgUnit, + ...meta + } = trackedEntity ?? {}; + + this.trackedEntity = teiId ?? uid(); + + if (trackedEntity) { + this.attributes = attributes; + this.enrollment = head(enrollments); + this.program = this.enrollment?.program; + this.orgUnit = orgUnit; + this.events = this.enrollment?.events ?? []; + this.meta = meta; + this.instance = trackedEntity; + return this; + } + } + + getAttributeValue( + attributeId: (typeof SHARED_ATTRIBUTES)[keyof typeof SHARED_ATTRIBUTES] + ): string { + return ( + find(this.attributes, { attribute: attributeId })?.value ?? + ("" as string) + ); + } + + toJSON(): Partial { + return { + orgUnit: this.orgUnit as string, + trackedEntity: this.trackedEntity as string, + attributes: this.attributes as any[], + enrollments: [ + { + ...(this.enrollment as any), + events: this.events, + }, + ], + }; + } +} diff --git a/src/modules/shared/state/engine.ts b/src/modules/shared/state/engine.ts new file mode 100644 index 0000000..49eb0eb --- /dev/null +++ b/src/modules/shared/state/engine.ts @@ -0,0 +1,11 @@ +import { atom } from "recoil"; +import { DHIS2DataEngine } from "../types"; + +export const DataEngineState = atom({ + key: "app-engine-state", +}); + +export const AddDevice = atom({ + key: "add-device-state", + default: true, +}); diff --git a/src/modules/shared/state/index.ts b/src/modules/shared/state/index.ts new file mode 100644 index 0000000..146c098 --- /dev/null +++ b/src/modules/shared/state/index.ts @@ -0,0 +1 @@ +export * from "./engine"; diff --git a/src/modules/shared/types/dhis2.ts b/src/modules/shared/types/dhis2.ts new file mode 100644 index 0000000..f220ff9 --- /dev/null +++ b/src/modules/shared/types/dhis2.ts @@ -0,0 +1,10886 @@ +/* GENERATED BY https://github.com/Birkbjo/dhis2-open-api-ts */ + +export type Access = { + data: AccessData; + delete: boolean; + externalize: boolean; + manage: boolean; + read: boolean; + update: boolean; + write: boolean; +}; + +export type AccessData = { + read: boolean; + write: boolean; +}; + +export type AddOperation = { + op: string; + path: string; + value: Record; +}; + +export type AggregateDataExchange = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + source: Source; + target: Target; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type AggregateDataExchangeJobParameters = { + dataExchangeIds: Array; +}; + +export type AnalyticsJobParameters = { + lastYears: number; + skipPrograms: Array; + skipResourceTables: boolean; + skipTableTypes: Array< + | "DATA_VALUE" + | "COMPLETENESS" + | "COMPLETENESS_TARGET" + | "ORG_UNIT_TARGET" + | "EVENT" + | "ENROLLMENT" + | "OWNERSHIP" + | "VALIDATION_RESULT" + >; +}; + +export type AnalyticsTableHook = { + access: Access; + analyticsTableType: AnalyticsTableHook.analyticsTableType; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + phase: AnalyticsTableHook.phase; + publicAccess: string; + resourceTableType: AnalyticsTableHook.resourceTableType; + sharing: Sharing; + sql: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace AnalyticsTableHook { + export enum analyticsTableType { + DATA_VALUE = "DATA_VALUE", + COMPLETENESS = "COMPLETENESS", + COMPLETENESS_TARGET = "COMPLETENESS_TARGET", + ORG_UNIT_TARGET = "ORG_UNIT_TARGET", + EVENT = "EVENT", + ENROLLMENT = "ENROLLMENT", + OWNERSHIP = "OWNERSHIP", + VALIDATION_RESULT = "VALIDATION_RESULT", + } + + export enum phase { + RESOURCE_TABLE_POPULATED = "RESOURCE_TABLE_POPULATED", + ANALYTICS_TABLE_POPULATED = "ANALYTICS_TABLE_POPULATED", + } + + export enum resourceTableType { + ORG_UNIT_STRUCTURE = "ORG_UNIT_STRUCTURE", + DATA_SET_ORG_UNIT_CATEGORY = "DATA_SET_ORG_UNIT_CATEGORY", + CATEGORY_OPTION_COMBO_NAME = "CATEGORY_OPTION_COMBO_NAME", + DATA_ELEMENT_GROUP_SET_STRUCTURE = "DATA_ELEMENT_GROUP_SET_STRUCTURE", + INDICATOR_GROUP_SET_STRUCTURE = "INDICATOR_GROUP_SET_STRUCTURE", + ORG_UNIT_GROUP_SET_STRUCTURE = "ORG_UNIT_GROUP_SET_STRUCTURE", + CATEGORY_STRUCTURE = "CATEGORY_STRUCTURE", + DATA_ELEMENT_STRUCTURE = "DATA_ELEMENT_STRUCTURE", + PERIOD_STRUCTURE = "PERIOD_STRUCTURE", + DATE_PERIOD_STRUCTURE = "DATE_PERIOD_STRUCTURE", + DATA_ELEMENT_CATEGORY_OPTION_COMBO = "DATA_ELEMENT_CATEGORY_OPTION_COMBO", + DATA_APPROVAL_REMAP_LEVEL = "DATA_APPROVAL_REMAP_LEVEL", + DATA_APPROVAL_MIN_LEVEL = "DATA_APPROVAL_MIN_LEVEL", + } +} + +export type Api = { + accessToken: string; + password: string; + url: string; + username: string; +}; + +export type ApiToken = { + access: Access; + attributeValues: Array; + attributes: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + expire: number; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + type: ApiToken.type; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + version: number; +}; + +export namespace ApiToken { + export enum type { + PERSONAL_ACCESS_TOKEN = "PERSONAL_ACCESS_TOKEN", + } +} + +export type ApiTokenAuth = { + token: string; + type: string; +}; + +export type App = { + activities: AppActivities; + appState: App.appState; + appStorageSource: App.appStorageSource; + appType: App.appType; + app_hub_id: string; + authorities: Array; + baseUrl: string; + bundled: boolean; + core_app: boolean; + default_locale: string; + description: string; + developer: AppDeveloper; + folderName: string; + icons: AppIcons; + installs_allowed_from: Array; + key: string; + launchUrl: string; + launch_path: string; + name: string; + pluginLaunchUrl: string; + plugin_launch_path: string; + plugin_type: string; + settings: AppSettings; + short_name: string; + version: string; +}; + +export namespace App { + export enum appState { + OK = "OK", + INVALID_BUNDLED_APP_OVERRIDE = "INVALID_BUNDLED_APP_OVERRIDE", + INVALID_CORE_APP = "INVALID_CORE_APP", + NAMESPACE_TAKEN = "NAMESPACE_TAKEN", + INVALID_ZIP_FORMAT = "INVALID_ZIP_FORMAT", + MISSING_MANIFEST = "MISSING_MANIFEST", + INVALID_MANIFEST_JSON = "INVALID_MANIFEST_JSON", + INSTALLATION_FAILED = "INSTALLATION_FAILED", + NOT_FOUND = "NOT_FOUND", + MISSING_SYSTEM_BASE_URL = "MISSING_SYSTEM_BASE_URL", + APPROVED = "APPROVED", + PENDING = "PENDING", + NOT_APPROVED = "NOT_APPROVED", + DELETION_IN_PROGRESS = "DELETION_IN_PROGRESS", + } + + export enum appStorageSource { + LOCAL = "LOCAL", + JCLOUDS = "JCLOUDS", + } + + export enum appType { + APP = "APP", + RESOURCE = "RESOURCE", + DASHBOARD_WIDGET = "DASHBOARD_WIDGET", + TRACKER_DASHBOARD_WIDGET = "TRACKER_DASHBOARD_WIDGET", + } +} + +export type AppActivities = { + dhis: AppDhis; +}; + +export type AppDeveloper = { + company: string; + email: string; + name: string; + url: string; +}; + +export type AppDhis = { + href: string; + namespace: string; +}; + +export type AppIcons = { + "16": string; + "48": string; + "128": string; +}; + +export type ApprovalDto = { + aoc: UID_CategoryOptionCombo; + ou: UID_OrganisationUnit; +}; + +export type ApprovalsDto = { + approvals: Array; + ds: Array; + pe: Array; + wf: Array; +}; + +export type ApprovalStatusDto = { + aoc: UID_CategoryOptionCombo; + level: string; + ou: UID_OrganisationUnit; + ouName: string; + pe: string; + permissions: DataApprovalPermissions; + state: ApprovalStatusDto.state; + wf: UID_DataApprovalWorkflow; +}; + +export namespace ApprovalStatusDto { + export enum state { + UNAPPROVABLE = "UNAPPROVABLE", + UNAPPROVED_ABOVE = "UNAPPROVED_ABOVE", + UNAPPROVED_WAITING = "UNAPPROVED_WAITING", + UNAPPROVED_READY = "UNAPPROVED_READY", + APPROVED_ABOVE = "APPROVED_ABOVE", + APPROVED_HERE = "APPROVED_HERE", + ACCEPTED_HERE = "ACCEPTED_HERE", + } +} + +export type AppSettings = { + dashboardWidget: DashboardWidgetAppSettings; +}; + +export type AppVersion = { + created: string; + demoUrl: string; + downloadUrl: string; + id: string; + lastUpdated: string; + maxDhisVersion: string; + minDhisVersion: string; + version: string; +}; + +export type Attribute = { + access: Access; + attributeValues: Array; + categoryAttribute: boolean; + categoryOptionAttribute: boolean; + categoryOptionComboAttribute: boolean; + categoryOptionGroupAttribute: boolean; + categoryOptionGroupSetAttribute: boolean; + code: string; + constantAttribute: boolean; + created: string; + createdBy: User; + dataElementAttribute: boolean; + dataElementGroupAttribute: boolean; + dataElementGroupSetAttribute: boolean; + dataSetAttribute: boolean; + description: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + documentAttribute: boolean; + eventChartAttribute: boolean; + eventReportAttribute: boolean; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + indicatorAttribute: boolean; + indicatorGroupAttribute: boolean; + lastUpdated: string; + lastUpdatedBy: User; + legendSetAttribute: boolean; + mandatory: boolean; + mapAttribute: boolean; + name: string; + objectTypes: Array; + optionAttribute: boolean; + optionSet: OptionSet; + optionSetAttribute: boolean; + organisationUnitAttribute: boolean; + organisationUnitGroupAttribute: boolean; + organisationUnitGroupSetAttribute: boolean; + programAttribute: boolean; + programIndicatorAttribute: boolean; + programStageAttribute: boolean; + publicAccess: string; + relationshipTypeAttribute: boolean; + sectionAttribute: boolean; + sharing: Sharing; + shortName: string; + sortOrder: number; + sqlViewAttribute: boolean; + trackedEntityAttributeAttribute: boolean; + trackedEntityTypeAttribute: boolean; + translations: Array; + unique: boolean; + user: User; + userAccesses: Array; + userAttribute: boolean; + userGroupAccesses: Array; + userGroupAttribute: boolean; + validationRuleAttribute: boolean; + validationRuleGroupAttribute: boolean; + valueType: Attribute.valueType; + visualizationAttribute: boolean; +}; + +export namespace Attribute { + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type AttributeValue = { + attribute: Attribute; + value: string; +}; + +export type AttributeValueFilter = { + attribute: string; + dateFilter: DateFilterPeriod; + eq: string; + ew: string; + ge: string; + gt: string; + in: Array; + le: string; + like: string; + lt: string; + sw: string; +}; + +export type AvailabilityStatus = { + available: boolean; + message: string; + statusCode: number; + statusPhrase: string; +}; + +export type Axis = { + axis: number; + dimensionalItem: string; +}; + +export type AxisV2 = { + baseLine: Line; + decimals: number; + index: number; + label: StyledObject; + maxValue: number; + minValue: number; + steps: number; + targetLine: Line; + title: StyledObject; + type: AxisV2.type; +}; + +export namespace AxisV2 { + export enum type { + DOMAIN = "DOMAIN", + RANGE = "RANGE", + } +} + +export type BaseIdentifiableObject = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type BatchResponseStatus = { + summaries: Array; +}; + +export type Body = { + enrollments: Array; + events: Array; + relationships: Array; + trackedEntities: Array; +}; + +export type BulkJsonPatch = { + patch: JsonPatch; + targetIds: Record>; +}; + +export type BulkSmsGatewayConfig = { + id: string; + isDefault: boolean; + maxSmsLength: string; + name: string; + password: string; + sendUrlParameters: boolean; + uid: string; + urlTemplate: string; + username: string; +}; + +export type CascadeSharingReport = { + countUpdatedDashboardItems: number; + errorReports: Array; + updateObjects: Record>; +}; + +export type Category = { + access: Access; + aggregationType: Category.aggregationType; + allItems: boolean; + attributeValues: Array; + categoryCombos: Array; + categoryOptions: Array; + code: string; + created: string; + createdBy: User; + dataDimension: boolean; + dataDimensionType: Category.dataDimensionType; + description: string; + dimension: string; + dimensionItemKeywords: DimensionItemKeywords; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filter: string; + formName: string; + href: string; + id: string; + items: Array; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + name: string; + optionSet: OptionSet; + programStage: ProgramStage; + publicAccess: string; + repetition: EventRepetition; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + valueType: Category.valueType; +}; + +export namespace Category { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type CategoryCombo = { + access: Access; + attributeValues: Array; + categories: Array; + categoryOptionCombos: Array; + code: string; + created: string; + createdBy: User; + dataDimensionType: CategoryCombo.dataDimensionType; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + isDefault: boolean; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + skipTotal: boolean; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace CategoryCombo { + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } +} + +export type CategoryDimension = { + category: Category; + categoryOptions: Array; +}; + +export type CategoryOption = { + access: Access; + aggregationType: CategoryOption.aggregationType; + attributeValues: Array; + categories: Array; + categoryOptionCombos: Array; + categoryOptionGroups: Array; + code: string; + created: string; + createdBy: User; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + endDate: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + isDefault: boolean; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + organisationUnits: Array; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + startDate: string; + style: ObjectStyle; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace CategoryOption { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } +} + +export type CategoryOptionCombo = { + access: Access; + aggregationType: CategoryOptionCombo.aggregationType; + attributeValues: Array; + categoryCombo: CategoryCombo; + categoryOptions: Array; + code: string; + created: string; + createdBy: User; + description: string; + dimensionItem: string; + dimensionItemType: CategoryOptionCombo.dimensionItemType; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + ignoreApproval: boolean; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace CategoryOptionCombo { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dimensionItemType { + DATA_ELEMENT = "DATA_ELEMENT", + DATA_ELEMENT_OPERAND = "DATA_ELEMENT_OPERAND", + INDICATOR = "INDICATOR", + REPORTING_RATE = "REPORTING_RATE", + PROGRAM_DATA_ELEMENT = "PROGRAM_DATA_ELEMENT", + PROGRAM_ATTRIBUTE = "PROGRAM_ATTRIBUTE", + PROGRAM_INDICATOR = "PROGRAM_INDICATOR", + PERIOD = "PERIOD", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + CATEGORY_OPTION = "CATEGORY_OPTION", + OPTION_GROUP = "OPTION_GROUP", + DATA_ELEMENT_GROUP = "DATA_ELEMENT_GROUP", + ORGANISATION_UNIT_GROUP = "ORGANISATION_UNIT_GROUP", + CATEGORY_OPTION_GROUP = "CATEGORY_OPTION_GROUP", + EXPRESSION_DIMENSION_ITEM = "EXPRESSION_DIMENSION_ITEM", + } +} + +export type CategoryOptionGroup = { + access: Access; + aggregationType: CategoryOptionGroup.aggregationType; + attributeValues: Array; + categoryOptions: Array; + code: string; + created: string; + createdBy: User; + dataDimensionType: CategoryOptionGroup.dataDimensionType; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + groupSets: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace CategoryOptionGroup { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } +} + +export type CategoryOptionGroupSet = { + access: Access; + aggregationType: CategoryOptionGroupSet.aggregationType; + allItems: boolean; + attributeValues: Array; + categoryOptionGroups: Array; + code: string; + created: string; + createdBy: User; + dataDimension: boolean; + dataDimensionType: CategoryOptionGroupSet.dataDimensionType; + description: string; + dimension: string; + dimensionItemKeywords: DimensionItemKeywords; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filter: string; + formName: string; + href: string; + id: string; + items: Array; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + name: string; + optionSet: OptionSet; + programStage: ProgramStage; + publicAccess: string; + repetition: EventRepetition; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + valueType: CategoryOptionGroupSet.valueType; +}; + +export namespace CategoryOptionGroupSet { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type CategoryOptionGroupSetDimension = { + categoryOptionGroupSet: CategoryOptionGroupSet; + categoryOptionGroups: Array; +}; + +export type ClickatellGatewayConfig = { + authToken: string; + id: string; + isDefault: boolean; + maxSmsLength: string; + name: string; + password: string; + sendUrlParameters: boolean; + uid: string; + urlTemplate: string; + username: string; +}; + +export type CodeList = { + codes: Array; +}; + +export type Column = { + index: number; + span: number; +}; + +export type CompleteStatusDto = { + complete: boolean; + created: string; + createdBy: string; + lastUpdated: string; + lastUpdatedBy: string; +}; + +export type Config = { + inclusionStrategy: Config.inclusionStrategy; + properties: Record>; +}; + +export namespace Config { + export enum inclusionStrategy { + ALWAYS = "ALWAYS", + NON_NULL = "NON_NULL", + NON_EMPTY = "NON_EMPTY", + } +} + +export type Configuration = { + corsWhitelist: Array; + facilityOrgUnitGroupSet: OrganisationUnitGroupSet; + facilityOrgUnitLevel: OrganisationUnitLevel; + feedbackRecipients: UserGroup; + infrastructuralDataElements: DataElementGroup; + infrastructuralIndicators: IndicatorGroup; + infrastructuralPeriodType: Configuration.infrastructuralPeriodType; + offlineOrganisationUnitLevel: OrganisationUnitLevel; + selfRegistrationOrgUnit: OrganisationUnit; + selfRegistrationRole: UserRole; + systemId: string; + systemUpdateNotificationRecipients: UserGroup; +}; + +export namespace Configuration { + export enum infrastructuralPeriodType { + BI_MONTHLY = "BiMonthly", + BI_WEEKLY = "BiWeekly", + DAILY = "Daily", + FINANCIAL_APRIL = "FinancialApril", + FINANCIAL_JULY = "FinancialJuly", + FINANCIAL_NOV = "FinancialNov", + FINANCIAL_OCT = "FinancialOct", + MONTHLY = "Monthly", + QUARTERLY = "Quarterly", + SIX_MONTHLY_APRIL = "SixMonthlyApril", + SIX_MONTHLY_NOV = "SixMonthlyNov", + SIX_MONTHLY = "SixMonthly", + TWO_YEARLY = "TwoYearly", + WEEKLY = "Weekly", + WEEKLY_SATURDAY = "WeeklySaturday", + WEEKLY_SUNDAY = "WeeklySunday", + WEEKLY_THURSDAY = "WeeklyThursday", + WEEKLY_WEDNESDAY = "WeeklyWednesday", + YEARLY = "Yearly", + } +} + +export type ConsoleTarget = { + clientId: string; + type: string; +}; + +export type Constant = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + value: number; +}; + +export type ContinuousAnalyticsJobParameters = { + fullUpdateHourOfDay: number; + lastYears: number; + skipTableTypes: Array< + | "DATA_VALUE" + | "COMPLETENESS" + | "COMPLETENESS_TARGET" + | "ORG_UNIT_TARGET" + | "EVENT" + | "ENROLLMENT" + | "OWNERSHIP" + | "VALIDATION_RESULT" + >; +}; + +export type CustomDataEntryFormDto = { + dataSetId: string; + displayDensity: CustomDataEntryFormDto.displayDensity; + form: string; + id: string; + version: number; +}; + +export namespace CustomDataEntryFormDto { + export enum displayDensity { + COMFORTABLE = "COMFORTABLE", + NORMAL = "NORMAL", + COMPACT = "COMPACT", + NONE = "NONE", + } +} + +export type Dashboard = { + access: Access; + allowedFilters: Array; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + dashboardItems: Array; + description: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + itemConfig: ItemConfig; + itemCount: number; + lastUpdated: string; + lastUpdatedBy: User; + layout: Layout; + name: string; + publicAccess: string; + restrictFilters: boolean; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type DashboardItem = { + access: Access; + appKey: string; + attributeValues: Array; + code: string; + contentCount: number; + created: string; + createdBy: User; + displayName: string; + eventChart: Ref_EventChart; + eventReport: Ref_EventReport; + eventVisualization: EventVisualization; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + height: number; + href: string; + id: string; + interpretationCount: number; + interpretationLikeCount: number; + lastUpdated: string; + lastUpdatedBy: User; + map: Map; + messages: boolean; + name: string; + publicAccess: string; + reports: Array; + resources: Array; + shape: DashboardItem.shape; + sharing: Sharing; + text: string; + translations: Array; + type: DashboardItem.type; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + users: Array; + visualization: Visualization; + width: number; + x: number; + y: number; +}; + +export namespace DashboardItem { + export enum shape { + NORMAL = "NORMAL", + DOUBLE_WIDTH = "DOUBLE_WIDTH", + FULL_WIDTH = "FULL_WIDTH", + } + + export enum type { + VISUALIZATION = "VISUALIZATION", + EVENT_VISUALIZATION = "EVENT_VISUALIZATION", + EVENT_CHART = "EVENT_CHART", + MAP = "MAP", + EVENT_REPORT = "EVENT_REPORT", + USERS = "USERS", + REPORTS = "REPORTS", + RESOURCES = "RESOURCES", + TEXT = "TEXT", + MESSAGES = "MESSAGES", + APP = "APP", + } +} + +export type DashboardSearchResult = { + appCount: number; + apps: Array; + eventChartCount: number; + eventCharts: Array; + eventReportCount: number; + eventReports: Array; + eventVisualizationCount: number; + eventVisualizations: Array; + mapCount: number; + maps: Array; + reportCount: number; + reports: Array; + resourceCount: number; + resources: Array; + searchCount: number; + userCount: number; + users: Array; + visualizationCount: number; + visualizations: Array; +}; + +export type DashboardWidgetAppSettings = { + hideTitle: boolean; +}; + +export type DataAnalysisParams = { + ds: Array; + endDate: string; + ou: string; + standardDeviation: number; + startDate: string; +}; + +export type DataApprovalLevel = { + access: Access; + attributeValues: Array; + categoryOptionGroupSet: CategoryOptionGroupSet; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + level: number; + name: string; + orgUnitLevel: number; + orgUnitLevelName: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type DataApprovalPermissions = { + acceptedAt: string; + acceptedBy: string; + approvedAt: string; + approvedBy: string; + mayAccept: boolean; + mayApprove: boolean; + mayReadData: boolean; + mayUnaccept: boolean; + mayUnapprove: boolean; + state: string; +}; + +export type DataApprovalWorkflow = { + access: Access; + attributeValues: Array; + categoryCombo: CategoryCombo; + code: string; + created: string; + createdBy: User; + dataApprovalLevels: Array; + dataSets: Array; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + periodType: DataApprovalWorkflow.periodType; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace DataApprovalWorkflow { + export enum periodType { + BI_MONTHLY = "BiMonthly", + BI_WEEKLY = "BiWeekly", + DAILY = "Daily", + FINANCIAL_APRIL = "FinancialApril", + FINANCIAL_JULY = "FinancialJuly", + FINANCIAL_NOV = "FinancialNov", + FINANCIAL_OCT = "FinancialOct", + MONTHLY = "Monthly", + QUARTERLY = "Quarterly", + SIX_MONTHLY_APRIL = "SixMonthlyApril", + SIX_MONTHLY_NOV = "SixMonthlyNov", + SIX_MONTHLY = "SixMonthly", + TWO_YEARLY = "TwoYearly", + WEEKLY = "Weekly", + WEEKLY_SATURDAY = "WeeklySaturday", + WEEKLY_SUNDAY = "WeeklySunday", + WEEKLY_THURSDAY = "WeeklyThursday", + WEEKLY_WEDNESDAY = "WeeklyWednesday", + YEARLY = "Yearly", + } +} + +export type DatabaseInfo = { + databaseVersion: string; + name: string; + spatialSupport: boolean; + url: string; + user: string; +}; + +export type DataDimensionItem = { + dataDimensionItemType: DataDimensionItem.dataDimensionItemType; + dataElement: DataElement; + dataElementOperand: Ref_DataElementOperand; + expressionDimensionItem: ExpressionDimensionItem; + indicator: Indicator; + programAttribute: Ref_ProgramTrackedEntityAttributeDimensionItem; + programDataElement: Ref_ProgramDataElementDimensionItem; + programIndicator: ProgramIndicator; + reportingRate: Ref_ReportingRate; +}; + +export namespace DataDimensionItem { + export enum dataDimensionItemType { + INDICATOR = "INDICATOR", + DATA_ELEMENT = "DATA_ELEMENT", + DATA_ELEMENT_OPERAND = "DATA_ELEMENT_OPERAND", + REPORTING_RATE = "REPORTING_RATE", + PROGRAM_INDICATOR = "PROGRAM_INDICATOR", + PROGRAM_DATA_ELEMENT = "PROGRAM_DATA_ELEMENT", + PROGRAM_ATTRIBUTE = "PROGRAM_ATTRIBUTE", + EXPRESSION_DIMENSION_ITEM = "EXPRESSION_DIMENSION_ITEM", + VALIDATION_RULE = "VALIDATION_RULE", + } +} + +export type DataElement = { + access: Access; + aggregationLevels: Array; + aggregationType: DataElement.aggregationType; + attributeValues: Array; + categoryCombo: CategoryCombo; + code: string; + commentOptionSet: OptionSet; + created: string; + createdBy: User; + dataElementGroups: Array; + dataSetElements: Array; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + domainType: DataElement.domainType; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + fieldMask: string; + formName: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + optionSet: OptionSet; + optionSetValue: boolean; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + style: ObjectStyle; + translations: Array; + url: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + valueType: DataElement.valueType; + valueTypeOptions: FileTypeValueOptions; + zeroIsSignificant: boolean; +}; + +export namespace DataElement { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum domainType { + AGGREGATE = "AGGREGATE", + TRACKER = "TRACKER", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type DataElementGroup = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + dataElements: Array; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + groupSets: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type DataElementGroupSet = { + access: Access; + aggregationType: DataElementGroupSet.aggregationType; + allItems: boolean; + attributeValues: Array; + code: string; + compulsory: boolean; + created: string; + createdBy: User; + dataDimension: boolean; + dataDimensionType: DataElementGroupSet.dataDimensionType; + dataElementGroups: Array; + description: string; + dimension: string; + dimensionItemKeywords: DimensionItemKeywords; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filter: string; + formName: string; + href: string; + id: string; + items: Array; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + name: string; + optionSet: OptionSet; + programStage: ProgramStage; + publicAccess: string; + repetition: EventRepetition; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + valueType: DataElementGroupSet.valueType; +}; + +export namespace DataElementGroupSet { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type DataElementGroupSetDimension = { + dataElementGroupSet: DataElementGroupSet; + dataElementGroups: Array; +}; + +export type DataEntryForm = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + format: number; + href: string; + htmlCode: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + style: DataEntryForm.style; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace DataEntryForm { + export enum style { + COMFORTABLE = "COMFORTABLE", + NORMAL = "NORMAL", + COMPACT = "COMPACT", + NONE = "NONE", + } +} + +export type DataInputPeriod = { + closingDate: string; + openingDate: string; + period: string; +}; + +export type DataIntegrityCheck = { + code: string; + description: string; + displayName: string; + introduction: string; + isSlow: boolean; + issuesIdType: string; + name: string; + recommendation: string; + section: string; + severity: DataIntegrityCheck.severity; +}; + +export namespace DataIntegrityCheck { + export enum severity { + INFO = "INFO", + WARNING = "WARNING", + SEVERE = "SEVERE", + CRITICAL = "CRITICAL", + } +} + +export type DataIntegrityDetails = { + error: string; + finishedTime: string; + issues: Array; + startTime: string; +}; + +export type DataIntegrityIssue = { + comment: string; + id: string; + name: string; + refs: Array; +}; + +export type DataIntegrityJobParameters = { + checks: Array; + type: DataIntegrityJobParameters.type; +}; + +export namespace DataIntegrityJobParameters { + export enum type { + REPORT = "REPORT", + SUMMARY = "SUMMARY", + DETAILS = "DETAILS", + } +} + +export type DataIntegritySummary = { + count: number; + error: string; + finishedTime: string; + percentage: number; + startTime: string; +}; + +export type DataSet = { + access: Access; + aggregationType: DataSet.aggregationType; + attributeValues: Array; + categoryCombo: CategoryCombo; + code: string; + compulsoryDataElementOperands: Array; + compulsoryFieldsCompleteOnly: boolean; + created: string; + createdBy: User; + dataElementDecoration: boolean; + dataEntryForm: DataEntryForm; + dataInputPeriods: Array; + dataSetElements: Array; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + expiryDays: number; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + fieldCombinationRequired: boolean; + formName: string; + formType: DataSet.formType; + href: string; + id: string; + indicators: Array; + interpretations: Array; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + mobile: boolean; + name: string; + noValueRequiresComment: boolean; + notificationRecipients: UserGroup; + notifyCompletingUser: boolean; + openFuturePeriods: number; + openPeriodsAfterCoEndDate: number; + organisationUnits: Array; + periodType: DataSet.periodType; + publicAccess: string; + queryMods: QueryModifiers; + renderAsTabs: boolean; + renderHorizontally: boolean; + sections: Array
; + sharing: Sharing; + shortName: string; + skipOffline: boolean; + style: ObjectStyle; + timelyDays: number; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + validCompleteOnly: boolean; + version: number; + workflow: DataApprovalWorkflow; +}; + +export namespace DataSet { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum formType { + DEFAULT = "DEFAULT", + CUSTOM = "CUSTOM", + SECTION = "SECTION", + SECTION_MULTIORG = "SECTION_MULTIORG", + } + + export enum periodType { + BI_MONTHLY = "BiMonthly", + BI_WEEKLY = "BiWeekly", + DAILY = "Daily", + FINANCIAL_APRIL = "FinancialApril", + FINANCIAL_JULY = "FinancialJuly", + FINANCIAL_NOV = "FinancialNov", + FINANCIAL_OCT = "FinancialOct", + MONTHLY = "Monthly", + QUARTERLY = "Quarterly", + SIX_MONTHLY_APRIL = "SixMonthlyApril", + SIX_MONTHLY_NOV = "SixMonthlyNov", + SIX_MONTHLY = "SixMonthly", + TWO_YEARLY = "TwoYearly", + WEEKLY = "Weekly", + WEEKLY_SATURDAY = "WeeklySaturday", + WEEKLY_SUNDAY = "WeeklySunday", + WEEKLY_THURSDAY = "WeeklyThursday", + WEEKLY_WEDNESDAY = "WeeklyWednesday", + YEARLY = "Yearly", + } +} + +export type DataSetCompletionDto = { + attribute: DataValueCategoryDto; + completed: boolean; + dataSet: string; + orgUnit: string; + period: string; +}; + +export type DataSetElement = { + categoryCombo: CategoryCombo; + dataElement: DataElement; + dataSet: DataSet; +}; + +export type DataSetNotificationTemplate = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + dataSetNotificationTrigger: DataSetNotificationTemplate.dataSetNotificationTrigger; + dataSets: Array; + deliveryChannels: Array<"SMS" | "EMAIL" | "HTTP">; + displayMessageTemplate: string; + displayName: string; + displaySubjectTemplate: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + messageTemplate: string; + name: string; + notificationRecipient: DataSetNotificationTemplate.notificationRecipient; + notifyParentOrganisationUnitOnly: boolean; + notifyUsersInHierarchyOnly: boolean; + publicAccess: string; + recipientUserGroup: UserGroup; + relativeScheduledDays: number; + sendStrategy: DataSetNotificationTemplate.sendStrategy; + sharing: Sharing; + subjectTemplate: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace DataSetNotificationTemplate { + export enum dataSetNotificationTrigger { + DATA_SET_COMPLETION = "DATA_SET_COMPLETION", + SCHEDULED_DAYS = "SCHEDULED_DAYS", + } + + export enum notificationRecipient { + ORGANISATION_UNIT_CONTACT = "ORGANISATION_UNIT_CONTACT", + USER_GROUP = "USER_GROUP", + } + + export enum sendStrategy { + COLLECTIVE_SUMMARY = "COLLECTIVE_SUMMARY", + SINGLE_NOTIFICATION = "SINGLE_NOTIFICATION", + } +} + +export type DatastoreEntry = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + key: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + namespace: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + value: string; +}; + +export type DataSummary = { + /** + * keys are class java.lang.Integer + */ + activeUsers: Record; + /** + * keys are class java.lang.Integer + */ + dataValueCount: Record; + /** + * keys are class java.lang.Integer + */ + eventCount: Record; + objectCounts: Record; + system: Dhis2Info; + userInvitations: Record; +}; + +export type DataSynchronizationJobParameters = { + pageSize: number; +}; + +export type DataValue = { + attributeOptionCombo: string; + categoryOptionCombo: string; + comment: string; + created: string; + dataElement: string; + deleted: boolean; + followup: boolean; + lastUpdated: string; + orgUnit: string; + period: string; + storedBy: string; + value: string; +}; + +export type DataValueAuditDto = { + attributeOptionCombo: UID_CategoryOptionCombo; + auditType: DataValueAuditDto.auditType; + categoryOptionCombo: UID_CategoryOptionCombo; + created: string; + dataElement: UID_DataElement; + modifiedBy: string; + orgUnit: UID_OrganisationUnit; + period: string; + value: string; +}; + +export namespace DataValueAuditDto { + export enum auditType { + CREATE = "CREATE", + UPDATE = "UPDATE", + DELETE = "DELETE", + READ = "READ", + SEARCH = "SEARCH", + } +} + +export type DataValueCategoryDto = { + combo: UID_CategoryCombo; + options: Array; +}; + +export type DataValueContextDto = { + audits: Array; + history: Array; +}; + +export type DataValueDto = { + attribute: DataValueCategoryDto; + categoryOptionCombo: UID_CategoryOptionCombo; + comment: string; + created: string; + dataElement: UID_DataElement; + dataSet: UID_DataSet; + followUp: boolean; + force: boolean; + lastUpdated: string; + orgUnit: UID_OrganisationUnit; + period: string; + storedBy: string; + value: string; +}; + +export type DataValueFollowUpRequest = { + attribute: DataValueCategoryDto; + attributeOptionCombo: UID_CategoryOptionCombo; + categoryOptionCombo: UID_CategoryOptionCombo; + dataElement: UID_DataSet; + followup: boolean; + orgUnit: UID_OrganisationUnit; + period: string; +}; + +export type DataValuesDto = { + completeStatus: CompleteStatusDto; + dataValues: Array; + lockStatus: DataValuesDto.lockStatus; + minMaxValues: Array; +}; + +export namespace DataValuesDto { + export enum lockStatus { + LOCKED = "LOCKED", + APPROVED = "APPROVED", + OPEN = "OPEN", + } +} + +export type DataValueSet = { + attributeCategoryOptions: Array; + attributeOptionCombo: string; + categoryOptionComboIdScheme: string; + completeDate: string; + dataElementIdScheme: string; + dataSet: string; + dataSetIdScheme: string; + dataValues: Array; + dryRun: boolean; + idScheme: string; + orgUnit: string; + orgUnitIdScheme: string; + period: string; + strategy: string; +}; + +export type DataValuesFollowUpRequest = { + values: Array; +}; + +export type DateFilterPeriod = { + endBuffer: number; + endDate: string; + period: DateFilterPeriod.period; + startBuffer: number; + startDate: string; + type: DateFilterPeriod.type; +}; + +export namespace DateFilterPeriod { + export enum period { + TODAY = "TODAY", + YESTERDAY = "YESTERDAY", + LAST_3_DAYS = "LAST_3_DAYS", + LAST_7_DAYS = "LAST_7_DAYS", + LAST_14_DAYS = "LAST_14_DAYS", + LAST_30_DAYS = "LAST_30_DAYS", + LAST_60_DAYS = "LAST_60_DAYS", + LAST_90_DAYS = "LAST_90_DAYS", + LAST_180_DAYS = "LAST_180_DAYS", + THIS_MONTH = "THIS_MONTH", + LAST_MONTH = "LAST_MONTH", + THIS_BIMONTH = "THIS_BIMONTH", + LAST_BIMONTH = "LAST_BIMONTH", + THIS_QUARTER = "THIS_QUARTER", + LAST_QUARTER = "LAST_QUARTER", + THIS_SIX_MONTH = "THIS_SIX_MONTH", + LAST_SIX_MONTH = "LAST_SIX_MONTH", + WEEKS_THIS_YEAR = "WEEKS_THIS_YEAR", + MONTHS_THIS_YEAR = "MONTHS_THIS_YEAR", + BIMONTHS_THIS_YEAR = "BIMONTHS_THIS_YEAR", + QUARTERS_THIS_YEAR = "QUARTERS_THIS_YEAR", + THIS_YEAR = "THIS_YEAR", + MONTHS_LAST_YEAR = "MONTHS_LAST_YEAR", + QUARTERS_LAST_YEAR = "QUARTERS_LAST_YEAR", + LAST_YEAR = "LAST_YEAR", + LAST_5_YEARS = "LAST_5_YEARS", + LAST_10_YEARS = "LAST_10_YEARS", + LAST_12_MONTHS = "LAST_12_MONTHS", + LAST_6_MONTHS = "LAST_6_MONTHS", + LAST_3_MONTHS = "LAST_3_MONTHS", + LAST_6_BIMONTHS = "LAST_6_BIMONTHS", + LAST_4_QUARTERS = "LAST_4_QUARTERS", + LAST_2_SIXMONTHS = "LAST_2_SIXMONTHS", + THIS_FINANCIAL_YEAR = "THIS_FINANCIAL_YEAR", + LAST_FINANCIAL_YEAR = "LAST_FINANCIAL_YEAR", + LAST_5_FINANCIAL_YEARS = "LAST_5_FINANCIAL_YEARS", + LAST_10_FINANCIAL_YEARS = "LAST_10_FINANCIAL_YEARS", + THIS_WEEK = "THIS_WEEK", + LAST_WEEK = "LAST_WEEK", + THIS_BIWEEK = "THIS_BIWEEK", + LAST_BIWEEK = "LAST_BIWEEK", + LAST_4_WEEKS = "LAST_4_WEEKS", + LAST_4_BIWEEKS = "LAST_4_BIWEEKS", + LAST_12_WEEKS = "LAST_12_WEEKS", + LAST_52_WEEKS = "LAST_52_WEEKS", + } + + export enum type { + RELATIVE = "RELATIVE", + ABSOLUTE = "ABSOLUTE", + } +} + +export type DeflatedDataValue = { + attributeOptionComboId: number; + categoryOptionComboId: number; + categoryOptionComboName: string; + comment: string; + dataElementId: number; + dataElementName: string; + deleted: boolean; + followup: boolean; + max: number; + min: number; + period: string; + periodId: number; + sourceId: number; + sourceName: string; + sourcePath: string; + value: string; +}; + +export type DeletedObject = { + code: string; + deletedAt: string; + deletedBy: string; + klass: string; + uid: string; +}; + +export type Developer = { + address: string; + email: string; + name: string; + organisation: string; +}; + +export type Dhis2Info = { + buildTime: string; + revision: string; + serverDate: string; + systemId: string; + version: string; +}; + +export type DimensionalObject = { + access: Access; + aggregationType: DimensionalObject.aggregationType; + allItems: boolean; + analyticsType: DimensionalObject.analyticsType; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + dataDimension: boolean; + dataDimensionType: DimensionalObject.dataDimensionType; + description: string; + dimension: string; + dimensionDisplayName: string; + dimensionItemKeywords: DimensionItemKeywords; + dimensionName: string; + dimensionType: DimensionalObject.dimensionType; + displayDescription: string; + displayName: string; + displayShortName: string; + eventRepetition: EventRepetition; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filter: string; + fixed: boolean; + groupUUID: string; + href: string; + id: number; + items: Array; + key: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: boolean; + name: string; + optionSet: OptionSet; + programStage: ProgramStage; + publicAccess: string; + sharing: Sharing; + shortName: string; + translations: Array; + uid: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + valueType: DimensionalObject.valueType; +}; + +export namespace DimensionalObject { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum analyticsType { + AGGREGATE = "AGGREGATE", + EVENT = "EVENT", + } + + export enum dataDimensionType { + DISAGGREGATION = "DISAGGREGATION", + ATTRIBUTE = "ATTRIBUTE", + } + + export enum dimensionType { + DATA_X = "DATA_X", + PROGRAM_DATA_ELEMENT = "PROGRAM_DATA_ELEMENT", + PROGRAM_ATTRIBUTE = "PROGRAM_ATTRIBUTE", + PROGRAM_INDICATOR = "PROGRAM_INDICATOR", + DATA_COLLAPSED = "DATA_COLLAPSED", + CATEGORY_OPTION_COMBO = "CATEGORY_OPTION_COMBO", + ATTRIBUTE_OPTION_COMBO = "ATTRIBUTE_OPTION_COMBO", + PERIOD = "PERIOD", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + CATEGORY_OPTION_GROUP_SET = "CATEGORY_OPTION_GROUP_SET", + DATA_ELEMENT_GROUP_SET = "DATA_ELEMENT_GROUP_SET", + ORGANISATION_UNIT_GROUP_SET = "ORGANISATION_UNIT_GROUP_SET", + ORGANISATION_UNIT_GROUP = "ORGANISATION_UNIT_GROUP", + CATEGORY = "CATEGORY", + OPTION_GROUP_SET = "OPTION_GROUP_SET", + VALIDATION_RULE = "VALIDATION_RULE", + STATIC = "STATIC", + ORGANISATION_UNIT_LEVEL = "ORGANISATION_UNIT_LEVEL", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type DimensionItemKeywords = { + empty: boolean; + keywords: Array; +}; + +export type DisableInactiveUsersJobParameters = { + inactiveMonths: number; + reminderDaysBefore: number; +}; + +export type Document = { + access: Access; + attachment: boolean; + attributeValues: Array; + code: string; + contentType: string; + created: string; + createdBy: User; + displayName: string; + external: boolean; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + url: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type Dxf2EventsEvent_DataValue = { + created: string; + createdByUserInfo: UserInfoSnapshot; + dataElement: string; + lastUpdated: string; + lastUpdatedByUserInfo: UserInfoSnapshot; + providedElsewhere: boolean; + storedBy: string; + value: string; +}; + +export type Dxf2EventsTrackedentity_Attribute = { + attribute: string; + code: string; + created: string; + displayName: string; + lastUpdated: string; + storedBy: string; + value: string; + valueType: Dxf2EventsTrackedentity_Attribute.valueType; +}; + +export namespace Dxf2EventsTrackedentity_Attribute { + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type Dxf2EventsTrackedentity_TrackedEntityInstance = { + attributes: Array; + coordinates: string; + created: string; + createdAtClient: string; + createdByUserInfo: UserInfoSnapshot; + deleted: boolean; + enrollments: Array; + featureType: Dxf2EventsTrackedentity_TrackedEntityInstance.featureType; + geometry: Record; + inactive: boolean; + lastUpdated: string; + lastUpdatedAtClient: string; + lastUpdatedByUserInfo: UserInfoSnapshot; + orgUnit: string; + potentialDuplicate: boolean; + programOwners: Array; + relationships: Array; + storedBy: string; + trackedEntityInstance: string; + trackedEntityType: string; +}; + +export namespace Dxf2EventsTrackedentity_TrackedEntityInstance { + export enum featureType { + NONE = "NONE", + MULTI_POLYGON = "MULTI_POLYGON", + POLYGON = "POLYGON", + POINT = "POINT", + SYMBOL = "SYMBOL", + } +} + +export type Email = { + recipients: Array; + sender: User; + subject: string; + text: string; +}; + +export type Enrollment = { + attributes: Array; + completedBy: string; + completedDate: string; + created: string; + createdAtClient: string; + createdByUserInfo: UserInfoSnapshot; + deleted: boolean; + enrollment: string; + enrollmentDate: string; + events: Array; + followup: boolean; + geometry: Record; + incidentDate: string; + lastUpdated: string; + lastUpdatedAtClient: string; + lastUpdatedByUserInfo: UserInfoSnapshot; + notes: Array; + orgUnit: string; + orgUnitName: string; + program: string; + relationships: Array; + status: Enrollment.status; + storedBy: string; + trackedEntityInstance: string; + trackedEntityType: string; +}; + +export namespace Enrollment { + export enum status { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + } +} + +export type Entity = { + errorReports: Array; + index: number; + trackerType: Entity.trackerType; + uid: string; +}; + +export namespace Entity { + export enum trackerType { + TRACKED_ENTITY = "TRACKED_ENTITY", + ENROLLMENT = "ENROLLMENT", + EVENT = "EVENT", + RELATIONSHIP = "RELATIONSHIP", + } +} + +export type EntityQueryCriteria = { + assignedUserMode: EntityQueryCriteria.assignedUserMode; + assignedUsers: Array; + attributeValueFilters: Array; + displayColumnOrder: Array; + enrollmentCreatedDate: DateFilterPeriod; + enrollmentIncidentDate: DateFilterPeriod; + enrollmentStatus: EntityQueryCriteria.enrollmentStatus; + eventDate: DateFilterPeriod; + eventStatus: EntityQueryCriteria.eventStatus; + followUp: boolean; + lastUpdatedDate: DateFilterPeriod; + order: string; + organisationUnit: string; + ouMode: EntityQueryCriteria.ouMode; + programStage: string; + trackedEntityInstances: Array; + trackedEntityType: string; +}; + +export namespace EntityQueryCriteria { + export enum assignedUserMode { + CURRENT = "CURRENT", + PROVIDED = "PROVIDED", + NONE = "NONE", + ANY = "ANY", + ALL = "ALL", + } + + export enum enrollmentStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + } + + export enum eventStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + VISITED = "VISITED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } + + export enum ouMode { + SELECTED = "SELECTED", + CHILDREN = "CHILDREN", + DESCENDANTS = "DESCENDANTS", + ACCESSIBLE = "ACCESSIBLE", + CAPTURE = "CAPTURE", + ALL = "ALL", + } +} + +export type EntriesResponse = { + entries: Array>>; + pager: WebapiControllerDatastoreController_Pager; +}; + +export type Error = { + errorCode: string; + message: string; + trackerType: string; + uid: string; +}; + +export type ErrorReport = { + errorCode: ErrorReport.errorCode; + errorKlass: string; + errorProperties: Array>; + errorProperty: string; + mainId: string; + mainKlass: string; + message: string; + /** + * The actual type is unknown. + * (Java type was: `class java.lang.Object`) + */ + value: Record; +}; + +export namespace ErrorReport { + export enum errorCode { + E1000 = "E1000", + E1001 = "E1001", + E1002 = "E1002", + E1003 = "E1003", + E1004 = "E1004", + E1005 = "E1005", + E1006 = "E1006", + E1100 = "E1100", + E1101 = "E1101", + E1102 = "E1102", + E1103 = "E1103", + E1104 = "E1104", + E1105 = "E1105", + E1106 = "E1106", + E1107 = "E1107", + E1108 = "E1108", + E1109 = "E1109", + E1110 = "E1110", + E1111 = "E1111", + E1112 = "E1112", + E1113 = "E1113", + E1114 = "E1114", + E1115 = "E1115", + E1116 = "E1116", + E1117 = "E1117", + E1118 = "E1118", + E1119 = "E1119", + E1120 = "E1120", + E1500 = "E1500", + E1501 = "E1501", + E1502 = "E1502", + E1503 = "E1503", + E1504 = "E1504", + E1510 = "E1510", + E1511 = "E1511", + E1512 = "E1512", + E1513 = "E1513", + E1514 = "E1514", + E1515 = "E1515", + E1516 = "E1516", + E1520 = "E1520", + E1521 = "E1521", + E1522 = "E1522", + E1523 = "E1523", + E2000 = "E2000", + E2001 = "E2001", + E2002 = "E2002", + E2003 = "E2003", + E2004 = "E2004", + E2005 = "E2005", + E2006 = "E2006", + E2007 = "E2007", + E2008 = "E2008", + E2009 = "E2009", + E2010 = "E2010", + E2011 = "E2011", + E2012 = "E2012", + E2013 = "E2013", + E2014 = "E2014", + E2015 = "E2015", + E2016 = "E2016", + E2017 = "E2017", + E2018 = "E2018", + E2019 = "E2019", + E2020 = "E2020", + E2021 = "E2021", + E2022 = "E2022", + E2023 = "E2023", + E2024 = "E2024", + E2025 = "E2025", + E2026 = "E2026", + E2027 = "E2027", + E2028 = "E2028", + E2029 = "E2029", + E2030 = "E2030", + E2031 = "E2031", + E2032 = "E2032", + E2033 = "E2033", + E2034 = "E2034", + E2035 = "E2035", + E2036 = "E2036", + E2037 = "E2037", + E2038 = "E2038", + E2039 = "E2039", + E2040 = "E2040", + E2041 = "E2041", + E2042 = "E2042", + E2043 = "E2043", + E2044 = "E2044", + E2200 = "E2200", + E2201 = "E2201", + E2202 = "E2202", + E2203 = "E2203", + E2204 = "E2204", + E2205 = "E2205", + E2206 = "E2206", + E2207 = "E2207", + E2208 = "E2208", + E2300 = "E2300", + E2301 = "E2301", + E3000 = "E3000", + E3001 = "E3001", + E3002 = "E3002", + E3003 = "E3003", + E3004 = "E3004", + E3005 = "E3005", + E3006 = "E3006", + E3008 = "E3008", + E3009 = "E3009", + E3010 = "E3010", + E3011 = "E3011", + E3012 = "E3012", + E3013 = "E3013", + E3014 = "E3014", + E3015 = "E3015", + E3016 = "E3016", + E3017 = "E3017", + E3018 = "E3018", + E3019 = "E3019", + E3020 = "E3020", + E3021 = "E3021", + E3022 = "E3022", + E3023 = "E3023", + E3024 = "E3024", + E3025 = "E3025", + E3026 = "E3026", + E3027 = "E3027", + E3028 = "E3028", + E3029 = "E3029", + E3030 = "E3030", + E3031 = "E3031", + E3032 = "E3032", + E3040 = "E3040", + E4000 = "E4000", + E4001 = "E4001", + E4002 = "E4002", + E4003 = "E4003", + E4004 = "E4004", + E4005 = "E4005", + E4006 = "E4006", + E4007 = "E4007", + E4008 = "E4008", + E4009 = "E4009", + E4010 = "E4010", + E4011 = "E4011", + E4012 = "E4012", + E4013 = "E4013", + E4014 = "E4014", + E4015 = "E4015", + E4016 = "E4016", + E4017 = "E4017", + E4018 = "E4018", + E4019 = "E4019", + E4020 = "E4020", + E4021 = "E4021", + E4022 = "E4022", + E4023 = "E4023", + E4024 = "E4024", + E4025 = "E4025", + E4026 = "E4026", + E4027 = "E4027", + E4028 = "E4028", + E4029 = "E4029", + E4030 = "E4030", + E4031 = "E4031", + E4032 = "E4032", + E4033 = "E4033", + E4034 = "E4034", + E4035 = "E4035", + E4036 = "E4036", + E4037 = "E4037", + E4038 = "E4038", + E4039 = "E4039", + E4040 = "E4040", + E4041 = "E4041", + E4042 = "E4042", + E4043 = "E4043", + E4044 = "E4044", + E4045 = "E4045", + E4046 = "E4046", + E4047 = "E4047", + E4048 = "E4048", + E4049 = "E4049", + E4054 = "E4054", + E4056 = "E4056", + E4055 = "E4055", + E4050 = "E4050", + E4051 = "E4051", + E4052 = "E4052", + E4053 = "E4053", + E4057 = "E4057", + E4060 = "E4060", + E4061 = "E4061", + E4062 = "E4062", + E4063 = "E4063", + E4064 = "E4064", + E4065 = "E4065", + E4066 = "E4066", + E4067 = "E4067", + E4068 = "E4068", + E4300 = "E4300", + E4301 = "E4301", + E4302 = "E4302", + E4303 = "E4303", + E4304 = "E4304", + E4305 = "E4305", + E4306 = "E4306", + E4307 = "E4307", + E4308 = "E4308", + E4309 = "E4309", + E4310 = "E4310", + E4311 = "E4311", + E4312 = "E4312", + E4313 = "E4313", + E4314 = "E4314", + E4315 = "E4315", + E5000 = "E5000", + E5001 = "E5001", + E5002 = "E5002", + E5003 = "E5003", + E5004 = "E5004", + E5005 = "E5005", + E5006 = "E5006", + E5007 = "E5007", + E6000 = "E6000", + E6001 = "E6001", + E6002 = "E6002", + E6003 = "E6003", + E6004 = "E6004", + E6005 = "E6005", + E6006 = "E6006", + E6007 = "E6007", + E6008 = "E6008", + E6009 = "E6009", + E6010 = "E6010", + E6011 = "E6011", + E6012 = "E6012", + E6013 = "E6013", + E6014 = "E6014", + E6015 = "E6015", + E6016 = "E6016", + E6017 = "E6017", + E6018 = "E6018", + E6019 = "E6019", + E6020 = "E6020", + E6021 = "E6021", + E6100 = "E6100", + E6101 = "E6101", + E6200 = "E6200", + E6201 = "E6201", + E6202 = "E6202", + E6203 = "E6203", + E6204 = "E6204", + E6205 = "E6205", + E6206 = "E6206", + E6207 = "E6207", + E6208 = "E6208", + E6209 = "E6209", + E6210 = "E6210", + E6211 = "E6211", + E6300 = "E6300", + E6301 = "E6301", + E6302 = "E6302", + E6303 = "E6303", + E6304 = "E6304", + E6305 = "E6305", + E7000 = "E7000", + E7003 = "E7003", + E7004 = "E7004", + E7005 = "E7005", + E7006 = "E7006", + E7007 = "E7007", + E7010 = "E7010", + E7020 = "E7020", + E7021 = "E7021", + E7022 = "E7022", + E7023 = "E7023", + E7024 = "E7024", + E7100 = "E7100", + E7101 = "E7101", + E7102 = "E7102", + E7103 = "E7103", + E7104 = "E7104", + E7105 = "E7105", + E7106 = "E7106", + E7107 = "E7107", + E7108 = "E7108", + E7109 = "E7109", + E7110 = "E7110", + E7111 = "E7111", + E7112 = "E7112", + E7113 = "E7113", + E7114 = "E7114", + E7115 = "E7115", + E7116 = "E7116", + E7117 = "E7117", + E7118 = "E7118", + E7119 = "E7119", + E7120 = "E7120", + E7121 = "E7121", + E7122 = "E7122", + E7123 = "E7123", + E7124 = "E7124", + E7125 = "E7125", + E7126 = "E7126", + E7127 = "E7127", + E7128 = "E7128", + E7129 = "E7129", + E7130 = "E7130", + E7131 = "E7131", + E7132 = "E7132", + E7133 = "E7133", + E7134 = "E7134", + E7135 = "E7135", + E7200 = "E7200", + E7201 = "E7201", + E7202 = "E7202", + E7203 = "E7203", + E7204 = "E7204", + E7205 = "E7205", + E7206 = "E7206", + E7207 = "E7207", + E7208 = "E7208", + E7209 = "E7209", + E7210 = "E7210", + E7211 = "E7211", + E7212 = "E7212", + E7213 = "E7213", + E7214 = "E7214", + E7215 = "E7215", + E7216 = "E7216", + E7217 = "E7217", + E7218 = "E7218", + E7219 = "E7219", + E7220 = "E7220", + E7221 = "E7221", + E7222 = "E7222", + E7223 = "E7223", + E7224 = "E7224", + E7225 = "E7225", + E7226 = "E7226", + E7227 = "E7227", + E7228 = "E7228", + E7229 = "E7229", + E7230 = "E7230", + E7231 = "E7231", + E7232 = "E7232", + E7234 = "E7234", + E7300 = "E7300", + E7301 = "E7301", + E7400 = "E7400", + E7500 = "E7500", + E7501 = "E7501", + E7502 = "E7502", + E7503 = "E7503", + E7600 = "E7600", + E7601 = "E7601", + E7602 = "E7602", + E7603 = "E7603", + E7604 = "E7604", + E7610 = "E7610", + E7611 = "E7611", + E7612 = "E7612", + E7613 = "E7613", + E7614 = "E7614", + E7615 = "E7615", + E7616 = "E7616", + E7617 = "E7617", + E7618 = "E7618", + E7619 = "E7619", + E7620 = "E7620", + E7621 = "E7621", + E7630 = "E7630", + E7631 = "E7631", + E7632 = "E7632", + E7633 = "E7633", + E7634 = "E7634", + E7635 = "E7635", + E7636 = "E7636", + E7637 = "E7637", + E7638 = "E7638", + E7639 = "E7639", + E7640 = "E7640", + E7641 = "E7641", + E7642 = "E7642", + E7643 = "E7643", + E7644 = "E7644", + E7645 = "E7645", + E7650 = "E7650", + E7651 = "E7651", + E7652 = "E7652", + E7653 = "E7653", + E7700 = "E7700", + E7701 = "E7701", + E7702 = "E7702", + E7703 = "E7703", + E7704 = "E7704", + E7705 = "E7705", + E7706 = "E7706", + E7707 = "E7707", + E7708 = "E7708", + E7709 = "E7709", + E7710 = "E7710", + E7711 = "E7711", + E7712 = "E7712", + } +} + +export type Event = { + assignedUser: string; + assignedUserDisplayName: string; + assignedUserFirstName: string; + assignedUserSurname: string; + assignedUserUsername: string; + attributeCategoryOptions: string; + attributeOptionCombo: string; + completedBy: string; + completedDate: string; + created: string; + createdAtClient: string; + createdByUserInfo: UserInfoSnapshot; + dataValues: Array; + deleted: boolean; + dueDate: string; + enrollment: string; + enrollmentStatus: Event.enrollmentStatus; + event: string; + eventDate: string; + followup: boolean; + geometry: Record; + href: string; + lastUpdated: string; + lastUpdatedAtClient: string; + lastUpdatedByUserInfo: UserInfoSnapshot; + notes: Array; + orgUnit: string; + orgUnitName: string; + program: string; + programStage: string; + programType: Event.programType; + relationships: Array; + status: Event.status; + storedBy: string; + trackedEntityInstance: string; +}; + +export namespace Event { + export enum enrollmentStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + } + + export enum programType { + WITH_REGISTRATION = "WITH_REGISTRATION", + WITHOUT_REGISTRATION = "WITHOUT_REGISTRATION", + } + + export enum status { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + VISITED = "VISITED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } +} + +export type EventDataFilter = { + dataItem: string; + dateFilter: DateFilterPeriod; + eq: string; + ge: string; + gt: string; + in: Array; + le: string; + like: string; + lt: string; +}; + +export type EventFilter = { + assignedUserMode: EventFilter.assignedUserMode; + assignedUsers: Array; + eventCreatedPeriod: FilterPeriod; + eventStatus: EventFilter.eventStatus; + programStage: string; +}; + +export namespace EventFilter { + export enum assignedUserMode { + CURRENT = "CURRENT", + PROVIDED = "PROVIDED", + NONE = "NONE", + ANY = "ANY", + ALL = "ALL", + } + + export enum eventStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + VISITED = "VISITED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } +} + +export type Eventhook_Source = { + fields: string; + path: string; +}; + +export type EventHook = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + disabled: boolean; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + source: Eventhook_Source; + targets: Array; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type EventProgramsDataSynchronizationJobParameters = { + pageSize: number; +}; + +export type EventQueryCriteria = { + assignedUserMode: EventQueryCriteria.assignedUserMode; + assignedUsers: Array; + completedDate: DateFilterPeriod; + dataFilters: Array; + displayColumnOrder: Array; + dueDate: DateFilterPeriod; + eventDate: DateFilterPeriod; + events: Array; + followUp: boolean; + lastUpdatedDate: DateFilterPeriod; + order: string; + organisationUnit: string; + ouMode: EventQueryCriteria.ouMode; + status: EventQueryCriteria.status; +}; + +export namespace EventQueryCriteria { + export enum assignedUserMode { + CURRENT = "CURRENT", + PROVIDED = "PROVIDED", + NONE = "NONE", + ANY = "ANY", + ALL = "ALL", + } + + export enum ouMode { + SELECTED = "SELECTED", + CHILDREN = "CHILDREN", + DESCENDANTS = "DESCENDANTS", + ACCESSIBLE = "ACCESSIBLE", + CAPTURE = "CAPTURE", + ALL = "ALL", + } + + export enum status { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + VISITED = "VISITED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } +} + +export type EventRepetition = { + dimension: string; + indexes: Array; + parent: EventRepetition.parent; +}; + +export namespace EventRepetition { + export enum parent { + COLUMN = "COLUMN", + ROW = "ROW", + FILTER = "FILTER", + } +} + +export type EventRow = { + attributeCategoryOptions: string; + attributes: Array; + dataValues: Array; + deleted: boolean; + dueDate: string; + enrollment: string; + event: string; + eventDate: string; + followup: boolean; + href: string; + notes: Array; + orgUnit: string; + orgUnitName: string; + program: string; + programStage: string; + trackedEntityInstance: string; + trackedEntityInstanceCreated: string; + trackedEntityInstanceInactive: boolean; + trackedEntityInstanceOrgUnit: string; + trackedEntityInstanceOrgUnitName: string; +}; + +export type EventRows = { + eventRows: Array; + pager: Pager; +}; + +export type EventVisualization = { + access: Access; + aggregationType: EventVisualization.aggregationType; + attributeDimensions: Array; + attributeValueDimension: TrackedEntityAttribute; + attributeValues: Array; + baseLineLabel: string; + baseLineValue: number; + categoryDimensions: Array; + categoryOptionGroupSetDimensions: Array; + code: string; + colSubTotals: boolean; + colTotals: boolean; + collapseDataDimensions: boolean; + columnDimensions: Array; + columns: Array; + completedOnly: boolean; + created: string; + createdBy: User; + cumulativeValues: boolean; + dataDimensionItems: Array; + dataElementDimensions: Array; + dataElementGroupSetDimensions: Array; + dataElementValueDimension: DataElement; + dataType: EventVisualization.dataType; + description: string; + digitGroupSeparator: EventVisualization.digitGroupSeparator; + displayBaseLineLabel: string; + displayDensity: EventVisualization.displayDensity; + displayDescription: string; + displayDomainAxisLabel: string; + displayFormName: string; + displayName: string; + displayRangeAxisLabel: string; + displayShortName: string; + displaySubtitle: string; + displayTargetLineLabel: string; + displayTitle: string; + domainAxisLabel: string; + endDate: string; + eventStatus: EventVisualization.eventStatus; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filterDimensions: Array; + filters: Array; + fontSize: EventVisualization.fontSize; + formName: string; + hideEmptyRowItems: EventVisualization.hideEmptyRowItems; + hideEmptyRows: boolean; + hideLegend: boolean; + hideNaData: boolean; + hideSubtitle: boolean; + hideTitle: boolean; + href: string; + id: string; + interpretations: Array; + itemOrganisationUnitGroups: Array; + lastUpdated: string; + lastUpdatedBy: User; + legacy: boolean; + legend: LegendDefinitions; + name: string; + noSpaceBetweenColumns: boolean; + orgUnitField: string; + organisationUnitGroupSetDimensions: Array; + organisationUnitLevels: Array; + organisationUnits: Array; + outputType: EventVisualization.outputType; + parentGraphMap: Record; + percentStackedValues: boolean; + periods: Array; + program: Program; + programIndicatorDimensions: Array; + programStage: ProgramStage; + programStatus: EventVisualization.programStatus; + publicAccess: string; + rangeAxisDecimals: number; + rangeAxisLabel: string; + rangeAxisMaxValue: number; + rangeAxisMinValue: number; + rangeAxisSteps: number; + regressionType: EventVisualization.regressionType; + relativePeriods: RelativePeriods; + repetitions: Array; + rowDimensions: Array; + rowSubTotals: boolean; + rowTotals: boolean; + rows: Array; + sharing: Sharing; + shortName: string; + showData: boolean; + showDimensionLabels: boolean; + showHierarchy: boolean; + simpleDimensions: Array; + sortOrder: number; + startDate: string; + subscribed: boolean; + subscribers: Array; + subtitle: string; + targetLineLabel: string; + targetLineValue: number; + timeField: string; + title: string; + topLimit: number; + translations: Array; + type: EventVisualization.type; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + userOrgUnitType: EventVisualization.userOrgUnitType; + userOrganisationUnit: boolean; + userOrganisationUnitChildren: boolean; + userOrganisationUnitGrandChildren: boolean; + value: Ref_DimensionalItemObject; +}; + +export namespace EventVisualization { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dataType { + AGGREGATED_VALUES = "AGGREGATED_VALUES", + EVENTS = "EVENTS", + } + + export enum digitGroupSeparator { + COMMA = "COMMA", + SPACE = "SPACE", + NONE = "NONE", + } + + export enum displayDensity { + COMFORTABLE = "COMFORTABLE", + NORMAL = "NORMAL", + COMPACT = "COMPACT", + NONE = "NONE", + } + + export enum eventStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + VISITED = "VISITED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } + + export enum fontSize { + LARGE = "LARGE", + NORMAL = "NORMAL", + SMALL = "SMALL", + } + + export enum hideEmptyRowItems { + NONE = "NONE", + BEFORE_FIRST = "BEFORE_FIRST", + AFTER_LAST = "AFTER_LAST", + BEFORE_FIRST_AFTER_LAST = "BEFORE_FIRST_AFTER_LAST", + ALL = "ALL", + } + + export enum outputType { + EVENT = "EVENT", + ENROLLMENT = "ENROLLMENT", + TRACKED_ENTITY_INSTANCE = "TRACKED_ENTITY_INSTANCE", + } + + export enum programStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + } + + export enum regressionType { + NONE = "NONE", + LINEAR = "LINEAR", + POLYNOMIAL = "POLYNOMIAL", + LOESS = "LOESS", + } + + export enum type { + COLUMN = "COLUMN", + STACKED_COLUMN = "STACKED_COLUMN", + BAR = "BAR", + STACKED_BAR = "STACKED_BAR", + LINE = "LINE", + LINE_LIST = "LINE_LIST", + AREA = "AREA", + STACKED_AREA = "STACKED_AREA", + PIE = "PIE", + RADAR = "RADAR", + GAUGE = "GAUGE", + YEAR_OVER_YEAR_LINE = "YEAR_OVER_YEAR_LINE", + YEAR_OVER_YEAR_COLUMN = "YEAR_OVER_YEAR_COLUMN", + SINGLE_VALUE = "SINGLE_VALUE", + PIVOT_TABLE = "PIVOT_TABLE", + SCATTER = "SCATTER", + BUBBLE = "BUBBLE", + } + + export enum userOrgUnitType { + DATA_CAPTURE = "DATA_CAPTURE", + DATA_OUTPUT = "DATA_OUTPUT", + TEI_SEARCH = "TEI_SEARCH", + } +} + +export type ExecutionPlan = { + executionTime: number; + plan: Record; + planningTime: number; + query: string; + timeInMillis: number; +}; + +export type Expression = { + description: string; + displayDescription: string; + expression: string; + missingValueStrategy: Expression.missingValueStrategy; + slidingWindow: boolean; + translations: Array; +}; + +export namespace Expression { + export enum missingValueStrategy { + SKIP_IF_ANY_VALUE_MISSING = "SKIP_IF_ANY_VALUE_MISSING", + SKIP_IF_ALL_VALUES_MISSING = "SKIP_IF_ALL_VALUES_MISSING", + NEVER_SKIP = "NEVER_SKIP", + } +} + +export type ExpressionDimensionItem = { + access: Access; + aggregateExportAttributeOptionCombo: string; + aggregateExportCategoryOptionCombo: string; + aggregationType: ExpressionDimensionItem.aggregationType; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + expression: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + missingValueStrategy: ExpressionDimensionItem.missingValueStrategy; + name: string; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + slidingWindow: boolean; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace ExpressionDimensionItem { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum missingValueStrategy { + SKIP_IF_ANY_VALUE_MISSING = "SKIP_IF_ANY_VALUE_MISSING", + SKIP_IF_ALL_VALUES_MISSING = "SKIP_IF_ALL_VALUES_MISSING", + NEVER_SKIP = "NEVER_SKIP", + } +} + +export type ExternalMapLayer = { + access: Access; + attributeValues: Array; + attribution: string; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + imageFormat: ExternalMapLayer.imageFormat; + lastUpdated: string; + lastUpdatedBy: User; + layers: string; + legendSet: LegendSet; + legendSetUrl: string; + mapLayerPosition: ExternalMapLayer.mapLayerPosition; + mapService: ExternalMapLayer.mapService; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + url: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace ExternalMapLayer { + export enum imageFormat { + PNG = "PNG", + JPG = "JPG", + } + + export enum mapLayerPosition { + BASEMAP = "BASEMAP", + OVERLAY = "OVERLAY", + } + + export enum mapService { + WMS = "WMS", + TMS = "TMS", + XYZ = "XYZ", + VECTOR_STYLE = "VECTOR_STYLE", + } +} + +export type FavoriteStatistics = { + created: string; + id: string; + name: string; + position: number; + views: number; +}; + +export type Field = { + categoryOptionCombo: string; + comment: string; + dataElement: string; + label: string; + optionSet: string; + type: Field.type; + value: string; +}; + +export namespace Field { + export enum type { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type FieldPath = { + exclude: boolean; + fullPath: string; + name: string; + path: Array; + preset: boolean; + property: Property; + root: boolean; + transformer: boolean; + transformers: Array; +}; + +export type FieldPathTransformer = { + name: string; + parameters: Array; +}; + +export type FileResource = { + access: Access; + attributeValues: Array; + code: string; + contentLength: number; + contentMd5: string; + contentType: string; + created: string; + createdBy: User; + displayName: string; + domain: FileResource.domain; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + hasMultipleStorageFiles: boolean; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + storageStatus: FileResource.storageStatus; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace FileResource { + export enum domain { + DATA_VALUE = "DATA_VALUE", + PUSH_ANALYSIS = "PUSH_ANALYSIS", + DOCUMENT = "DOCUMENT", + MESSAGE_ATTACHMENT = "MESSAGE_ATTACHMENT", + USER_AVATAR = "USER_AVATAR", + ORG_UNIT = "ORG_UNIT", + } + + export enum storageStatus { + NONE = "NONE", + PENDING = "PENDING", + FAILED = "FAILED", + STORED = "STORED", + } +} + +export type FileTypeValueOptions = { + allowedContentTypes: Array; + maxFileSize: number; + version: number; +}; + +export type Filter = { + dimension: string; + items: Array; +}; + +export type FilterPeriod = { + periodFrom: number; + periodTo: number; +}; + +export type FollowupAnalysisMetadata = { + coc: Array; + de: Array; + endDate: string; + maxResults: number; + ou: Array; + startDate: string; +}; + +export type FollowupAnalysisResponse = { + followupValues: Array; + metadata: FollowupAnalysisMetadata; +}; + +export type FollowupParams = { + attributeOptionComboId: number; + categoryOptionComboId: number; + dataElementId: number; + followup: boolean; + organisationUnitId: number; + periodId: number; +}; + +export type FollowupValue = { + aoc: string; + aocName: string; + coc: string; + cocName: string; + comment: string; + created: string; + de: string; + deName: string; + lastUpdated: string; + max: number; + min: number; + ou: string; + ouName: string; + ouPath: string; + pe: string; + peEndDate: string; + peName: string; + peStartDate: string; + peType: string; + storedBy: string; + value: string; +}; + +export type FontStyle = { + bold: boolean; + font: FontStyle.font; + fontSize: number; + italic: boolean; + textAlign: FontStyle.textAlign; + textColor: string; + underline: boolean; +}; + +export namespace FontStyle { + export enum font { + ARIAL = "ARIAL", + SANS_SERIF = "SANS_SERIF", + VERDANA = "VERDANA", + ROBOTO = "ROBOTO", + } + + export enum textAlign { + LEFT = "LEFT", + CENTER = "CENTER", + RIGHT = "RIGHT", + } +} + +export type Form = { + categoryCombo: WebapiWebdomainForm_CategoryCombo; + groups: Array; + label: string; + options: Record>; + subtitle: string; +}; + +export type GenericGatewayParameter = { + confidential: boolean; + encode: boolean; + header: boolean; + key: string; + value: string; +}; + +export type GenericHttpGatewayConfig = { + configurationTemplate: string; + contentType: GenericHttpGatewayConfig.contentType; + id: string; + isDefault: boolean; + maxSmsLength: string; + name: string; + parameters: Array; + password: string; + sendUrlParameters: boolean; + uid: string; + urlTemplate: string; + useGet: boolean; + username: string; +}; + +export namespace GenericHttpGatewayConfig { + export enum contentType { + APPLICATION_JSON = "APPLICATION_JSON", + APPLICATION_XML = "APPLICATION_XML", + TEXT_PLAIN = "TEXT_PLAIN", + FORM_URL_ENCODED = "FORM_URL_ENCODED", + } +} + +export type GeoFeature = { + co: string; + code: string; + dimensions: Record; + hcd: boolean; + hcu: boolean; + id: string; + le: number; + na: string; + pg: string; + pi: string; + pn: string; + ty: number; +}; + +export type GistPager = { + nextPage?: string; + page: number; + pageCount?: number; + pageSize: number; + prevPage?: string; + total?: number; +}; + +export type GistPreferences = { + included: GistPreferences.included; + transformation: GistPreferences.transformation; +}; + +export namespace GistPreferences { + export enum included { + FALSE = "FALSE", + TRUE = "TRUE", + AUTO = "AUTO", + } + + export enum transformation { + AUTO = "AUTO", + NONE = "NONE", + IS_EMPTY = "IS_EMPTY", + IS_NOT_EMPTY = "IS_NOT_EMPTY", + SIZE = "SIZE", + MEMBER = "MEMBER", + NOT_MEMBER = "NOT_MEMBER", + IDS = "IDS", + ID_OBJECTS = "ID_OBJECTS", + PLUCK = "PLUCK", + FROM = "FROM", + } +} + +export type GoogleAccessToken = { + access_token: string; + client_id: string; + expires_in: number; +}; + +export type Grid = { + headerWidth: number; + headers: Array; + height: number; + internalMetaData: Record>; + lastDataRow: boolean; + metaColumnIndexes: Array; + metaData: Record>; + metadataHeaders: Array; + performanceMetrics: PerformanceMetrics; + refs: Array; + rows: Array>>; + subtitle: string; + table: string; + title: string; + visibleHeaders: Array; + visibleRows: Array>>; + visibleWidth: number; + width: number; +}; + +export type GridHeader = { + column: string; + hidden: boolean; + legendSet: string; + meta: boolean; + name: string; + optionSet: string; + programStage: string; + repeatableStageParams: string; + stageOffset: number; + type: string; + valueType: GridHeader.valueType; +}; + +export namespace GridHeader { + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type GridResponse = { + listGrid: Grid; + pager: Pager; +}; + +export type Group = { + dataElementCount: number; + description: string; + fields: Array; + label: string; + /** + * keys are class java.lang.Object + */ + metaData: Record>; +}; + +export type HttpBasicAuth = { + password: string; + type: string; + username: string; +}; + +export type I18nLocale = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + locale: string; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type I18nOutput = { + translations: Record; +}; + +export type Icon = { + type: Icon.type; +}; + +export namespace Icon { + export enum type { + DATA_ITEM = "DATA_ITEM", + } +} + +export type IconData = { + description: string; + href: string; + key: string; + keywords: Array; +}; + +export type IdentifiableObject = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: number; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + uid: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type IdentifiableObjects = { + additions: Array; + deletions: Array; + identifiableObjects: Array; +}; + +export type IdObject = { + id: string; + name: string; +}; + +export type IdScheme = { + attribute: boolean; + identifiableProperty: IdScheme.identifiableProperty; + identifiableString: string; + notNull: boolean; + null: boolean; +}; + +export namespace IdScheme { + export enum identifiableProperty { + ID = "ID", + UID = "UID", + UUID = "UUID", + NAME = "NAME", + CODE = "CODE", + ATTRIBUTE = "ATTRIBUTE", + } +} + +export type IdSchemes = { + attributeOptionComboIdScheme: IdScheme; + categoryIdScheme: IdScheme; + categoryOptionComboIdScheme: IdScheme; + categoryOptionIdScheme: IdScheme; + dataElementGroupIdScheme: IdScheme; + dataElementIdScheme: IdScheme; + dataSetIdScheme: IdScheme; + idScheme: IdScheme; + orgUnitGroupIdScheme: IdScheme; + orgUnitIdScheme: IdScheme; + programIdScheme: IdScheme; + programStageIdScheme: IdScheme; + programStageInstanceIdScheme: IdScheme; + trackedEntityAttributeIdScheme: IdScheme; + trackedEntityIdScheme: IdScheme; +}; + +export type ImageResource = { + caption: string; + created: string; + description: string; + id: string; + imageUrl: string; + lastUpdated: string; + logo: boolean; +}; + +export type ImportConflict = { + errorCode: ImportConflict.errorCode; + indexes: Array; + object: string; + objects: Record; + property: string; + value: string; +}; + +export namespace ImportConflict { + export enum errorCode { + E1000 = "E1000", + E1001 = "E1001", + E1002 = "E1002", + E1003 = "E1003", + E1004 = "E1004", + E1005 = "E1005", + E1006 = "E1006", + E1100 = "E1100", + E1101 = "E1101", + E1102 = "E1102", + E1103 = "E1103", + E1104 = "E1104", + E1105 = "E1105", + E1106 = "E1106", + E1107 = "E1107", + E1108 = "E1108", + E1109 = "E1109", + E1110 = "E1110", + E1111 = "E1111", + E1112 = "E1112", + E1113 = "E1113", + E1114 = "E1114", + E1115 = "E1115", + E1116 = "E1116", + E1117 = "E1117", + E1118 = "E1118", + E1119 = "E1119", + E1120 = "E1120", + E1500 = "E1500", + E1501 = "E1501", + E1502 = "E1502", + E1503 = "E1503", + E1504 = "E1504", + E1510 = "E1510", + E1511 = "E1511", + E1512 = "E1512", + E1513 = "E1513", + E1514 = "E1514", + E1515 = "E1515", + E1516 = "E1516", + E1520 = "E1520", + E1521 = "E1521", + E1522 = "E1522", + E1523 = "E1523", + E2000 = "E2000", + E2001 = "E2001", + E2002 = "E2002", + E2003 = "E2003", + E2004 = "E2004", + E2005 = "E2005", + E2006 = "E2006", + E2007 = "E2007", + E2008 = "E2008", + E2009 = "E2009", + E2010 = "E2010", + E2011 = "E2011", + E2012 = "E2012", + E2013 = "E2013", + E2014 = "E2014", + E2015 = "E2015", + E2016 = "E2016", + E2017 = "E2017", + E2018 = "E2018", + E2019 = "E2019", + E2020 = "E2020", + E2021 = "E2021", + E2022 = "E2022", + E2023 = "E2023", + E2024 = "E2024", + E2025 = "E2025", + E2026 = "E2026", + E2027 = "E2027", + E2028 = "E2028", + E2029 = "E2029", + E2030 = "E2030", + E2031 = "E2031", + E2032 = "E2032", + E2033 = "E2033", + E2034 = "E2034", + E2035 = "E2035", + E2036 = "E2036", + E2037 = "E2037", + E2038 = "E2038", + E2039 = "E2039", + E2040 = "E2040", + E2041 = "E2041", + E2042 = "E2042", + E2043 = "E2043", + E2044 = "E2044", + E2200 = "E2200", + E2201 = "E2201", + E2202 = "E2202", + E2203 = "E2203", + E2204 = "E2204", + E2205 = "E2205", + E2206 = "E2206", + E2207 = "E2207", + E2208 = "E2208", + E2300 = "E2300", + E2301 = "E2301", + E3000 = "E3000", + E3001 = "E3001", + E3002 = "E3002", + E3003 = "E3003", + E3004 = "E3004", + E3005 = "E3005", + E3006 = "E3006", + E3008 = "E3008", + E3009 = "E3009", + E3010 = "E3010", + E3011 = "E3011", + E3012 = "E3012", + E3013 = "E3013", + E3014 = "E3014", + E3015 = "E3015", + E3016 = "E3016", + E3017 = "E3017", + E3018 = "E3018", + E3019 = "E3019", + E3020 = "E3020", + E3021 = "E3021", + E3022 = "E3022", + E3023 = "E3023", + E3024 = "E3024", + E3025 = "E3025", + E3026 = "E3026", + E3027 = "E3027", + E3028 = "E3028", + E3029 = "E3029", + E3030 = "E3030", + E3031 = "E3031", + E3032 = "E3032", + E3040 = "E3040", + E4000 = "E4000", + E4001 = "E4001", + E4002 = "E4002", + E4003 = "E4003", + E4004 = "E4004", + E4005 = "E4005", + E4006 = "E4006", + E4007 = "E4007", + E4008 = "E4008", + E4009 = "E4009", + E4010 = "E4010", + E4011 = "E4011", + E4012 = "E4012", + E4013 = "E4013", + E4014 = "E4014", + E4015 = "E4015", + E4016 = "E4016", + E4017 = "E4017", + E4018 = "E4018", + E4019 = "E4019", + E4020 = "E4020", + E4021 = "E4021", + E4022 = "E4022", + E4023 = "E4023", + E4024 = "E4024", + E4025 = "E4025", + E4026 = "E4026", + E4027 = "E4027", + E4028 = "E4028", + E4029 = "E4029", + E4030 = "E4030", + E4031 = "E4031", + E4032 = "E4032", + E4033 = "E4033", + E4034 = "E4034", + E4035 = "E4035", + E4036 = "E4036", + E4037 = "E4037", + E4038 = "E4038", + E4039 = "E4039", + E4040 = "E4040", + E4041 = "E4041", + E4042 = "E4042", + E4043 = "E4043", + E4044 = "E4044", + E4045 = "E4045", + E4046 = "E4046", + E4047 = "E4047", + E4048 = "E4048", + E4049 = "E4049", + E4054 = "E4054", + E4056 = "E4056", + E4055 = "E4055", + E4050 = "E4050", + E4051 = "E4051", + E4052 = "E4052", + E4053 = "E4053", + E4057 = "E4057", + E4060 = "E4060", + E4061 = "E4061", + E4062 = "E4062", + E4063 = "E4063", + E4064 = "E4064", + E4065 = "E4065", + E4066 = "E4066", + E4067 = "E4067", + E4068 = "E4068", + E4300 = "E4300", + E4301 = "E4301", + E4302 = "E4302", + E4303 = "E4303", + E4304 = "E4304", + E4305 = "E4305", + E4306 = "E4306", + E4307 = "E4307", + E4308 = "E4308", + E4309 = "E4309", + E4310 = "E4310", + E4311 = "E4311", + E4312 = "E4312", + E4313 = "E4313", + E4314 = "E4314", + E4315 = "E4315", + E5000 = "E5000", + E5001 = "E5001", + E5002 = "E5002", + E5003 = "E5003", + E5004 = "E5004", + E5005 = "E5005", + E5006 = "E5006", + E5007 = "E5007", + E6000 = "E6000", + E6001 = "E6001", + E6002 = "E6002", + E6003 = "E6003", + E6004 = "E6004", + E6005 = "E6005", + E6006 = "E6006", + E6007 = "E6007", + E6008 = "E6008", + E6009 = "E6009", + E6010 = "E6010", + E6011 = "E6011", + E6012 = "E6012", + E6013 = "E6013", + E6014 = "E6014", + E6015 = "E6015", + E6016 = "E6016", + E6017 = "E6017", + E6018 = "E6018", + E6019 = "E6019", + E6020 = "E6020", + E6021 = "E6021", + E6100 = "E6100", + E6101 = "E6101", + E6200 = "E6200", + E6201 = "E6201", + E6202 = "E6202", + E6203 = "E6203", + E6204 = "E6204", + E6205 = "E6205", + E6206 = "E6206", + E6207 = "E6207", + E6208 = "E6208", + E6209 = "E6209", + E6210 = "E6210", + E6211 = "E6211", + E6300 = "E6300", + E6301 = "E6301", + E6302 = "E6302", + E6303 = "E6303", + E6304 = "E6304", + E6305 = "E6305", + E7000 = "E7000", + E7003 = "E7003", + E7004 = "E7004", + E7005 = "E7005", + E7006 = "E7006", + E7007 = "E7007", + E7010 = "E7010", + E7020 = "E7020", + E7021 = "E7021", + E7022 = "E7022", + E7023 = "E7023", + E7024 = "E7024", + E7100 = "E7100", + E7101 = "E7101", + E7102 = "E7102", + E7103 = "E7103", + E7104 = "E7104", + E7105 = "E7105", + E7106 = "E7106", + E7107 = "E7107", + E7108 = "E7108", + E7109 = "E7109", + E7110 = "E7110", + E7111 = "E7111", + E7112 = "E7112", + E7113 = "E7113", + E7114 = "E7114", + E7115 = "E7115", + E7116 = "E7116", + E7117 = "E7117", + E7118 = "E7118", + E7119 = "E7119", + E7120 = "E7120", + E7121 = "E7121", + E7122 = "E7122", + E7123 = "E7123", + E7124 = "E7124", + E7125 = "E7125", + E7126 = "E7126", + E7127 = "E7127", + E7128 = "E7128", + E7129 = "E7129", + E7130 = "E7130", + E7131 = "E7131", + E7132 = "E7132", + E7133 = "E7133", + E7134 = "E7134", + E7135 = "E7135", + E7200 = "E7200", + E7201 = "E7201", + E7202 = "E7202", + E7203 = "E7203", + E7204 = "E7204", + E7205 = "E7205", + E7206 = "E7206", + E7207 = "E7207", + E7208 = "E7208", + E7209 = "E7209", + E7210 = "E7210", + E7211 = "E7211", + E7212 = "E7212", + E7213 = "E7213", + E7214 = "E7214", + E7215 = "E7215", + E7216 = "E7216", + E7217 = "E7217", + E7218 = "E7218", + E7219 = "E7219", + E7220 = "E7220", + E7221 = "E7221", + E7222 = "E7222", + E7223 = "E7223", + E7224 = "E7224", + E7225 = "E7225", + E7226 = "E7226", + E7227 = "E7227", + E7228 = "E7228", + E7229 = "E7229", + E7230 = "E7230", + E7231 = "E7231", + E7232 = "E7232", + E7234 = "E7234", + E7300 = "E7300", + E7301 = "E7301", + E7400 = "E7400", + E7500 = "E7500", + E7501 = "E7501", + E7502 = "E7502", + E7503 = "E7503", + E7600 = "E7600", + E7601 = "E7601", + E7602 = "E7602", + E7603 = "E7603", + E7604 = "E7604", + E7610 = "E7610", + E7611 = "E7611", + E7612 = "E7612", + E7613 = "E7613", + E7614 = "E7614", + E7615 = "E7615", + E7616 = "E7616", + E7617 = "E7617", + E7618 = "E7618", + E7619 = "E7619", + E7620 = "E7620", + E7621 = "E7621", + E7630 = "E7630", + E7631 = "E7631", + E7632 = "E7632", + E7633 = "E7633", + E7634 = "E7634", + E7635 = "E7635", + E7636 = "E7636", + E7637 = "E7637", + E7638 = "E7638", + E7639 = "E7639", + E7640 = "E7640", + E7641 = "E7641", + E7642 = "E7642", + E7643 = "E7643", + E7644 = "E7644", + E7645 = "E7645", + E7650 = "E7650", + E7651 = "E7651", + E7652 = "E7652", + E7653 = "E7653", + E7700 = "E7700", + E7701 = "E7701", + E7702 = "E7702", + E7703 = "E7703", + E7704 = "E7704", + E7705 = "E7705", + E7706 = "E7706", + E7707 = "E7707", + E7708 = "E7708", + E7709 = "E7709", + E7710 = "E7710", + E7711 = "E7711", + E7712 = "E7712", + } +} + +export type ImportConflicts = { + conflictCount: number; + conflicts: Array; + conflictsDescription: string; + totalConflictOccurrenceCount: number; +}; + +export type ImportCount = { + deleted: number; + ignored: number; + imported: number; + updated: number; +}; + +export type ImportOptions = { + async: boolean; + dataSet: string; + datasetAllowsPeriods: boolean; + dryRun: boolean; + filename: string; + firstRowIsHeader: boolean; + force: boolean; + idSchemes: IdSchemes; + ignoreEmptyCollection: boolean; + importStrategy: ImportOptions.importStrategy; + mergeDataValues: boolean; + mergeMode: ImportOptions.mergeMode; + notificationLevel: ImportOptions.notificationLevel; + preheatCache: boolean; + reportMode: ImportOptions.reportMode; + requireAttributeOptionCombo: boolean; + requireCategoryOptionCombo: boolean; + sharing: boolean; + skipAudit: boolean; + skipCache: boolean; + skipExistingCheck: boolean; + skipLastUpdated: boolean; + skipNotifications: boolean; + skipPatternValidation: boolean; + strictAttributeOptionCombos: boolean; + strictCategoryOptionCombos: boolean; + strictDataElements: boolean; + strictDataSetApproval: boolean; + strictDataSetInputPeriods: boolean; + strictDataSetLocking: boolean; + strictOrganisationUnits: boolean; + strictPeriods: boolean; +}; + +export namespace ImportOptions { + export enum importStrategy { + CREATE = "CREATE", + UPDATE = "UPDATE", + CREATE_AND_UPDATE = "CREATE_AND_UPDATE", + DELETE = "DELETE", + SYNC = "SYNC", + NEW_AND_UPDATES = "NEW_AND_UPDATES", + NEW = "NEW", + UPDATES = "UPDATES", + DELETES = "DELETES", + } + + export enum mergeMode { + MERGE_ALWAYS = "MERGE_ALWAYS", + MERGE_IF_NOT_NULL = "MERGE_IF_NOT_NULL", + MERGE = "MERGE", + REPLACE = "REPLACE", + NONE = "NONE", + } + + export enum notificationLevel { + OFF = "OFF", + DEBUG = "DEBUG", + LOOP = "LOOP", + INFO = "INFO", + WARN = "WARN", + ERROR = "ERROR", + } + + export enum reportMode { + FULL = "FULL", + ERRORS = "ERRORS", + ERRORS_NOT_OWNER = "ERRORS_NOT_OWNER", + DEBUG = "DEBUG", + } +} + +export type ImportReport = { + importParams: MetadataImportParams; + stats: Stats; + status: ImportReport.status; + typeReports: Array; +}; + +export namespace ImportReport { + export enum status { + OK = "OK", + WARNING = "WARNING", + ERROR = "ERROR", + } +} + +export type ImportSummaries = { + deleted: number; + ignored: number; + importOptions: ImportOptions; + importSummaries: Array; + imported: number; + responseType: string; + status: ImportSummaries.status; + total: number; + updated: number; +}; + +export namespace ImportSummaries { + export enum status { + SUCCESS = "SUCCESS", + WARNING = "WARNING", + ERROR = "ERROR", + } +} + +export type ImportSummary = { + conflicts: Array; + dataSetComplete: string; + description: string; + enrollments: ImportSummaries; + events: ImportSummaries; + href: string; + importCount: ImportCount; + importOptions: ImportOptions; + reference: string; + relationships: ImportSummaries; + responseType: string; + status: ImportSummary.status; +}; + +export namespace ImportSummary { + export enum status { + SUCCESS = "SUCCESS", + WARNING = "WARNING", + ERROR = "ERROR", + } +} + +export type IncomingSms = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + gatewayid: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + originator: string; + publicAccess: string; + receiveddate: string; + sentdate: string; + sharing: Sharing; + smsencoding: IncomingSms.smsencoding; + smsstatus: IncomingSms.smsstatus; + text: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace IncomingSms { + export enum smsencoding { + ENC7BIT = "ENC7BIT", + ENC8BIT = "ENC8BIT", + ENCUCS2 = "ENCUCS2", + ENCCUSTOM = "ENCCUSTOM", + } + + export enum smsstatus { + INCOMING = "INCOMING", + PROCESSING = "PROCESSING", + UNHANDLED = "UNHANDLED", + FAILED = "FAILED", + PROCESSED = "PROCESSED", + SENT = "SENT", + } +} + +export type IndexResource = { + displayName: string; + href: string; + plural: string; + singular: string; +}; + +export type IndexResources = { + resources: Array; +}; + +export type Indicator = { + access: Access; + aggregateExportAttributeOptionCombo: string; + aggregateExportCategoryOptionCombo: string; + aggregationType: Indicator.aggregationType; + annualized: boolean; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + dataSets: Array; + decimals: number; + denominator: string; + denominatorDescription: string; + description: string; + dimensionItem: string; + displayDenominatorDescription: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayNumeratorDescription: string; + displayShortName: string; + explodedDenominator: string; + explodedNumerator: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + indicatorGroups: Array; + indicatorType: IndicatorType; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + numerator: string; + numeratorDescription: string; + publicAccess: string; + queryMods: QueryModifiers; + sharing: Sharing; + shortName: string; + style: ObjectStyle; + translations: Array; + url: string; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace Indicator { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } +} + +export type IndicatorGroup = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + groupSets: Array; + href: string; + id: string; + indicatorGroupSet: IndicatorGroupSet; + indicators: Array; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type IndicatorGroupSet = { + access: Access; + attributeValues: Array; + code: string; + compulsory: boolean; + created: string; + createdBy: User; + description: string; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + indicatorGroups: Array; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + shortName: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type IndicatorType = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + factor: number; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + number: boolean; + publicAccess: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type Interpretation = { + access: Access; + attributeValues: Array; + code: string; + comments: Array; + created: string; + createdBy: User; + dataSet: DataSet; + displayName: string; + eventChart: Ref_EventChart; + eventReport: Ref_EventReport; + eventVisualization: EventVisualization; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + likedBy: Array; + likes: number; + map: Map; + mentions: Array; + organisationUnit: OrganisationUnit; + period: string; + publicAccess: string; + sharing: Sharing; + text: string; + translations: Array; + type: Interpretation.type; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + visualization: Visualization; +}; + +export namespace Interpretation { + export enum type { + VISUALIZATION = "VISUALIZATION", + EVENT_VISUALIZATION = "EVENT_VISUALIZATION", + MAP = "MAP", + EVENT_REPORT = "EVENT_REPORT", + EVENT_CHART = "EVENT_CHART", + DATASET_REPORT = "DATASET_REPORT", + } +} + +export type IpAllowedList = { + allowedIps: Array; + type: string; +}; + +export type Item = { + complete: boolean; + completedTime: string; + description: string; + duration: number; + error: string; + onFailure: Item.onFailure; + status: Item.status; + summary: string; +}; + +export namespace Item { + export enum onFailure { + PARENT = "PARENT", + FAIL = "FAIL", + SKIP_STAGE = "SKIP_STAGE", + SKIP_ITEM = "SKIP_ITEM", + SKIP_ITEM_OUTLIER = "SKIP_ITEM_OUTLIER", + } + + export enum status { + RUNNING = "RUNNING", + SUCCESS = "SUCCESS", + ERROR = "ERROR", + CANCELLED = "CANCELLED", + } +} + +export type ItemConfig = { + insertHeight: number; + insertPosition: ItemConfig.insertPosition; +}; + +export namespace ItemConfig { + export enum insertPosition { + START = "START", + END = "END", + } +} + +export type JmsTarget = { + address: string; + brokerUrl: string; + clientId: string; + groupId: string; + password: string; + type: string; + useQueue: boolean; + username: string; +}; + +export type JobConfiguration = { + access: Access; + attributeValues: Array; + code: string; + configurable: boolean; + created: string; + createdBy: User; + cronExpression: string; + delay: number; + displayName: string; + enabled: boolean; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + jobParameters: + | AnalyticsJobParameters + | ContinuousAnalyticsJobParameters + | MonitoringJobParameters + | PredictorJobParameters + | PushAnalysisJobParameters + | SmsJobParameters + | MetadataSyncJobParameters + | EventProgramsDataSynchronizationJobParameters + | TrackerProgramsDataSynchronizationJobParameters + | DataSynchronizationJobParameters + | DisableInactiveUsersJobParameters + | TrackerTrigramIndexJobParameters + | DataIntegrityJobParameters + | AggregateDataExchangeJobParameters + | SqlViewUpdateParameters + | TestJobParameters; + jobStatus: JobConfiguration.jobStatus; + jobType: JobConfiguration.jobType; + lastExecuted: string; + lastExecutedStatus: JobConfiguration.lastExecutedStatus; + lastRuntimeExecution: string; + lastUpdated: string; + lastUpdatedBy: User; + leaderOnlyJob: boolean; + name: string; + nextExecutionTime: string; + publicAccess: string; + schedulingType: JobConfiguration.schedulingType; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + userUid: string; +}; + +export namespace JobConfiguration { + export enum jobStatus { + RUNNING = "RUNNING", + COMPLETED = "COMPLETED", + STOPPED = "STOPPED", + SCHEDULED = "SCHEDULED", + DISABLED = "DISABLED", + FAILED = "FAILED", + NOT_STARTED = "NOT_STARTED", + } + + export enum jobType { + DATA_STATISTICS = "DATA_STATISTICS", + DATA_INTEGRITY = "DATA_INTEGRITY", + RESOURCE_TABLE = "RESOURCE_TABLE", + ANALYTICS_TABLE = "ANALYTICS_TABLE", + CONTINUOUS_ANALYTICS_TABLE = "CONTINUOUS_ANALYTICS_TABLE", + DATA_SYNC = "DATA_SYNC", + TRACKER_PROGRAMS_DATA_SYNC = "TRACKER_PROGRAMS_DATA_SYNC", + EVENT_PROGRAMS_DATA_SYNC = "EVENT_PROGRAMS_DATA_SYNC", + FILE_RESOURCE_CLEANUP = "FILE_RESOURCE_CLEANUP", + IMAGE_PROCESSING = "IMAGE_PROCESSING", + META_DATA_SYNC = "META_DATA_SYNC", + AGGREGATE_DATA_EXCHANGE = "AGGREGATE_DATA_EXCHANGE", + SMS_SEND = "SMS_SEND", + SEND_SCHEDULED_MESSAGE = "SEND_SCHEDULED_MESSAGE", + PROGRAM_NOTIFICATIONS = "PROGRAM_NOTIFICATIONS", + VALIDATION_RESULTS_NOTIFICATION = "VALIDATION_RESULTS_NOTIFICATION", + CREDENTIALS_EXPIRY_ALERT = "CREDENTIALS_EXPIRY_ALERT", + MONITORING = "MONITORING", + PUSH_ANALYSIS = "PUSH_ANALYSIS", + TRACKER_SEARCH_OPTIMIZATION = "TRACKER_SEARCH_OPTIMIZATION", + PREDICTOR = "PREDICTOR", + DATA_SET_NOTIFICATION = "DATA_SET_NOTIFICATION", + REMOVE_USED_OR_EXPIRED_RESERVED_VALUES = "REMOVE_USED_OR_EXPIRED_RESERVED_VALUES", + TRACKER_IMPORT_JOB = "TRACKER_IMPORT_JOB", + TRACKER_IMPORT_NOTIFICATION_JOB = "TRACKER_IMPORT_NOTIFICATION_JOB", + TRACKER_IMPORT_RULE_ENGINE_JOB = "TRACKER_IMPORT_RULE_ENGINE_JOB", + MATERIALIZED_SQL_VIEW_UPDATE = "MATERIALIZED_SQL_VIEW_UPDATE", + LEADER_ELECTION = "LEADER_ELECTION", + LEADER_RENEWAL = "LEADER_RENEWAL", + COMPLETE_DATA_SET_REGISTRATION_IMPORT = "COMPLETE_DATA_SET_REGISTRATION_IMPORT", + DATAVALUE_IMPORT_INTERNAL = "DATAVALUE_IMPORT_INTERNAL", + METADATA_IMPORT = "METADATA_IMPORT", + DATAVALUE_IMPORT = "DATAVALUE_IMPORT", + GEOJSON_IMPORT = "GEOJSON_IMPORT", + EVENT_IMPORT = "EVENT_IMPORT", + ENROLLMENT_IMPORT = "ENROLLMENT_IMPORT", + TEI_IMPORT = "TEI_IMPORT", + DISABLE_INACTIVE_USERS = "DISABLE_INACTIVE_USERS", + ACCOUNT_EXPIRY_ALERT = "ACCOUNT_EXPIRY_ALERT", + SYSTEM_VERSION_UPDATE_CHECK = "SYSTEM_VERSION_UPDATE_CHECK", + TEST = "TEST", + MOCK = "MOCK", + GML_IMPORT = "GML_IMPORT", + ANALYTICSTABLE_UPDATE = "ANALYTICSTABLE_UPDATE", + PROGRAM_DATA_SYNC = "PROGRAM_DATA_SYNC", + } + + export enum lastExecutedStatus { + RUNNING = "RUNNING", + COMPLETED = "COMPLETED", + STOPPED = "STOPPED", + SCHEDULED = "SCHEDULED", + DISABLED = "DISABLED", + FAILED = "FAILED", + NOT_STARTED = "NOT_STARTED", + } + + export enum schedulingType { + CRON = "CRON", + FIXED_DELAY = "FIXED_DELAY", + } +} + +export type JobTypeInfo = { + jobParameters: Array; + jobType: JobTypeInfo.jobType; + name: string; + schedulingType: JobTypeInfo.schedulingType; +}; + +export namespace JobTypeInfo { + export enum jobType { + DATA_STATISTICS = "DATA_STATISTICS", + DATA_INTEGRITY = "DATA_INTEGRITY", + RESOURCE_TABLE = "RESOURCE_TABLE", + ANALYTICS_TABLE = "ANALYTICS_TABLE", + CONTINUOUS_ANALYTICS_TABLE = "CONTINUOUS_ANALYTICS_TABLE", + DATA_SYNC = "DATA_SYNC", + TRACKER_PROGRAMS_DATA_SYNC = "TRACKER_PROGRAMS_DATA_SYNC", + EVENT_PROGRAMS_DATA_SYNC = "EVENT_PROGRAMS_DATA_SYNC", + FILE_RESOURCE_CLEANUP = "FILE_RESOURCE_CLEANUP", + IMAGE_PROCESSING = "IMAGE_PROCESSING", + META_DATA_SYNC = "META_DATA_SYNC", + AGGREGATE_DATA_EXCHANGE = "AGGREGATE_DATA_EXCHANGE", + SMS_SEND = "SMS_SEND", + SEND_SCHEDULED_MESSAGE = "SEND_SCHEDULED_MESSAGE", + PROGRAM_NOTIFICATIONS = "PROGRAM_NOTIFICATIONS", + VALIDATION_RESULTS_NOTIFICATION = "VALIDATION_RESULTS_NOTIFICATION", + CREDENTIALS_EXPIRY_ALERT = "CREDENTIALS_EXPIRY_ALERT", + MONITORING = "MONITORING", + PUSH_ANALYSIS = "PUSH_ANALYSIS", + TRACKER_SEARCH_OPTIMIZATION = "TRACKER_SEARCH_OPTIMIZATION", + PREDICTOR = "PREDICTOR", + DATA_SET_NOTIFICATION = "DATA_SET_NOTIFICATION", + REMOVE_USED_OR_EXPIRED_RESERVED_VALUES = "REMOVE_USED_OR_EXPIRED_RESERVED_VALUES", + TRACKER_IMPORT_JOB = "TRACKER_IMPORT_JOB", + TRACKER_IMPORT_NOTIFICATION_JOB = "TRACKER_IMPORT_NOTIFICATION_JOB", + TRACKER_IMPORT_RULE_ENGINE_JOB = "TRACKER_IMPORT_RULE_ENGINE_JOB", + MATERIALIZED_SQL_VIEW_UPDATE = "MATERIALIZED_SQL_VIEW_UPDATE", + LEADER_ELECTION = "LEADER_ELECTION", + LEADER_RENEWAL = "LEADER_RENEWAL", + COMPLETE_DATA_SET_REGISTRATION_IMPORT = "COMPLETE_DATA_SET_REGISTRATION_IMPORT", + DATAVALUE_IMPORT_INTERNAL = "DATAVALUE_IMPORT_INTERNAL", + METADATA_IMPORT = "METADATA_IMPORT", + DATAVALUE_IMPORT = "DATAVALUE_IMPORT", + GEOJSON_IMPORT = "GEOJSON_IMPORT", + EVENT_IMPORT = "EVENT_IMPORT", + ENROLLMENT_IMPORT = "ENROLLMENT_IMPORT", + TEI_IMPORT = "TEI_IMPORT", + DISABLE_INACTIVE_USERS = "DISABLE_INACTIVE_USERS", + ACCOUNT_EXPIRY_ALERT = "ACCOUNT_EXPIRY_ALERT", + SYSTEM_VERSION_UPDATE_CHECK = "SYSTEM_VERSION_UPDATE_CHECK", + TEST = "TEST", + MOCK = "MOCK", + GML_IMPORT = "GML_IMPORT", + ANALYTICSTABLE_UPDATE = "ANALYTICSTABLE_UPDATE", + PROGRAM_DATA_SYNC = "PROGRAM_DATA_SYNC", + } + + export enum schedulingType { + CRON = "CRON", + FIXED_DELAY = "FIXED_DELAY", + } +} + +export type JobTypes = { + jobTypes: Array; +}; + +export type JsonPatch = { + operations: Array< + AddOperation | RemoveOperation | RemoveByIdOperation | ReplaceOperation + >; +}; + +export type JsonRoot = { + properties: Record>; +}; + +export type KafkaTarget = { + bootstrapServers: string; + clientId: string; + password: string; + topic: string; + type: string; + username: string; +}; + +export type Keyword = { + key: string; + metadataItem: MetadataItem; +}; + +export type Layout = { + columns: Array; + spacing: Spacing; +}; + +export type LeaderNodeInfo = { + currentNodeId: string; + currentNodeUuid: string; + leader: boolean; + leaderNodeId: string; + leaderNodeUuid: string; +}; + +export type LegendDefinitions = { + set: LegendSet; + showKey: boolean; + strategy: LegendDefinitions.strategy; + style: LegendDefinitions.style; +}; + +export namespace LegendDefinitions { + export enum strategy { + FIXED = "FIXED", + BY_DATA_ITEM = "BY_DATA_ITEM", + } + + export enum style { + FILL = "FILL", + TEXT = "TEXT", + } +} + +export type LegendSet = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legends: Array; + name: string; + publicAccess: string; + sharing: Sharing; + symbolizer: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type Line = { + title: StyledObject; + value: number; +}; + +export type LockExceptionDto = { + dataSet: string; + orgUnit: string; + period: string; +}; + +export type LockExceptionsDto = { + lockExceptions: Array; +}; + +export type Map = { + access: Access; + attributeValues: Array; + basemap: string; + code: string; + created: string; + createdBy: User; + description: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + interpretations: Array; + lastUpdated: string; + lastUpdatedBy: User; + latitude: number; + longitude: number; + mapViews: Array; + name: string; + publicAccess: string; + sharing: Sharing; + shortName: string; + subscribed: boolean; + subscribers: Array; + title: string; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + zoom: number; +}; + +export type MapView = { + access: Access; + aggregationType: MapView.aggregationType; + areaRadius: number; + attributeDimensions: Array; + attributeValues: Array; + categoryDimensions: Array; + categoryOptionGroupSetDimensions: Array; + classes: number; + code: string; + colorHigh: string; + colorLow: string; + colorScale: string; + columnDimensions: Array; + columns: Array; + completedOnly: boolean; + config: string; + created: string; + createdBy: User; + dataDimensionItems: Array; + dataElementDimensions: Array; + dataElementGroupSetDimensions: Array; + description: string; + digitGroupSeparator: MapView.digitGroupSeparator; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + displaySubtitle: string; + displayTitle: string; + endDate: string; + eventClustering: boolean; + eventCoordinateField: string; + eventPointColor: string; + eventPointRadius: number; + eventStatus: MapView.eventStatus; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + filterDimensions: Array; + filters: Array; + followUp: boolean; + formName: string; + hidden: boolean; + hideSubtitle: boolean; + hideTitle: boolean; + href: string; + id: string; + interpretations: Array; + itemOrganisationUnitGroups: Array; + labelFontColor: string; + labelFontSize: string; + labelFontStyle: string; + labelFontWeight: string; + labelTemplate: string; + labels: boolean; + lastUpdated: string; + lastUpdatedBy: User; + layer: string; + legendSet: LegendSet; + method: number; + noDataColor: string; + opacity: number; + orgUnitField: string; + orgUnitFieldDisplayName: string; + organisationUnitColor: string; + organisationUnitGroupSet: OrganisationUnitGroupSet; + organisationUnitGroupSetDimensions: Array; + organisationUnitLevels: Array; + organisationUnitSelectionMode: MapView.organisationUnitSelectionMode; + organisationUnits: Array; + parentGraph: string; + parentGraphMap: Record; + parentLevel: number; + periods: Array; + program: Program; + programIndicatorDimensions: Array; + programStage: ProgramStage; + programStatus: MapView.programStatus; + publicAccess: string; + radiusHigh: number; + radiusLow: number; + relativePeriods: RelativePeriods; + renderingStrategy: MapView.renderingStrategy; + rows: Array; + sharing: Sharing; + shortName: string; + sortOrder: number; + startDate: string; + /** + * The actual type is unknown. + * (Java type was: `class java.lang.Object`) + */ + styleDataItem: Record; + subscribed: boolean; + subscribers: Array; + subtitle: string; + thematicMapType: MapView.thematicMapType; + timeField: string; + title: string; + topLimit: number; + trackedEntityType: TrackedEntityType; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; + userOrgUnitType: MapView.userOrgUnitType; + userOrganisationUnit: boolean; + userOrganisationUnitChildren: boolean; + userOrganisationUnitGrandChildren: boolean; +}; + +export namespace MapView { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum digitGroupSeparator { + COMMA = "COMMA", + SPACE = "SPACE", + NONE = "NONE", + } + + export enum eventStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + SCHEDULE = "SCHEDULE", + OVERDUE = "OVERDUE", + SKIPPED = "SKIPPED", + } + + export enum organisationUnitSelectionMode { + SELECTED = "SELECTED", + CHILDREN = "CHILDREN", + DESCENDANTS = "DESCENDANTS", + ACCESSIBLE = "ACCESSIBLE", + CAPTURE = "CAPTURE", + ALL = "ALL", + } + + export enum programStatus { + ACTIVE = "ACTIVE", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + } + + export enum renderingStrategy { + SINGLE = "SINGLE", + SPLIT_BY_PERIOD = "SPLIT_BY_PERIOD", + TIMELINE = "TIMELINE", + } + + export enum thematicMapType { + CHOROPLETH = "CHOROPLETH", + BUBBLE = "BUBBLE", + } + + export enum userOrgUnitType { + DATA_CAPTURE = "DATA_CAPTURE", + DATA_OUTPUT = "DATA_OUTPUT", + TEI_SEARCH = "TEI_SEARCH", + } +} + +export type CurrentUser = { + access: Access; + authorities: Array; + avatar: FileResource; + birthday: string; + created: string; + dataSets: Array; + dataViewOrganisationUnits: Array; + displayName: string; + education: string; + email: string; + employer: string; + externalAccess: boolean; + facebookMessenger: string; + favorites: Array; + firstName: string; + gender: string; + id: string; + impersonation: string; + interests: string; + introduction: string; + jobTitle: string; + languages: string; + lastUpdated: string; + name: string; + nationality: string; + organisationUnits: Array; + phoneNumber: string; + programs: Array; + settings: Record; + sharing: Sharing; + skype: string; + surname: string; + teiSearchOrganisationUnits: Array; + telegram: string; + translations: Array; + twitter: string; + userAccesses: Array; + userCredentials: UserCredentialsDto; + userGroupAccesses: Array; + userGroups: Array; + userRoles: Array; + username: string; + whatsApp: string; +}; + +export type Mention = { + created: string; + username: string; +}; + +export type MergeObject = { + enrollments: Array; + relationships: Array; + trackedEntityAttributes: Array; +}; + +export type MessageConversation = { + access: Access; + assignee: User; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + extMessageId: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + followUp: boolean; + href: string; + id: string; + lastMessage: string; + lastSender: User; + lastSenderFirstname: string; + lastSenderSurname: string; + lastUpdated: string; + lastUpdatedBy: User; + messageCount: number; + messageType: MessageConversation.messageType; + messages: Array; + priority: MessageConversation.priority; + publicAccess: string; + read: boolean; + sharing: Sharing; + status: MessageConversation.status; + subject: string; + translations: Array; + user: User; + userAccesses: Array; + userFirstname: string; + userGroupAccesses: Array; + userMessages: Array; + userSurname: string; +}; + +export namespace MessageConversation { + export enum messageType { + PRIVATE = "PRIVATE", + SYSTEM = "SYSTEM", + VALIDATION_RESULT = "VALIDATION_RESULT", + TICKET = "TICKET", + SYSTEM_VERSION_UPDATE = "SYSTEM_VERSION_UPDATE", + } + + export enum priority { + NONE = "NONE", + LOW = "LOW", + MEDIUM = "MEDIUM", + HIGH = "HIGH", + } + + export enum status { + NONE = "NONE", + OPEN = "OPEN", + PENDING = "PENDING", + INVALID = "INVALID", + SOLVED = "SOLVED", + } +} + +export type Meta = { + allowExternalAccess: boolean; + allowPublicAccess: boolean; +}; + +export type MetadataAdjustParams = { + change: Record; + targetId: string; +}; + +export type MetadataExportParams = { + classes: Array; + defaultFields: Array; + defaultFilter: Array; + defaultOrder: Array; + defaults: MetadataExportParams.defaults; + download: boolean; + exportWithDependencies: boolean; + inclusionStrategy: MetadataExportParams.inclusionStrategy; + objectExportWithDependencies: IdentifiableObject; + skipSharing: boolean; + user: User; + username: string; +}; + +export namespace MetadataExportParams { + export enum defaults { + INCLUDE = "INCLUDE", + EXCLUDE = "EXCLUDE", + } + + export enum inclusionStrategy { + ALWAYS = "ALWAYS", + NON_NULL = "NON_NULL", + NON_EMPTY = "NON_EMPTY", + } +} + +export type MetadataImportParams = { + atomicMode: MetadataImportParams.atomicMode; + flushMode: MetadataImportParams.flushMode; + identifier: MetadataImportParams.identifier; + importMode: MetadataImportParams.importMode; + importReportMode: MetadataImportParams.importReportMode; + importStrategy: MetadataImportParams.importStrategy; + mergeMode: MetadataImportParams.mergeMode; + metadataSyncImport: boolean; + preheatMode: MetadataImportParams.preheatMode; + skipSharing: boolean; + skipTranslation: boolean; + skipValidation: boolean; + userOverrideMode: MetadataImportParams.userOverrideMode; +}; + +export namespace MetadataImportParams { + export enum atomicMode { + ALL = "ALL", + NONE = "NONE", + } + + export enum flushMode { + OBJECT = "OBJECT", + AUTO = "AUTO", + } + + export enum identifier { + UID = "UID", + CODE = "CODE", + } + + export enum importMode { + COMMIT = "COMMIT", + VALIDATE = "VALIDATE", + } + + export enum importReportMode { + FULL = "FULL", + ERRORS = "ERRORS", + ERRORS_NOT_OWNER = "ERRORS_NOT_OWNER", + DEBUG = "DEBUG", + } + + export enum importStrategy { + CREATE = "CREATE", + UPDATE = "UPDATE", + CREATE_AND_UPDATE = "CREATE_AND_UPDATE", + DELETE = "DELETE", + SYNC = "SYNC", + NEW_AND_UPDATES = "NEW_AND_UPDATES", + NEW = "NEW", + UPDATES = "UPDATES", + DELETES = "DELETES", + } + + export enum mergeMode { + MERGE_ALWAYS = "MERGE_ALWAYS", + MERGE_IF_NOT_NULL = "MERGE_IF_NOT_NULL", + MERGE = "MERGE", + REPLACE = "REPLACE", + NONE = "NONE", + } + + export enum preheatMode { + REFERENCE = "REFERENCE", + ALL = "ALL", + NONE = "NONE", + } + + export enum userOverrideMode { + NONE = "NONE", + CURRENT = "CURRENT", + SELECTED = "SELECTED", + } +} + +export type MetadataItem = { + aggregationType: MetadataItem.aggregationType; + code: string; + description: string; + dimensionItemType: MetadataItem.dimensionItemType; + dimensionType: MetadataItem.dimensionType; + endDate: string; + expression: string; + indicatorType: IndicatorType; + legendSet: string; + name: string; + startDate: string; + style: ObjectStyle; + totalAggregationType: MetadataItem.totalAggregationType; + uid: string; + valueType: MetadataItem.valueType; +}; + +export namespace MetadataItem { + export enum aggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + AVERAGE_SUM_ORG_UNIT = "AVERAGE_SUM_ORG_UNIT", + LAST = "LAST", + LAST_AVERAGE_ORG_UNIT = "LAST_AVERAGE_ORG_UNIT", + LAST_LAST_ORG_UNIT = "LAST_LAST_ORG_UNIT", + LAST_IN_PERIOD = "LAST_IN_PERIOD", + LAST_IN_PERIOD_AVERAGE_ORG_UNIT = "LAST_IN_PERIOD_AVERAGE_ORG_UNIT", + FIRST = "FIRST", + FIRST_AVERAGE_ORG_UNIT = "FIRST_AVERAGE_ORG_UNIT", + FIRST_FIRST_ORG_UNIT = "FIRST_FIRST_ORG_UNIT", + COUNT = "COUNT", + STDDEV = "STDDEV", + VARIANCE = "VARIANCE", + MIN = "MIN", + MAX = "MAX", + MIN_SUM_ORG_UNIT = "MIN_SUM_ORG_UNIT", + MAX_SUM_ORG_UNIT = "MAX_SUM_ORG_UNIT", + NONE = "NONE", + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", + } + + export enum dimensionItemType { + DATA_ELEMENT = "DATA_ELEMENT", + DATA_ELEMENT_OPERAND = "DATA_ELEMENT_OPERAND", + INDICATOR = "INDICATOR", + REPORTING_RATE = "REPORTING_RATE", + PROGRAM_DATA_ELEMENT = "PROGRAM_DATA_ELEMENT", + PROGRAM_ATTRIBUTE = "PROGRAM_ATTRIBUTE", + PROGRAM_INDICATOR = "PROGRAM_INDICATOR", + PERIOD = "PERIOD", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + CATEGORY_OPTION = "CATEGORY_OPTION", + OPTION_GROUP = "OPTION_GROUP", + DATA_ELEMENT_GROUP = "DATA_ELEMENT_GROUP", + ORGANISATION_UNIT_GROUP = "ORGANISATION_UNIT_GROUP", + CATEGORY_OPTION_GROUP = "CATEGORY_OPTION_GROUP", + EXPRESSION_DIMENSION_ITEM = "EXPRESSION_DIMENSION_ITEM", + } + + export enum dimensionType { + DATA_X = "DATA_X", + PROGRAM_DATA_ELEMENT = "PROGRAM_DATA_ELEMENT", + PROGRAM_ATTRIBUTE = "PROGRAM_ATTRIBUTE", + PROGRAM_INDICATOR = "PROGRAM_INDICATOR", + DATA_COLLAPSED = "DATA_COLLAPSED", + CATEGORY_OPTION_COMBO = "CATEGORY_OPTION_COMBO", + ATTRIBUTE_OPTION_COMBO = "ATTRIBUTE_OPTION_COMBO", + PERIOD = "PERIOD", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + CATEGORY_OPTION_GROUP_SET = "CATEGORY_OPTION_GROUP_SET", + DATA_ELEMENT_GROUP_SET = "DATA_ELEMENT_GROUP_SET", + ORGANISATION_UNIT_GROUP_SET = "ORGANISATION_UNIT_GROUP_SET", + ORGANISATION_UNIT_GROUP = "ORGANISATION_UNIT_GROUP", + CATEGORY = "CATEGORY", + OPTION_GROUP_SET = "OPTION_GROUP_SET", + VALIDATION_RULE = "VALIDATION_RULE", + STATIC = "STATIC", + ORGANISATION_UNIT_LEVEL = "ORGANISATION_UNIT_LEVEL", + } + + export enum totalAggregationType { + SUM = "SUM", + AVERAGE = "AVERAGE", + } + + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type MetadataProposeParams = { + change: Record; + comment: string; + targetId: string; +}; + +export type MetadataSyncJobParameters = { + dataValuesPageSize: number; + eventProgramPageSize: number; + trackerProgramPageSize: number; +}; + +export type MetadataVersion = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + hashCode: string; + href: string; + id: string; + importDate: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + sharing: Sharing; + translations: Array; + type: MetadataVersion.type; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export namespace MetadataVersion { + export enum type { + BEST_EFFORT = "BEST_EFFORT", + ATOMIC = "ATOMIC", + } +} + +export type MethodAllowedList = { + allowedMethods: Array; + type: string; +}; + +export type MinMaxValueDto = { + categoryOptionCombo: UID_CategoryOptionCombo; + dataElement: UID_DataElement; + maxValue: number; + minValue: number; + orgUnit: UID_OrganisationUnit; +}; + +export type MinMaxValueParams = { + dataSets: Array; + organisationUnit: string; +}; + +export type MonitoringJobParameters = { + persistResults: boolean; + relativeEnd: number; + relativeStart: number; + sendNotifications: boolean; + validationRuleGroups: Array; +}; + +export type Node = { + children: Array; + collection: boolean; + comment: string; + complex: boolean; + metadata: boolean; + name: string; + namespace: string; + order: number; + parent: Node; + property: Property; + simple: boolean; + type: Node.type; + unorderedChildren: Array; +}; + +export namespace Node { + export enum type { + SIMPLE = "SIMPLE", + COMPLEX = "COMPLEX", + COLLECTION = "COLLECTION", + } +} + +export type Note = { + lastUpdated: string; + lastUpdatedBy: UserInfoSnapshot; + note: string; + storedBy: string; + storedDate: string; + value: string; +}; + +export type Notification = { + category: Notification.category; + completed: boolean; + data: Record; + dataType: Notification.dataType; + id: string; + level: Notification.level; + message: string; + time: string; + uid: string; +}; + +export namespace Notification { + export enum category { + DATA_STATISTICS = "DATA_STATISTICS", + DATA_INTEGRITY = "DATA_INTEGRITY", + RESOURCE_TABLE = "RESOURCE_TABLE", + ANALYTICS_TABLE = "ANALYTICS_TABLE", + CONTINUOUS_ANALYTICS_TABLE = "CONTINUOUS_ANALYTICS_TABLE", + DATA_SYNC = "DATA_SYNC", + TRACKER_PROGRAMS_DATA_SYNC = "TRACKER_PROGRAMS_DATA_SYNC", + EVENT_PROGRAMS_DATA_SYNC = "EVENT_PROGRAMS_DATA_SYNC", + FILE_RESOURCE_CLEANUP = "FILE_RESOURCE_CLEANUP", + IMAGE_PROCESSING = "IMAGE_PROCESSING", + META_DATA_SYNC = "META_DATA_SYNC", + AGGREGATE_DATA_EXCHANGE = "AGGREGATE_DATA_EXCHANGE", + SMS_SEND = "SMS_SEND", + SEND_SCHEDULED_MESSAGE = "SEND_SCHEDULED_MESSAGE", + PROGRAM_NOTIFICATIONS = "PROGRAM_NOTIFICATIONS", + VALIDATION_RESULTS_NOTIFICATION = "VALIDATION_RESULTS_NOTIFICATION", + CREDENTIALS_EXPIRY_ALERT = "CREDENTIALS_EXPIRY_ALERT", + MONITORING = "MONITORING", + PUSH_ANALYSIS = "PUSH_ANALYSIS", + TRACKER_SEARCH_OPTIMIZATION = "TRACKER_SEARCH_OPTIMIZATION", + PREDICTOR = "PREDICTOR", + DATA_SET_NOTIFICATION = "DATA_SET_NOTIFICATION", + REMOVE_USED_OR_EXPIRED_RESERVED_VALUES = "REMOVE_USED_OR_EXPIRED_RESERVED_VALUES", + TRACKER_IMPORT_JOB = "TRACKER_IMPORT_JOB", + TRACKER_IMPORT_NOTIFICATION_JOB = "TRACKER_IMPORT_NOTIFICATION_JOB", + TRACKER_IMPORT_RULE_ENGINE_JOB = "TRACKER_IMPORT_RULE_ENGINE_JOB", + MATERIALIZED_SQL_VIEW_UPDATE = "MATERIALIZED_SQL_VIEW_UPDATE", + LEADER_ELECTION = "LEADER_ELECTION", + LEADER_RENEWAL = "LEADER_RENEWAL", + COMPLETE_DATA_SET_REGISTRATION_IMPORT = "COMPLETE_DATA_SET_REGISTRATION_IMPORT", + DATAVALUE_IMPORT_INTERNAL = "DATAVALUE_IMPORT_INTERNAL", + METADATA_IMPORT = "METADATA_IMPORT", + DATAVALUE_IMPORT = "DATAVALUE_IMPORT", + GEOJSON_IMPORT = "GEOJSON_IMPORT", + EVENT_IMPORT = "EVENT_IMPORT", + ENROLLMENT_IMPORT = "ENROLLMENT_IMPORT", + TEI_IMPORT = "TEI_IMPORT", + DISABLE_INACTIVE_USERS = "DISABLE_INACTIVE_USERS", + ACCOUNT_EXPIRY_ALERT = "ACCOUNT_EXPIRY_ALERT", + SYSTEM_VERSION_UPDATE_CHECK = "SYSTEM_VERSION_UPDATE_CHECK", + TEST = "TEST", + MOCK = "MOCK", + GML_IMPORT = "GML_IMPORT", + ANALYTICSTABLE_UPDATE = "ANALYTICSTABLE_UPDATE", + PROGRAM_DATA_SYNC = "PROGRAM_DATA_SYNC", + } + + export enum dataType { + PARAMETERS = "PARAMETERS", + } + + export enum level { + OFF = "OFF", + DEBUG = "DEBUG", + LOOP = "LOOP", + INFO = "INFO", + WARN = "WARN", + ERROR = "ERROR", + } +} + +export type OAuth2Client = { + access: Access; + attributeValues: Array; + cid: string; + code: string; + created: string; + createdBy: User; + displayName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + grantTypes: Array; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + publicAccess: string; + redirectUris: Array; + secret: string; + sharing: Sharing; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type ObjectCount = { + objectCounts: Record; +}; + +export type ObjectReport = { + displayName: string; + errorReports: Array; + index: number; + klass: string; + uid: string; +}; + +export type ObjectStyle = { + color: string; + icon: string; +}; + +export type ObjectValueTypeRenderingOption = { + clazz: string; + hasOptionSet: boolean; + renderingTypes: Array< + | "DEFAULT" + | "DROPDOWN" + | "VERTICAL_RADIOBUTTONS" + | "HORIZONTAL_RADIOBUTTONS" + | "VERTICAL_CHECKBOXES" + | "HORIZONTAL_CHECKBOXES" + | "SHARED_HEADER_RADIOBUTTONS" + | "ICONS_AS_BUTTONS" + | "SPINNER" + | "ICON" + | "TOGGLE" + | "VALUE" + | "SLIDER" + | "LINEAR_SCALE" + | "AUTOCOMPLETE" + | "QR_CODE" + | "BAR_CODE" + | "GS1_DATAMATRIX" + | "CANVAS" + >; + valueType: ObjectValueTypeRenderingOption.valueType; +}; + +export namespace ObjectValueTypeRenderingOption { + export enum valueType { + TEXT = "TEXT", + LONG_TEXT = "LONG_TEXT", + MULTI_TEXT = "MULTI_TEXT", + LETTER = "LETTER", + PHONE_NUMBER = "PHONE_NUMBER", + EMAIL = "EMAIL", + BOOLEAN = "BOOLEAN", + TRUE_ONLY = "TRUE_ONLY", + DATE = "DATE", + DATETIME = "DATETIME", + TIME = "TIME", + NUMBER = "NUMBER", + UNIT_INTERVAL = "UNIT_INTERVAL", + PERCENTAGE = "PERCENTAGE", + INTEGER = "INTEGER", + INTEGER_POSITIVE = "INTEGER_POSITIVE", + INTEGER_NEGATIVE = "INTEGER_NEGATIVE", + INTEGER_ZERO_OR_POSITIVE = "INTEGER_ZERO_OR_POSITIVE", + TRACKER_ASSOCIATE = "TRACKER_ASSOCIATE", + USERNAME = "USERNAME", + COORDINATE = "COORDINATE", + ORGANISATION_UNIT = "ORGANISATION_UNIT", + REFERENCE = "REFERENCE", + AGE = "AGE", + URL = "URL", + FILE_RESOURCE = "FILE_RESOURCE", + IMAGE = "IMAGE", + GEOJSON = "GEOJSON", + } +} + +export type Option = { + access: Access; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + name: string; + optionSet: OptionSet; + publicAccess: string; + sharing: Sharing; + shortName: string; + sortOrder: number; + style: ObjectStyle; + translations: Array; + user: User; + userAccesses: Array; + userGroupAccesses: Array; +}; + +export type OptionGroup = { + access: Access; + aggregationType: OptionGroup.aggregationType; + attributeValues: Array; + code: string; + created: string; + createdBy: User; + description: string; + dimensionItem: string; + displayDescription: string; + displayFormName: string; + displayName: string; + displayShortName: string; + externalAccess: boolean; + favorite: boolean; + favorites: Array; + formName: string; + href: string; + id: string; + lastUpdated: string; + lastUpdatedBy: User; + legendSet: LegendSet; + legendSets: Array; + name: string; + optionSet: OptionSet; + options: Array