From 2949d6218b4e01c797bee753393e5c4a0e1d36cd Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 26 Sep 2026 13:45:42 +0200 Subject: [PATCH] Implemented data export --- PostFundManagement.ConsoleUI/bun.lock | 75 +- .../openapi_v1_latest.json | 9174 +++++++++++++++++ PostFundManagement.ConsoleUI/package.json | 3 + .../governance/InstructionsSection.tsx | 300 +- .../components/governance/RulesSection.tsx | 50 +- .../src/components/ui/ExportButton.tsx | 139 + .../src/lib/exportUtils.ts | 302 + .../src/pages/GovernancePage.tsx | 325 +- .../src/services/api.ts | 443 +- PostFundManagement.ConsoleUI/src/types.ts | 14 +- .../src/utils/exportUtils.ts | 247 + PostFundManagement.ConsoleUI/yarn.lock | 226 +- 12 files changed, 10939 insertions(+), 359 deletions(-) create mode 100644 PostFundManagement.ConsoleUI/openapi_v1_latest.json create mode 100644 PostFundManagement.ConsoleUI/src/components/ui/ExportButton.tsx create mode 100644 PostFundManagement.ConsoleUI/src/lib/exportUtils.ts create mode 100644 PostFundManagement.ConsoleUI/src/utils/exportUtils.ts diff --git a/PostFundManagement.ConsoleUI/bun.lock b/PostFundManagement.ConsoleUI/bun.lock index da15f2a..73c4b78 100644 --- a/PostFundManagement.ConsoleUI/bun.lock +++ b/PostFundManagement.ConsoleUI/bun.lock @@ -9,11 +9,14 @@ "@hookform/resolvers": "^5.9.1", "@tailwindcss/vite": "^4.1.14", "@tanstack/react-query": "^5.102.8", + "@vitejs/plugin-basic-ssl": "^2.3.0", "@vitejs/plugin-react": "^5.0.4", "axios": "^1.20.0", "dotenv": "^17.2.3", "express": "^4.21.2", "hashids": "^2.3.0", + "jspdf": "^4.2.1", + "jspdf-autotable": "^5.0.8", "lucide-react": "^0.546.0", "motion": "^12.23.24", "oidc-client-ts": "^3.5.0", @@ -23,12 +26,12 @@ "react-router-dom": "^7.18.3", "tailwindcss": "^4.1.14", "vite": "^6.2.3", - "zod": "^4.5.4", + "xlsx": "^0.18.5", + "zod": "^3.25.76", }, "devDependencies": { "@types/express": "^4.17.21", "@types/node": "^22.14.0", - "@vitejs/plugin-basic-ssl": "^2.3.0", "autoprefixer": "^10.4.21", "esbuild": "^0.25.0", "tsx": "^4.21.0", @@ -69,6 +72,8 @@ "@babel/plugin-transform-react-jsx-source": ["@babel/plugin-transform-react-jsx-source@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q=="], + "@babel/runtime": ["@babel/runtime@7.29.7", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="], + "@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="], "@babel/traverse": ["@babel/traverse@7.29.8", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.8", "@babel/helper-globals": "^7.29.7", "@babel/parser": "^7.29.8", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "debug": "^4.3.1" } }, "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg=="], @@ -273,8 +278,12 @@ "@types/node": ["@types/node@22.20.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q=="], + "@types/pako": ["@types/pako@2.0.4", "", {}, "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw=="], + "@types/qs": ["@types/qs@6.15.1", "", {}, "sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw=="], + "@types/raf": ["@types/raf@3.4.3", "", {}, "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw=="], + "@types/range-parser": ["@types/range-parser@1.2.7", "", {}, "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ=="], "@types/retry": ["@types/retry@0.12.0", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="], @@ -283,12 +292,16 @@ "@types/serve-static": ["@types/serve-static@1.15.10", "", { "dependencies": { "@types/http-errors": "*", "@types/node": "*", "@types/send": "<1" } }, "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw=="], + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + "@vitejs/plugin-basic-ssl": ["@vitejs/plugin-basic-ssl@2.3.0", "", { "peerDependencies": { "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ=="], "@vitejs/plugin-react": ["@vitejs/plugin-react@5.2.0", "", { "dependencies": { "@babel/core": "^7.29.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-rc.3", "@types/babel__core": "^7.20.5", "react-refresh": "^0.18.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw=="], "accepts": ["accepts@1.3.8", "", { "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" } }, "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw=="], + "adler-32": ["adler-32@1.3.1", "", {}, "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="], + "agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="], "array-flatten": ["array-flatten@1.1.1", "", {}, "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="], @@ -299,6 +312,8 @@ "axios": ["axios@1.20.0", "", { "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg=="], + "base64-arraybuffer": ["base64-arraybuffer@1.0.2", "", {}, "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="], + "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], "baseline-browser-mapping": ["baseline-browser-mapping@2.11.21", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ=="], @@ -319,6 +334,12 @@ "caniuse-lite": ["caniuse-lite@1.0.30001810", "", {}, "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg=="], + "canvg": ["canvg@3.0.11", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@types/raf": "^3.4.0", "core-js": "^3.8.3", "raf": "^3.4.1", "regenerator-runtime": "^0.13.7", "rgbcolor": "^1.0.1", "stackblur-canvas": "^2.0.0", "svg-pathdata": "^6.0.3" } }, "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA=="], + + "cfb": ["cfb@1.2.2", "", { "dependencies": { "adler-32": "~1.3.0", "crc-32": "~1.2.0" } }, "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA=="], + + "codepage": ["codepage@1.15.0", "", {}, "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="], + "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], "content-disposition": ["content-disposition@0.5.4", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ=="], @@ -331,6 +352,12 @@ "cookie-signature": ["cookie-signature@1.0.7", "", {}, "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="], + "core-js": ["core-js@3.50.0", "", {}, "sha512-BRWgOLKkFeCgRudR6zrs8p9XJZcE14grzKMMssoYrk6krtuEZ7MTKPIY5RzOnqsEKIR9kst7wNzphttraT+Yqw=="], + + "crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="], + + "css-line-break": ["css-line-break@2.1.0", "", { "dependencies": { "utrie": "^1.0.2" } }, "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w=="], + "data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="], "debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], @@ -343,6 +370,8 @@ "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + "dompurify": ["dompurify@3.4.16", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ=="], + "dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="], "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], @@ -377,10 +406,14 @@ "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], + "fast-png": ["fast-png@6.4.0", "", { "dependencies": { "@types/pako": "^2.0.3", "iobuffer": "^5.3.2", "pako": "^2.1.0" } }, "sha512-kAqZq1TlgBjZcLr5mcN6NP5Rv4V2f22z00c3g8vRrwkcqjerx7BEhPbOnWCPqaHUl2XWQBJQvOT/FQhdMT7X/Q=="], + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], "fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="], + "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], + "finalhandler": ["finalhandler@1.3.2", "", { "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "~2.4.1", "parseurl": "~1.3.3", "statuses": "~2.0.2", "unpipe": "~1.0.0" } }, "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg=="], "follow-redirects": ["follow-redirects@1.16.0", "", { "peerDependencies": { "debug": "*" }, "optionalPeers": ["debug"] }, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="], @@ -391,6 +424,8 @@ "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], + "frac": ["frac@1.1.2", "", {}, "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="], + "fraction.js": ["fraction.js@5.3.4", "", {}, "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ=="], "framer-motion": ["framer-motion@12.43.0", "", { "dependencies": { "motion-dom": "^12.43.0", "motion-utils": "^12.39.0", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-1eaL3RvR/kAlbG7UYcpMptEyzPoENO0c6w7ZnB3/hh2vSAz/6uGAFn6fdoqTBguNstf3MsFhJHsD/0DHiclG+g=="], @@ -427,6 +462,8 @@ "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], + "html2canvas": ["html2canvas@1.4.1", "", { "dependencies": { "css-line-break": "^2.1.0", "text-segmentation": "^1.0.3" } }, "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA=="], + "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], "https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="], @@ -435,6 +472,8 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + "iobuffer": ["iobuffer@5.4.0", "", {}, "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA=="], + "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], @@ -447,6 +486,10 @@ "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + "jspdf": ["jspdf@4.2.1", "", { "dependencies": { "@babel/runtime": "^7.28.6", "fast-png": "^6.2.0", "fflate": "^0.8.1" }, "optionalDependencies": { "canvg": "^3.0.11", "core-js": "^3.6.0", "dompurify": "^3.3.1", "html2canvas": "^1.0.0-rc.5" } }, "sha512-YyAXyvnmjTbR4bHQRLzex3CuINCDlQnBqoSYyjJwTP2x9jDLuKDzy7aKUl0hgx3uhcl7xzg32agn5vlie6HIlQ=="], + + "jspdf-autotable": ["jspdf-autotable@5.0.8", "", { "peerDependencies": { "jspdf": "^2 || ^3 || ^4" } }, "sha512-Hy05N86yBO7CXBrnSLOge7i1ZYpKH2DjQ94iybaP7vBhSInjvRBgDc99ngKzSbSO8Jc98ZCally8I6n0tj2RJQ=="], + "jwa": ["jwa@2.0.1", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="], "jws": ["jws@4.0.1", "", { "dependencies": { "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA=="], @@ -525,10 +568,14 @@ "p-retry": ["p-retry@4.6.2", "", { "dependencies": { "@types/retry": "0.12.0", "retry": "^0.13.1" } }, "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ=="], + "pako": ["pako@2.2.0", "", {}, "sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w=="], + "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], "path-to-regexp": ["path-to-regexp@0.1.13", "", {}, "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA=="], + "performance-now": ["performance-now@2.1.0", "", {}, "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="], + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], @@ -545,6 +592,8 @@ "qs": ["qs@6.15.3", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A=="], + "raf": ["raf@3.4.1", "", { "dependencies": { "performance-now": "^2.1.0" } }, "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA=="], + "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], "raw-body": ["raw-body@2.5.3", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "unpipe": "~1.0.0" } }, "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA=="], @@ -561,8 +610,12 @@ "react-router-dom": ["react-router-dom@7.18.3", "", { "dependencies": { "react-router": "7.18.3" }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" } }, "sha512-ytVbyBBM7vMfRCam25r0WMhSVSom909A8p+8m0/f1w853dz/xfFu6etAT2SEbVoSnI+ZoPRDqIsQXVT89gp7kg=="], + "regenerator-runtime": ["regenerator-runtime@0.13.11", "", {}, "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="], + "retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="], + "rgbcolor": ["rgbcolor@1.0.1", "", {}, "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw=="], + "rollup": ["rollup@4.63.1", "", { "dependencies": { "@types/estree": "1.0.9" }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", "@rollup/rollup-android-arm-eabi": "4.63.1", "@rollup/rollup-android-arm64": "4.63.1", "@rollup/rollup-darwin-arm64": "4.63.1", "@rollup/rollup-darwin-x64": "4.63.1", "@rollup/rollup-freebsd-arm64": "4.63.1", "@rollup/rollup-freebsd-x64": "4.63.1", "@rollup/rollup-linux-arm-gnueabihf": "4.63.1", "@rollup/rollup-linux-arm-musleabihf": "4.63.1", "@rollup/rollup-linux-arm64-gnu": "4.63.1", "@rollup/rollup-linux-arm64-musl": "4.63.1", "@rollup/rollup-linux-loong64-gnu": "4.63.1", "@rollup/rollup-linux-loong64-musl": "4.63.1", "@rollup/rollup-linux-ppc64-gnu": "4.63.1", "@rollup/rollup-linux-ppc64-musl": "4.63.1", "@rollup/rollup-linux-riscv64-gnu": "4.63.1", "@rollup/rollup-linux-riscv64-musl": "4.63.1", "@rollup/rollup-linux-s390x-gnu": "4.63.1", "@rollup/rollup-linux-x64-gnu": "4.63.1", "@rollup/rollup-linux-x64-musl": "4.63.1", "@rollup/rollup-openbsd-x64": "4.63.1", "@rollup/rollup-openharmony-arm64": "4.63.1", "@rollup/rollup-win32-arm64-msvc": "4.63.1", "@rollup/rollup-win32-ia32-msvc": "4.63.1", "@rollup/rollup-win32-x64-gnu": "4.63.1", "@rollup/rollup-win32-x64-msvc": "4.63.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg=="], "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], @@ -591,12 +644,20 @@ "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + "ssf": ["ssf@0.11.2", "", { "dependencies": { "frac": "~1.1.2" } }, "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g=="], + + "stackblur-canvas": ["stackblur-canvas@2.7.0", "", {}, "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ=="], + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "svg-pathdata": ["svg-pathdata@6.0.3", "", {}, "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw=="], + "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], + "text-segmentation": ["text-segmentation@1.0.3", "", { "dependencies": { "utrie": "^1.0.2" } }, "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw=="], + "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], @@ -617,17 +678,25 @@ "utils-merge": ["utils-merge@1.0.1", "", {}, "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="], + "utrie": ["utrie@1.0.2", "", { "dependencies": { "base64-arraybuffer": "^1.0.2" } }, "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw=="], + "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], "vite": ["vite@6.4.3", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A=="], "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="], + "wmf": ["wmf@1.0.2", "", {}, "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="], + + "word": ["word@0.3.0", "", {}, "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="], + "ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="], + "xlsx": ["xlsx@0.18.5", "", { "dependencies": { "adler-32": "~1.3.0", "cfb": "~1.2.1", "codepage": "~1.15.0", "crc-32": "~1.2.1", "ssf": "~0.11.2", "wmf": "~1.0.1", "word": "~0.3.0" }, "bin": { "xlsx": "bin/xlsx.njs" } }, "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ=="], + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "zod": ["zod@4.5.4", "", {}, "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA=="], + "zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], "@babel/core/debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" }, "peerDependencies": { "supports-color": "*" }, "optionalPeers": ["supports-color"] }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], diff --git a/PostFundManagement.ConsoleUI/openapi_v1_latest.json b/PostFundManagement.ConsoleUI/openapi_v1_latest.json new file mode 100644 index 0000000..4c3c433 --- /dev/null +++ b/PostFundManagement.ConsoleUI/openapi_v1_latest.json @@ -0,0 +1,9174 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "PostFundManagement.Api | v1", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://api.ifri.khongisa.co.za/" + } + ], + "paths": { + "/v1/api/users/{userId}": { + "get": { + "tags": [ + "Users" + ], + "description": "Gets the metadata of a single user.", + "operationId": "getuser", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/users/{page}/{pageSize}": { + "post": { + "tags": [ + "Users" + ], + "description": "Paginated, searchable directory of system users. Supports filtering by ActivityStatus, searching by Email, and sorting", + "operationId": "getusers", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UserFilterRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/integration/sync": { + "post": { + "tags": [ + "Users" + ], + "description": "Trigger integration and data synchronization in the background", + "operationId": "syncuser", + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/users/{userId}/status/{status}": { + "get": { + "tags": [ + "Users" + ], + "description": "Changes the Activity status of the user in the system", + "operationId": "updateuserstatus", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "status", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/activities": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new activity under project (M04)", + "operationId": "createactivity", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateActivityRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/beneficiaries": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new project beneficiary", + "operationId": "createbeneficiary", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateBeneficiaryRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update project beneficiary", + "operationId": "updatebeneficiary", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateBeneficiaryRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/changerequests": { + "post": { + "tags": [ + "Projects" + ], + "description": "Create a new change request against an existing project", + "operationId": "createchangerequest", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateChangeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update a specific project change request", + "operationId": "updatechangerequest", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateChangeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/complianceitems": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new beneficiary compliance item", + "operationId": "createcomplianceitem", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateComplianceItemRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update a specific compliance item", + "operationId": "updatecomplianceitem", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateComplianceItemRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/issues": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new project issue", + "operationId": "createissue", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateIssueRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update a specific project issue", + "operationId": "updateissue", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateIssueRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/beneficiaris/outcomes": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new beneficiary outcome", + "operationId": "createoutcome", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateOutcomeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/programme": { + "post": { + "tags": [ + "Projects" + ], + "description": "Create programme", + "operationId": "createprogramme", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateProgrammeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update existing programme", + "operationId": "updateprogramme", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateProgrammeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects": { + "post": { + "tags": [ + "Projects" + ], + "description": "Create a new project (M04)", + "operationId": "createproject", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateProjectRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of projects", + "operationId": "getprojects", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update project details", + "operationId": "updateproject", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateProjectRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/sitevisits": { + "post": { + "tags": [ + "Projects" + ], + "description": "Add a new project site visit", + "operationId": "createsitevisit", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateSiteVisitRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Projects" + ], + "description": "Update project site visit", + "operationId": "updatesitevisit", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateSiteVisitRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/{projectId}/activities": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of activities for a project", + "operationId": "getactivities", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/activities/{activityId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific activity by it's id", + "operationId": "getactivity", + "parameters": [ + { + "name": "activityId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/beneficiaries/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project beneficiaries", + "operationId": "getbeneficiariesretrieval", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Beneficiary" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/beneficiaries/{beneficiaryId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project beneficiaries", + "operationId": "getbeneficiaries", + "parameters": [ + { + "name": "beneficiaryId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Beneficiary" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/changerequests/{changeRequestId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific project change request", + "operationId": "getchangerequest", + "parameters": [ + { + "name": "changeRequestId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ChangeRequest" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/changerequests/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project change requests", + "operationId": "getchangerequests", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChangeRequest" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/complianceitems/{complianceItemId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific project compliance item", + "operationId": "getcomplianceitem", + "parameters": [ + { + "name": "complianceItemId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ComplianceItem" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/complianceitems/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project compliance items", + "operationId": "getcomplianceitems", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComplianceItem" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/issues/{issueId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific project issue", + "operationId": "getissue", + "parameters": [ + { + "name": "issueId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Issue" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/issues/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project issues", + "operationId": "getissues", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Issue" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/milestones/{milestoneId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific milestone", + "operationId": "getmilestone", + "parameters": [ + { + "name": "milestoneId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Milestone" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/milestones/{page}/{pageSize}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of all milestones", + "operationId": "getmilestones", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Milestone" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/outcomes/{outcomeId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets a specific project outcome", + "operationId": "getoutcome", + "parameters": [ + { + "name": "outcomeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Outcome" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/outcomes/{beneficiatyId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project beneficiary outcomes", + "operationId": "getoutcomes", + "parameters": [ + { + "name": "beneficiatyId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Outcome" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/programme/{programmeId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get specific programme", + "operationId": "getprogramme", + "parameters": [ + { + "name": "programmeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Programme" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/{programmeId}/programme": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of all projects under a programme", + "operationId": "getprogrammeprojects", + "parameters": [ + { + "name": "programmeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/programme/{page}/{pageSize}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of all programmes", + "operationId": "getprogrammesprojects", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Programme" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get project by ID", + "operationId": "getproject", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/indicators/project/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get get a detailed list of project indicators", + "operationId": "getprojectindicators", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Indicator" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/{projectId}/milestones": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of milestones for a project", + "operationId": "getprojectmilestones", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Milestone" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/{projectId}/risks": { + "get": { + "tags": [ + "Projects" + ], + "description": "Get a list of risks for a project", + "operationId": "getprojectrisks", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Risk" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/sitevisits/{siteVisitId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project site visit", + "operationId": "getsitevisit", + "parameters": [ + { + "name": "siteVisitId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/SiteVisit" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/sitevisits/{projectId}": { + "get": { + "tags": [ + "Projects" + ], + "description": "Gets project site visits", + "operationId": "getsitevisits", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SiteVisit" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/milestone": { + "put": { + "tags": [ + "Projects" + ], + "description": "Update project milestone details", + "operationId": "updatemilestone", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateMilestoneRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/outcomes": { + "put": { + "tags": [ + "Projects" + ], + "description": "Update project beneficiary outcome", + "operationId": "updateoutcome", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateOutcomeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/projects/status": { + "put": { + "tags": [ + "Projects" + ], + "description": "Update project status (M04)", + "operationId": "updateprojectstatus", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateProjectStatusRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/awards": { + "post": { + "tags": [ + "Grants" + ], + "description": "Register an approved funding award (M01)", + "operationId": "createaward", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateAwardRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Grants" + ], + "description": "Get a list of awards", + "operationId": "getawards", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Award" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/budgets": { + "post": { + "tags": [ + "Grants" + ], + "description": "Create a new budget line (M05)", + "operationId": "createbudget", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateBudgetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Grants" + ], + "description": "Get all budgets", + "operationId": "getbudgets", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Budget" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/contracts": { + "post": { + "tags": [ + "Grants" + ], + "description": "Create a contract record from an approved award (M02)", + "operationId": "createcontract", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateContractRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Grants" + ], + "description": "Get all contracts", + "operationId": "getcontracts", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Contract" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Grants" + ], + "description": "Updates a specific contract", + "operationId": "updatecontract", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateContractRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/contracts/execute": { + "post": { + "tags": [ + "Grants" + ], + "description": "Execute the contract and lock the contractual version", + "operationId": "executecontract", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ExecuteContractRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/awards/{awardId}": { + "get": { + "tags": [ + "Grants" + ], + "description": "Get award by ID", + "operationId": "getaward", + "parameters": [ + { + "name": "awardId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Award" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/budgets/{budgetId}": { + "get": { + "tags": [ + "Grants" + ], + "description": "Get budget by ID", + "operationId": "getbudget", + "parameters": [ + { + "name": "budgetId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Budget" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/contracts/{contractId}": { + "get": { + "tags": [ + "Grants" + ], + "description": "Get contract by ID", + "operationId": "getcontract", + "parameters": [ + { + "name": "contractId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Contract" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "post": { + "tags": [ + "Grants" + ], + "description": "Uploads a contract file securely", + "operationId": "uploadcontract", + "parameters": [ + { + "name": "contractId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/grants/contracts/{contractId}/securelink": { + "get": { + "tags": [ + "Grants" + ], + "description": "Gets a secure download URL, has expiry period (default 15min)", + "operationId": "getcontracturl", + "parameters": [ + { + "name": "contractId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/instruments": { + "post": { + "tags": [ + "Governance" + ], + "description": "Creates a new programme funding instrument", + "operationId": "createinstrument", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateInstrumentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Governance" + ], + "description": "Updates a programme funding instrument", + "operationId": "updateinstrument", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateInstrumentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/organisations": { + "post": { + "tags": [ + "Governance" + ], + "description": "Create a new organization profile", + "operationId": "createorganisation", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateOrganisationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Governance" + ], + "description": "Get a paginated directory of organizations", + "operationId": "getorganisations", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organisation" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Governance" + ], + "description": "Update an existing organization profile", + "operationId": "updateorganisation", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateOrganisationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/organisations/portfolio": { + "post": { + "tags": [ + "Governance" + ], + "description": "Create a new organization portfolio", + "operationId": "createportfolio", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreatePortfolioRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Governance" + ], + "description": "Update an existing organization portfolio", + "operationId": "updateportfolio", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdatePortfolioRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/tenants": { + "post": { + "tags": [ + "Governance" + ], + "description": "Create a new tenant", + "operationId": "createtenant", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateTenantRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Governance" + ], + "description": "Gets system tenants", + "operationId": "gettenantsretrieval", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tenant" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Governance" + ], + "description": "Updates a specific tenant", + "operationId": "updatetenant", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateTenantRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/dashboard": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get executive portfolio dashboard metrics and KPIs", + "operationId": "dashboard", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/instruments/{programmeId}": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get all funding instruments", + "operationId": "getinstruments", + "parameters": [ + { + "name": "programmeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instrument" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/organisations/{organisationId}": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get organization profile by ID", + "operationId": "getorganisation", + "parameters": [ + { + "name": "organisationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Organisation" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/portfolios/{portfolioId}": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get a specific portfolios", + "operationId": "getportfolio", + "parameters": [ + { + "name": "portfolioId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Portfolio" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Portfolio" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/portfolios/{portfolioId}/programmes": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get a programme's portfolios", + "operationId": "getportfolioprogrammes", + "parameters": [ + { + "name": "portfolioId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Programme" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/organisations/{organisationId}/portfolio": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get all portfolios", + "operationId": "getportfolios", + "parameters": [ + { + "name": "organisationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Portfolio" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/programmes/{portfolioId}": { + "get": { + "tags": [ + "Governance" + ], + "description": "Get all programmes", + "operationId": "getprogrammes", + "parameters": [ + { + "name": "portfolioId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Programme" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/governance/tenants/{tenantId}": { + "get": { + "tags": [ + "Governance" + ], + "description": "Gets system tenants", + "operationId": "gettenants", + "parameters": [ + { + "name": "tenantId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/disbursements/{disbursementId}/approve": { + "post": { + "tags": [ + "Execution" + ], + "description": "Approve disbursement and release payment (M06)", + "operationId": "approvedisbursement", + "parameters": [ + { + "name": "disbursementId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/disbursements": { + "post": { + "tags": [ + "Execution" + ], + "description": "Create a new disbursement schedule (M06)", + "operationId": "createdisbursement", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateDisbursementRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Execution" + ], + "description": "Get a list of disbursements", + "operationId": "getdisbursements", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Disbursement" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Execution" + ], + "description": "Update the details of a specific disbursement", + "operationId": "updatedisbursement", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateDisbursementRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/risks": { + "post": { + "tags": [ + "Execution" + ], + "description": "Add risk to risk register (M09)", + "operationId": "createrisk", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateRiskRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "get": { + "tags": [ + "Execution" + ], + "description": "Get a list of all risks", + "operationId": "getrisks", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Risk" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Execution" + ], + "description": "Update the details of a specific risk", + "operationId": "updaterisk", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateRiskRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/rules": { + "post": { + "tags": [ + "Execution" + ], + "description": "Add rule against a programme", + "operationId": "createrule", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateRuleRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + }, + "put": { + "tags": [ + "Execution" + ], + "description": "Update the details of a specific programme rule (supplied version auto-increment)", + "operationId": "updaterule", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateRuleRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/disbursements/{disbursementId}": { + "get": { + "tags": [ + "Execution" + ], + "description": "Get a specific disbursement", + "operationId": "getdisbursement", + "parameters": [ + { + "name": "disbursementId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Disbursement" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/risks/{riskId}": { + "get": { + "tags": [ + "Execution" + ], + "description": "Get a specific risk", + "operationId": "getrisk", + "parameters": [ + { + "name": "riskId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Risk" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/rules/{ruleId}": { + "get": { + "tags": [ + "Execution" + ], + "description": "Get a specific programme rule", + "operationId": "getrule", + "parameters": [ + { + "name": "ruleId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Rule" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/execution/programmes/rules": { + "post": { + "tags": [ + "Execution" + ], + "description": "Get a list of all programme rules", + "operationId": "getrules", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Pagination" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Rule" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/file": { + "put": { + "tags": [ + "Evidence & M&E" + ], + "description": "Upload supporting evidence file to S3 and register metadata (M14)", + "operationId": "createevidence", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/indicators": { + "post": { + "tags": [ + "Evidence & M&E" + ], + "description": "Define indicators and baselines/targets (M08)", + "operationId": "createindicator", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateIndicatorRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/milestones": { + "post": { + "tags": [ + "Evidence & M&E" + ], + "description": "Define contractual milestones (M07)", + "operationId": "createmilestonerequest", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/CreateMilestoneRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/{evidenceId}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a specific evidence record and assiciated file URLs", + "operationId": "getevidence", + "parameters": [ + { + "name": "evidenceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Evidence" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/files/{page}/{pageSize}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a list of all uploaded evidence files metadata", + "operationId": "getevidencefiles", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evidence" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/{evidenceId}/securelink": { + "get": { + "tags": [ + "Grants" + ], + "description": "Gets a secure download URL of the evidence file, URL expires (default: 15min)", + "operationId": "getevidenceurl", + "parameters": [ + { + "name": "evidenceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json; version=1": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/indicators/{indicatorId}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a specific indicator.", + "operationId": "getindicator", + "parameters": [ + { + "name": "indicatorId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Indicator" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/indicators/{page}/{pageSize}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a list of indicators", + "operationId": "getindicators", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Indicator" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/milestone/{milestoneId}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a list of all uploaded evidence metadata for a specific mliestone", + "operationId": "getmilestoneevidence", + "parameters": [ + { + "name": "milestoneId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evidence" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/{projectId}": { + "get": { + "tags": [ + "Evidence & M&E" + ], + "description": "Get a list of all uploaded evidence metadata for a specific project", + "operationId": "getprojectevidence", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evidence" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence/indicators/{indicatorId}/actuals/{actualAmount}": { + "post": { + "tags": [ + "Evidence & M&E" + ], + "description": "Record actual values for indicators (M08)", + "operationId": "recordindicatoramount", + "parameters": [ + { + "name": "indicatorId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "actualAmount", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/evidence": { + "put": { + "tags": [ + "Evidence & M&E" + ], + "description": "Updates a specific evidence record metadata", + "operationId": "updateevidence", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/UpdateEvidenceRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/communications/invites/applicants/{applicantUserId}": { + "get": { + "tags": [ + "Communications" + ], + "description": "Gets an applicant's invite", + "operationId": "getapplicantinvite", + "parameters": [ + { + "name": "applicantUserId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Invite" + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/communications/invites/{applicantUserId}": { + "get": { + "tags": [ + "Communications" + ], + "description": "Gets an applicant's invite list", + "operationId": "getapplicantinvites", + "parameters": [ + { + "name": "applicantUserId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invite" + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/communications/invites/{page}/{pageSize}": { + "get": { + "tags": [ + "Communications" + ], + "description": "Get a list of sent invitations", + "operationId": "getinvites", + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invite" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/communications/norifications/{organisationId}": { + "get": { + "tags": [ + "Communications" + ], + "description": "Retrieves the notification system report", + "operationId": "getnotifications", + "parameters": [ + { + "name": "organisationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found", + "content": { + "application/json; version=1": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + }, + "security": [ + {} + ] + } + }, + "/v1/api/communications/invites": { + "post": { + "tags": [ + "Communications" + ], + "description": "Trigger an invite to an organization or candidate (specifying NotificationPlatform)", + "operationId": "sendinvite", + "requestBody": { + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/InviteRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/Invite" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json; version=1": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + {} + ] + } + } + }, + "components": { + "schemas": { + "Activity": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "approvedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "category": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "performedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "ActivityStatus": { + "type": "integer" + }, + "ApprovalStatus": { + "type": "integer" + }, + "Award": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "approvedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "Beneficiary": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "userId": { + "type": "string", + "format": "uuid" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "category": { + "type": [ + "null", + "string" + ] + }, + "targetCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "reachedCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "location": { + "type": [ + "null", + "string" + ] + } + } + }, + "Budget": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "approvedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "ChangeRequest": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "justification": { + "type": [ + "null", + "string" + ] + }, + "revisedBudget": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "null", + "number", + "string" + ], + "format": "double" + }, + "revisedEndedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "approvedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "ComplianceItem": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "requirements": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "verifiedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "Contract": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "awardId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "externalSignatureId": { + "type": [ + "null", + "string" + ] + }, + "signedDocumentUrl": { + "type": [ + "null", + "string" + ] + }, + "effectiveAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "expiresAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "totalValue": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "status": { + "$ref": "#/components/schemas/ContractStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "ContractStatus": { + "type": "integer" + }, + "CreateActivityRequest": { + "required": [ + "projectId", + "milestoneId", + "category", + "amount", + "title", + "description", + "performedAt" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "category": { + "type": "string" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "performedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "CreateAwardRequest": { + "required": [ + "organisationId", + "programmeId", + "amount" + ], + "type": "object", + "properties": { + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "CreateBeneficiaryRequest": { + "required": [ + "projectId", + "name", + "category", + "location", + "targetCount", + "reachedCount" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "category": { + "type": "string" + }, + "location": { + "type": "string" + }, + "targetCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "reachedCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + } + } + }, + "CreateBudgetRequest": { + "required": [ + "projectId", + "name", + "amount" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "CreateChangeRequest": { + "required": [ + "projectId", + "title", + "justification", + "revisedBudget", + "revisionDate" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "justification": { + "type": "string" + }, + "revisedBudget": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "revisionDate": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateComplianceItemRequest": { + "required": [ + "projectId", + "title", + "requirements" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "requirements": { + "type": "string" + } + } + }, + "CreateContractRequest": { + "required": [ + "awardId", + "totalValue", + "effectiveAt", + "expiresAt" + ], + "type": "object", + "properties": { + "awardId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "totalValue": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "effectiveAt": { + "type": "string", + "format": "date-time" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateDisbursementRequest": { + "required": [ + "projectId", + "milestoneId", + "amount" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "CreateIndicatorRequest": { + "required": [ + "projectId", + "name", + "unitOfMeasure", + "baselineAmount", + "targetAmount" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "unitOfMeasure": { + "$ref": "#/components/schemas/UnitOfMeasure" + }, + "baselineAmount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "targetAmount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "CreateInstrumentRequest": { + "required": [ + "programmeId", + "name", + "code", + "description" + ], + "type": "object", + "properties": { + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "CreateIssueRequest": { + "required": [ + "projectId", + "title", + "description", + "priority", + "assignedTo" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + }, + "assignedTo": { + "type": "string", + "format": "uuid" + } + } + }, + "CreateMilestoneRequest": { + "required": [ + "projectId", + "dueAt", + "name", + "priority" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "dueAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + } + } + }, + "CreateOrganisationRequest": { + "required": [ + "name", + "registrationNo", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "registrationNo": { + "type": "string" + }, + "email": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/OrganisationType" + } + } + }, + "CreateOutcomeRequest": { + "required": [ + "beneficiaryId", + "name", + "description" + ], + "type": "object", + "properties": { + "beneficiaryId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "CreatePortfolioRequest": { + "required": [ + "name", + "description", + "organisationId", + "ownerId" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "ownerId": { + "type": "string", + "format": "uuid" + } + } + }, + "CreateProgrammeRequest": { + "required": [ + "portfolioId", + "name", + "ownerId" + ], + "type": "object", + "properties": { + "portfolioId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "ownerId": { + "type": "string", + "format": "uuid" + } + } + }, + "CreateProjectRequest": { + "required": [ + "programmeId", + "name", + "description", + "sector", + "projectType" + ], + "type": "object", + "properties": { + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "sector": { + "$ref": "#/components/schemas/IndustrySector" + }, + "projectType": { + "$ref": "#/components/schemas/ProjectType" + } + } + }, + "CreateRiskRequest": { + "required": [ + "projectId", + "likelihood", + "impact", + "name", + "description" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "likelihood": { + "$ref": "#/components/schemas/RiskLikelihood" + }, + "impact": { + "$ref": "#/components/schemas/RiskImpact" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "CreateRuleRequest": { + "required": [ + "programmeId", + "userId", + "name", + "description" + ], + "type": "object", + "properties": { + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "userId": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "CreateSiteVisitRequest": { + "required": [ + "projectId", + "inspectorName", + "findings", + "visitedAt" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "inspectorName": { + "type": "string" + }, + "findings": { + "type": "string" + }, + "visitedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateTenantRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "Dashboard": { + "required": [ + "portfolioValue", + "activeAwards", + "disbursed", + "onTrackPercentage", + "atRiskCount", + "beneficiariesReached" + ], + "type": "object", + "properties": { + "portfolioValue": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "activeAwards": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "disbursed": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "onTrackPercentage": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "atRiskCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "beneficiariesReached": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + } + } + }, + "Disbursement": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "Evidence": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "indicatorId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "activityId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "version": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "type": { + "$ref": "#/components/schemas/EvidenceType" + }, + "documentUrl": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "EvidenceType": { + "type": "integer" + }, + "ExecuteContractRequest": { + "required": [ + "contractId", + "externalSignatureId", + "signedDocumentUrl" + ], + "type": "object", + "properties": { + "contractId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "externalSignatureId": { + "type": "string" + }, + "signedDocumentUrl": { + "type": "string" + } + } + }, + "Indicator": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "unitOfMeasure": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UnitOfMeasure" + } + ] + }, + "baselineAmount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "targetAmount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "actualAmount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "IndustrySector": { + "type": "integer" + }, + "Instrument": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "code": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "Invite": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "invitedOrganisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "awardId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "contractId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "recipient": { + "type": "string", + "format": "uuid" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + } + } + }, + "InviteRequest": { + "required": [ + "organisationId", + "invitedOrganisationId", + "awardId", + "contractId", + "recipient", + "message", + "platform" + ], + "type": "object", + "properties": { + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "invitedOrganisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "awardId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "contractId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "recipient": { + "type": "string", + "format": "uuid" + }, + "message": { + "type": "string" + }, + "platform": { + "$ref": "#/components/schemas/NotificationPlatform" + } + } + }, + "Issue": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "priority": { + "$ref": "#/components/schemas/Priority" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "assignedTo": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "resolvedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "resolution": { + "type": [ + "null", + "string" + ] + } + } + }, + "Milestone": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "dueAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + } + } + }, + "Notification": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "recipient": { + "type": "string", + "format": "uuid" + }, + "platform": { + "$ref": "#/components/schemas/NotificationPlatform" + }, + "status": { + "$ref": "#/components/schemas/NotificationStatus" + }, + "subject": { + "type": [ + "null", + "string" + ] + }, + "message": { + "type": [ + "null", + "string" + ] + }, + "destination": { + "type": [ + "null", + "string" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "error": { + "type": [ + "null", + "string" + ] + } + } + }, + "NotificationPlatform": { + "type": "integer" + }, + "NotificationStatus": { + "type": "integer" + }, + "Organisation": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "registrationNo": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "type": { + "$ref": "#/components/schemas/OrganisationType" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "OrganisationType": { + "type": "integer", + "default": 5 + }, + "Outcome": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "beneficiaryId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + } + } + }, + "Pagination": { + "type": "object", + "properties": { + "index": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "page": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "pageSize": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + } + } + }, + "Portfolio": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "ownedBy": { + "type": "string", + "format": "uuid" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + } + } + }, + "Priority": { + "type": "integer" + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": [ + "null", + "string" + ] + }, + "title": { + "type": [ + "null", + "string" + ] + }, + "status": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int32" + }, + "detail": { + "type": [ + "null", + "string" + ] + }, + "instance": { + "type": [ + "null", + "string" + ] + } + } + }, + "Programme": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "portfolioId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "ownedBy": { + "type": "string", + "format": "uuid" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "Project": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "startedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "endedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "sector": { + "$ref": "#/components/schemas/IndustrySector" + }, + "projectType": { + "$ref": "#/components/schemas/ProjectType" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "ProjectType": { + "type": "integer" + }, + "Risk": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "likelihood": { + "$ref": "#/components/schemas/RiskLikelihood" + }, + "impact": { + "$ref": "#/components/schemas/RiskImpact" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + } + } + }, + "RiskImpact": { + "type": "integer" + }, + "RiskLikelihood": { + "type": "integer" + }, + "Rule": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "version": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "SiteVisit": { + "type": "object", + "properties": { + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "visitedAt": { + "type": "string", + "format": "date-time" + }, + "inspectorName": { + "type": [ + "null", + "string" + ] + }, + "findings": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + } + }, + "Tenant": { + "type": "object", + "properties": { + "creator": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/User" + } + ] + }, + "updator": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/User" + } + ] + }, + "id": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "string", + "format": "uuid" + }, + "updatedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "updatedBy": { + "type": [ + "null", + "string" + ], + "format": "uuid" + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "UnitOfMeasure": { + "type": "integer" + }, + "UpdateBeneficiaryRequest": { + "required": [ + "beneficiaryId", + "name", + "category", + "location", + "targetCount", + "reachedCount" + ], + "type": "object", + "properties": { + "beneficiaryId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "category": { + "type": "string" + }, + "location": { + "type": "string" + }, + "targetCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "reachedCount": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + } + } + }, + "UpdateChangeRequest": { + "required": [ + "changeRequestId", + "title", + "justification", + "revisedBudget", + "status" + ], + "type": "object", + "properties": { + "changeRequestId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "justification": { + "type": "string" + }, + "revisedBudget": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateComplianceItemRequest": { + "required": [ + "complianceItemId", + "title", + "requirements", + "status" + ], + "type": "object", + "properties": { + "complianceItemId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "requirements": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateContractRequest": { + "required": [ + "contractId", + "status" + ], + "type": "object", + "properties": { + "contractId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "status": { + "$ref": "#/components/schemas/ContractStatus" + } + } + }, + "UpdateDisbursementRequest": { + "required": [ + "disbursementId", + "milestoneId", + "amount" + ], + "type": "object", + "properties": { + "disbursementId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "null", + "integer", + "string" + ], + "format": "int64" + }, + "amount": { + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "type": [ + "number", + "string" + ], + "format": "double" + } + } + }, + "UpdateEvidenceRequest": { + "required": [ + "evidenceId", + "version", + "evidenceType", + "status" + ], + "type": "object", + "properties": { + "evidenceId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "version": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + }, + "evidenceType": { + "$ref": "#/components/schemas/EvidenceType" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateInstrumentRequest": { + "required": [ + "instructionId", + "name", + "code", + "description", + "status" + ], + "type": "object", + "properties": { + "instructionId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "UpdateIssueRequest": { + "required": [ + "issueId", + "title", + "description", + "resolution", + "resolvedAt", + "priority", + "status", + "assignedTo" + ], + "type": "object", + "properties": { + "issueId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "resolvedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + }, + "assignedTo": { + "type": "string", + "format": "uuid" + } + } + }, + "UpdateMilestoneRequest": { + "required": [ + "milestoneId", + "dueAt", + "name", + "priority", + "status" + ], + "type": "object", + "properties": { + "milestoneId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "dueAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "priority": { + "$ref": "#/components/schemas/Priority" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateOrganisationRequest": { + "required": [ + "organisationId", + "name", + "registrationNo", + "email", + "type", + "status" + ], + "type": "object", + "properties": { + "organisationId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "registrationNo": { + "type": "string" + }, + "email": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/OrganisationType" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "UpdateOutcomeRequest": { + "required": [ + "outcomeId", + "name", + "description" + ], + "type": "object", + "properties": { + "outcomeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "UpdatePortfolioRequest": { + "required": [ + "portfolioId", + "name", + "description", + "ownerId" + ], + "type": "object", + "properties": { + "portfolioId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "ownerId": { + "type": "string", + "format": "uuid" + } + } + }, + "UpdateProgrammeRequest": { + "required": [ + "programmeId", + "name", + "ownerId", + "status" + ], + "type": "object", + "properties": { + "programmeId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "ownerId": { + "type": "string", + "format": "uuid" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateProjectRequest": { + "required": [ + "projectId", + "name", + "description", + "startedAt", + "endedAt", + "sector", + "projectType" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "startedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "endedAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "sector": { + "$ref": "#/components/schemas/IndustrySector" + }, + "projectType": { + "$ref": "#/components/schemas/ProjectType" + } + } + }, + "UpdateProjectStatusRequest": { + "required": [ + "projectId", + "status" + ], + "type": "object", + "properties": { + "projectId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + } + } + }, + "UpdateRiskRequest": { + "required": [ + "riskId", + "likelihood", + "impact", + "name", + "description" + ], + "type": "object", + "properties": { + "riskId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "likelihood": { + "$ref": "#/components/schemas/RiskLikelihood" + }, + "impact": { + "$ref": "#/components/schemas/RiskImpact" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "UpdateRuleRequest": { + "required": [ + "ruleId", + "userId", + "name", + "description", + "status", + "version" + ], + "type": "object", + "properties": { + "ruleId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "userId": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + }, + "version": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int32" + } + } + }, + "UpdateSiteVisitRequest": { + "required": [ + "siteVisitId", + "inspectorName", + "findings", + "status", + "visitedAt" + ], + "type": "object", + "properties": { + "siteVisitId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "inspectorName": { + "type": "string" + }, + "findings": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ApprovalStatus" + }, + "visitedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "UpdateTenantRequest": { + "required": [ + "tenantId", + "name", + "status" + ], + "type": "object", + "properties": { + "tenantId": { + "pattern": "^-?(?:0|[1-9]\\d*)$", + "type": [ + "integer", + "string" + ], + "format": "int64" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "lastLoginAt": { + "type": [ + "null", + "string" + ], + "format": "date-time" + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ActivityStatus" + } + } + }, + "UserFilterRequest": { + "type": "object", + "properties": { + "status": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ActivityStatus" + } + ] + }, + "email": { + "type": [ + "null", + "string" + ] + }, + "sortBy": { + "type": [ + "null", + "string" + ] + }, + "sortDescending": { + "type": "boolean", + "default": false + } + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "description": "JWT Authorization header using the Bearer scheme", + "scheme": "bearer" + }, + "OAuth2": { + "type": "oauth2", + "description": "Interactive OAuth2 flow for authentication and authorization", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://sts.security.khongisa.co.za/connect/authorize", + "tokenUrl": "https://sts.security.khongisa.co.za/connect/token", + "scopes": { + "openid": "OpenID Connect", + "profile": "User Profile", + "roles": "User Roles", + "email": "User Email", + "address": "User Address", + "pfm-api-dev": "PFM API Scope" + } + } + } + } + } + }, + "tags": [ + { + "name": "Users" + }, + { + "name": "Projects" + }, + { + "name": "Grants" + }, + { + "name": "Governance" + }, + { + "name": "Execution" + }, + { + "name": "Evidence & M&E" + }, + { + "name": "Communications" + } + ] +} \ No newline at end of file diff --git a/PostFundManagement.ConsoleUI/package.json b/PostFundManagement.ConsoleUI/package.json index 000793a..aa6f424 100644 --- a/PostFundManagement.ConsoleUI/package.json +++ b/PostFundManagement.ConsoleUI/package.json @@ -23,6 +23,8 @@ "dotenv": "^17.2.3", "express": "^4.21.2", "hashids": "^2.3.0", + "jspdf": "^4.2.1", + "jspdf-autotable": "^5.0.8", "lucide-react": "^0.546.0", "motion": "^12.23.24", "oidc-client-ts": "^3.5.0", @@ -32,6 +34,7 @@ "react-router-dom": "^7.18.3", "tailwindcss": "^4.1.14", "vite": "^6.2.3", + "xlsx": "^0.18.5", "zod": "^3.25.76" }, "devDependencies": { diff --git a/PostFundManagement.ConsoleUI/src/components/governance/InstructionsSection.tsx b/PostFundManagement.ConsoleUI/src/components/governance/InstructionsSection.tsx index 33a8df4..cbee4f7 100644 --- a/PostFundManagement.ConsoleUI/src/components/governance/InstructionsSection.tsx +++ b/PostFundManagement.ConsoleUI/src/components/governance/InstructionsSection.tsx @@ -17,19 +17,23 @@ import { Tag, CheckCircle2, AlertCircle, + Coins, } from 'lucide-react'; import { Modal } from '../ui/Modal'; import { HelpTooltip } from '../ui/HelpTooltip'; import { useToast } from '../ui/Toast'; +import { ExportButton } from '../ui/ExportButton'; +import { ExportColumn } from '../../utils/exportUtils'; import { + Instrument, Instruction, Programme, ActivityStatus, } from '../../types'; import { - getAllInstructions, - createInstruction, - updateInstruction, + getAllInstruments, + createInstrument, + updateInstrument, } from '../../services/api'; import { getActivityStatusBadge, @@ -38,17 +42,17 @@ import { ACTIVITY_STATUS_OPTIONS, } from '../../lib/formatters'; -const instructionSchema = z.object({ +const instrumentSchema = z.object({ programmeId: z.coerce.number().min(1, 'Please select an associated programme'), - name: z.string().min(3, 'Instruction title must be at least 3 characters'), + name: z.string().min(3, 'Funding instrument title must be at least 3 characters'), code: z.string().optional(), description: z.string().min(5, 'Description is required (minimum 5 characters)'), status: z.coerce.number().default(ActivityStatus.Active), }); -type InstructionFormValues = z.infer; +type InstrumentFormValues = z.infer; -interface InstructionsSectionProps { +interface FundingInstrumentsSectionProps { programmes: Programme[]; currentUserId: string; preselectedProgrammeId?: string | number | null; @@ -57,7 +61,7 @@ interface InstructionsSectionProps { onCloseCreateModalExternal?: () => void; } -export const InstructionsSection: React.FC = ({ +export const FundingInstrumentsSection: React.FC = ({ programmes, currentUserId, preselectedProgrammeId, @@ -76,27 +80,12 @@ export const InstructionsSection: React.FC = ({ // Modals const [isModalOpen, setIsModalOpen] = useState(false); - const [editingInstruction, setEditingInstruction] = useState(null); - const [inspectingInstruction, setInspectingInstruction] = useState(null); - - // Sync external create modal trigger if provided - React.useEffect(() => { - if (isCreateModalOpenExternal) { - setEditingInstruction(null); - instructionForm.reset({ - programmeId: preselectedProgrammeId ? Number(preselectedProgrammeId) : (programmes[0]?.id ? Number(programmes[0].id) : 0), - name: '', - code: '', - description: '', - status: ActivityStatus.Active, - }); - setIsModalOpen(true); - } - }, [isCreateModalOpenExternal, preselectedProgrammeId, programmes]); + const [editingInstrument, setEditingInstrument] = useState(null); + const [inspectingInstrument, setInspectingInstrument] = useState(null); // Form setup - const instructionForm = useForm({ - resolver: zodResolver(instructionSchema), + const instrumentForm = useForm({ + resolver: zodResolver(instrumentSchema), defaultValues: { programmeId: programmes[0]?.id ? Number(programmes[0].id) : 0, name: '', @@ -106,15 +95,30 @@ export const InstructionsSection: React.FC = ({ }, }); - // Query: Get all instructions + // Sync external create modal trigger if provided + React.useEffect(() => { + if (isCreateModalOpenExternal) { + setEditingInstrument(null); + instrumentForm.reset({ + programmeId: preselectedProgrammeId ? Number(preselectedProgrammeId) : (programmes[0]?.id ? Number(programmes[0].id) : 0), + name: '', + code: '', + description: '', + status: ActivityStatus.Active, + }); + setIsModalOpen(true); + } + }, [isCreateModalOpenExternal, preselectedProgrammeId, programmes, instrumentForm]); + + // Query: Get all funding instruments primarily from API const { - data: instructions = [], + data: instruments = [], isLoading, isFetching, refetch, } = useQuery({ - queryKey: ['all-instructions', programmes], - queryFn: () => getAllInstructions(programmes), + queryKey: ['all-instruments', programmes], + queryFn: () => getAllInstruments(programmes), }); // Programme lookup helper @@ -124,12 +128,14 @@ export const InstructionsSection: React.FC = ({ return map; }, [programmes]); - // Mutation: Create or Update Instruction + // Mutation: Create or Update Funding Instrument const mutation = useMutation({ - mutationFn: async (data: InstructionFormValues) => { - if (editingInstruction) { - await updateInstruction({ - instructionId: editingInstruction.id, + mutationFn: async (data: InstrumentFormValues) => { + if (editingInstrument) { + await updateInstrument({ + instructionId: editingInstrument.id, + instrumentId: editingInstrument.id, + id: editingInstrument.id, programmeId: data.programmeId, code: data.code, name: data.name, @@ -138,7 +144,7 @@ export const InstructionsSection: React.FC = ({ userId: currentUserId, }); } else { - await createInstruction({ + await createInstrument({ programmeId: data.programmeId, code: data.code, name: data.name, @@ -149,27 +155,28 @@ export const InstructionsSection: React.FC = ({ } }, onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['all-instruments'] }); queryClient.invalidateQueries({ queryKey: ['all-instructions'] }); queryClient.invalidateQueries({ queryKey: ['instruments'] }); success( - editingInstruction ? 'Instruction Updated' : 'Instruction Created', - editingInstruction - ? 'Funding instruction record updated successfully.' - : 'New funding instruction attached to programme successfully.' + editingInstrument ? 'Funding Instrument Updated' : 'Funding Instrument Created', + editingInstrument + ? 'Funding instrument record updated successfully via the API.' + : 'New funding instrument created and linked to strategic programme successfully.' ); setIsModalOpen(false); - setEditingInstruction(null); + setEditingInstrument(null); if (onCloseCreateModalExternal) onCloseCreateModalExternal(); }, onError: (err: any) => { - toastError('Save Failed', err?.message || 'Failed to save instruction'); + toastError('Save Failed', err?.message || 'Failed to save funding instrument'); }, }); // Handlers const openCreateModal = (programmeId?: number | string) => { - setEditingInstruction(null); - instructionForm.reset({ + setEditingInstrument(null); + instrumentForm.reset({ programmeId: programmeId ? Number(programmeId) : selectedProgrammeFilter !== 'all' @@ -185,9 +192,9 @@ export const InstructionsSection: React.FC = ({ setIsModalOpen(true); }; - const openEditModal = (inst: Instruction) => { - setEditingInstruction(inst); - instructionForm.reset({ + const openEditModal = (inst: Instrument) => { + setEditingInstrument(inst); + instrumentForm.reset({ programmeId: Number(inst.programmeId), name: inst.name || '', code: inst.code || '', @@ -199,13 +206,13 @@ export const InstructionsSection: React.FC = ({ const handleCloseModal = () => { setIsModalOpen(false); - setEditingInstruction(null); + setEditingInstrument(null); if (onCloseCreateModalExternal) onCloseCreateModalExternal(); }; - // Filter instructions - const filteredInstructions = useMemo(() => { - return instructions.filter((inst) => { + // Filter funding instruments + const filteredInstruments = useMemo(() => { + return instruments.filter((inst) => { // Programme filter if (selectedProgrammeFilter !== 'all' && String(inst.programmeId) !== String(selectedProgrammeFilter)) { return false; @@ -228,7 +235,29 @@ export const InstructionsSection: React.FC = ({ } return true; }); - }, [instructions, selectedProgrammeFilter, statusFilter, searchTerm, programmeMap]); + }, [instruments, selectedProgrammeFilter, statusFilter, searchTerm, programmeMap]); + + // Export columns definition + const instrumentExportColumns: ExportColumn[] = useMemo( + () => [ + { header: 'Instrument ID', key: 'id' }, + { header: 'Instrument Code', key: 'code', format: (val) => val || '—' }, + { header: 'Title / Name', key: 'name', format: (val) => val || 'Untitled' }, + { + header: 'Strategic Programme', + key: 'programmeId', + format: (val) => programmeMap.get(String(val))?.name || `Programme #${val}`, + }, + { + header: 'Status', + key: 'status', + format: (val) => (Number(val) === ActivityStatus.Active ? 'Active' : 'Inactive'), + }, + { header: 'Description', key: 'description', format: (val) => val || '—' }, + { header: 'Created Date', key: 'createdAt', format: (val) => (val ? formatDate(val) : '—') }, + ], + [programmeMap] + ); return (
@@ -240,7 +269,7 @@ export const InstructionsSection: React.FC = ({ setSearchTerm(e.target.value)} className="w-full pl-9 pr-4 py-2.5 text-xs bg-[#090d16] border border-slate-700/80 rounded-xl focus:outline-none focus:ring-1 focus:ring-blue-500 text-slate-200 placeholder:text-slate-500 transition shadow-xs" @@ -290,60 +319,72 @@ export const InstructionsSection: React.FC = ({
- {/* Action Buttons */} + {/* Action Buttons: Refresh, Export & Add */}
+ + +
- {/* Instructions Table & Cards */} + {/* Funding Instruments Table & Cards */}
- +

- Funding Instructions & Instrument Guidelines ({filteredInstructions.length}) + Funding Instruments & Financing Directives ({filteredInstruments.length})

- {filteredInstructions.length} of {instructions.length} recorded + {filteredInstruments.length} of {instruments.length} recorded
{isLoading ? (
- Loading instructions directory... + Loading funding instruments directory...
- ) : filteredInstructions.length === 0 ? ( + ) : filteredInstruments.length === 0 ? (
{searchTerm || selectedProgrammeFilter !== 'all' || statusFilter !== 'all' - ? 'No funding instructions match the active filters.' - : 'No funding instructions registered yet. Link instructions to programmes using the button below.'} + ? 'No funding instruments match the active filters.' + : 'No funding instruments registered yet. Link funding instruments to programmes using the button below.'}
) : ( @@ -360,7 +401,7 @@ export const InstructionsSection: React.FC = ({ Code / Ref - Instruction Title + Instrument Title Associated Programme Status Created Info @@ -368,7 +409,7 @@ export const InstructionsSection: React.FC = ({ - {filteredInstructions.map((inst) => { + {filteredInstruments.map((inst) => { const statusBadge = getActivityStatusBadge(inst.status); const parentProg = programmeMap.get(String(inst.programmeId)); @@ -416,9 +457,9 @@ export const InstructionsSection: React.FC = ({
- {/* Modal: Create / Edit Instruction */} + {/* Modal: Create / Edit Funding Instrument */}
mutation.mutate(data))} + onSubmit={instrumentForm.handleSubmit((data) => mutation.mutate(data))} className="space-y-4" > {/* Associated Programme Dropdown */} @@ -467,12 +508,12 @@ export const InstructionsSection: React.FC = ({
- {instructionForm.formState.errors.programmeId && ( + {instrumentForm.formState.errors.programmeId && (

- {instructionForm.formState.errors.programmeId.message} + {instrumentForm.formState.errors.programmeId.message}

)} @@ -493,23 +534,23 @@ export const InstructionsSection: React.FC = ({
- {instructionForm.formState.errors.name && ( + {instrumentForm.formState.errors.name && (

- {instructionForm.formState.errors.name.message} + {instrumentForm.formState.errors.name.message}

)}
@@ -518,10 +559,10 @@ export const InstructionsSection: React.FC = ({
@@ -529,7 +570,7 @@ export const InstructionsSection: React.FC = ({
@@ -538,23 +579,23 @@ export const InstructionsSection: React.FC = ({