From 4e5583afaa0467dfa6fb39505cfac7902fc50520 Mon Sep 17 00:00:00 2001 From: Craig Yu Date: Tue, 19 Nov 2024 16:30:36 -0800 Subject: [PATCH] feat: frontend stability refactor (#1658) --- .github/workflows/sonar.yml | 324 +- .vscode/settings.json | 20 +- client-code-gen/admin-management-openapi.json | 946 ++++- .../app-access-control-openapi.json | 3130 ++++++++--------- .../model/fam-application-base.ts | 6 + .../model/fam-forest-client-base.ts | 6 + .../model/fam-role-dto.ts | 8 +- .../model/fam-role-with-client-dto.ts | 12 + .../admin-management-api/package-lock.json | 246 +- .../gen/admin-management-api/package.json | 61 +- .../.openapi-generator/FILES | 1 - .../app-access-control-api/package-lock.json | 272 +- .../gen/app-access-control-api/package.json | 62 +- frontend/package-lock.json | 161 +- frontend/package.json | 9 +- frontend/src/App.vue | 46 +- frontend/src/assets/styles/card.scss | 72 +- frontend/src/assets/styles/default-theme.scss | 63 +- frontend/src/assets/styles/icon.scss | 6 +- frontend/src/assets/styles/layout.scss | 56 +- frontend/src/assets/styles/styles.scss | 62 +- frontend/src/assets/styles/themes.scss | 17 + .../AddPermissions/ForestClientCard.vue | 174 + .../AddPermissions/ForestClientSection.vue | 400 +++ .../AddPermissions/RoleSelectTable.vue | 90 + .../UserDomainSelect.vue | 34 +- .../AddPermissions/UserIdentityCard.vue | 81 + .../AddPermissions/UserNameSection.vue | 208 ++ .../src/components/AuthCallbackHandler.vue | 13 - .../{CardTextCol => CardColumn}/index.vue | 32 +- frontend/src/components/Landing.vue | 59 - .../ConfirmDialogText.vue | 14 + .../NewUserTag.vue | 0 .../TablePlaceholder.vue | 24 +- .../ManagePermissionsTable/index.vue | 642 ++++ .../ManagePermissionsTable/utils.ts | 273 ++ .../components/MyPermissionsTable/index.vue | 138 + .../components/MyPermissionsTable/utils.ts | 109 + .../components/Skeletons/InputSkeleton.vue | 14 + .../src/components/Skeletons/PSkeleton.vue | 8 + .../components/Skeletons/TableSkeleton.vue | 54 + .../src/components/Table/TableHeaderTitle.vue | 33 + .../src/components/Table/TableToolbar.vue | 84 + .../src/components/TableSkeleton/index.vue | 36 - .../{common => }/TermsAndConditions.vue | 242 +- .../{common => UI}/BoolCheckbox.vue | 12 +- .../index.vue => UI/BreadCrumbs.vue} | 9 +- frontend/src/components/UI/Button.vue | 100 + frontend/src/components/UI/Chip.vue | 44 + .../src/components/{common => UI}/Divider.vue | 6 +- frontend/src/components/UI/Dropdown.vue | 51 + frontend/src/components/UI/ErrorText.vue | 31 + .../src/components/UI/NotificationMessage.vue | 107 + frontend/src/components/UI/PageTitle.vue | 43 + frontend/src/components/UI/Spinner.vue | 50 + frontend/src/components/UI/StepContainer.vue | 40 + .../ChangePerformerCol.vue | 8 +- .../OrganizationList.vue | 21 +- .../PermissionDetailsCol.vue | 67 +- .../UserPermissionHistoryTable/index.vue | 137 +- .../components/UserSummaryCard/constants.ts | 2 +- .../src/components/UserSummaryCard/index.vue | 89 +- frontend/src/components/common/Button.vue | 80 - frontend/src/components/common/Icon.vue | 125 - .../components/common/NotificationMessage.vue | 92 - .../components/common/NotificationStack.vue | 38 - frontend/src/components/common/PageTitle.vue | 55 - frontend/src/components/common/SideNav.vue | 149 - .../src/components/common/ToastMessage.vue | 44 - .../grantaccess/ForestClientCard.vue | 192 - .../components/grantaccess/GrantAccess.vue | 259 -- .../grantaccess/GrantApplicationAdmin.vue | 163 - .../grantaccess/GrantDelegatedAdmin.vue | 287 -- .../components/grantaccess/StepContainer.vue | 50 - .../grantaccess/UserIdentityCard.vue | 62 - .../grantaccess/form/ForestClientInput.vue | 209 -- .../grantaccess/form/RoleSelect.vue | 61 - .../grantaccess/form/RoleSelectTable.vue | 77 - .../grantaccess/form/UserNameInput.vue | 201 -- .../managePermissions/ConfirmDialogText.vue | 31 - .../managePermissions/ManagePermissions.vue | 315 -- .../ManagePermissionsTitle.vue | 19 - .../table/ApplicationAdminTable.vue | 193 - .../table/DataTableHeader.vue | 136 - .../table/DelegatedAdminTable.vue | 217 -- .../managePermissions/table/UserDataTable.vue | 173 - .../managePermissions/table/utils.ts | 13 - .../myPermissions/MyPermissions.vue | 12 - .../myPermissions/MyPermissionsTable.vue | 99 - frontend/src/composables/useAuth.ts | 35 + .../{DateFormat.ts => DateFormats.ts} | 0 frontend/src/constants/InjectionKeys.ts | 1 + frontend/src/constants/SideNavConfig.ts | 28 + frontend/src/constants/TimeUnits.ts | 8 +- frontend/src/constants/constants.ts | 20 +- frontend/src/enum/IconEnum.ts | 11 - frontend/src/enum/SeverityEnum.ts | 21 - frontend/src/enum/TabEnum.ts | 5 - frontend/src/errors/FamCustomError.ts | 34 - .../{components/header => layouts}/Header.vue | 59 +- .../common => layouts}/ProfileSidebar.vue | 178 +- frontend/src/layouts/ProtectedLayout.vue | 142 +- frontend/src/layouts/SideNav.vue | 181 + frontend/src/layouts/SimpleLayout.vue | 4 - frontend/src/main.ts | 88 +- frontend/src/providers/AuthProvider.vue | 323 ++ frontend/src/providers/authState.ts | 16 + frontend/src/router/RouteGuards.ts | 62 + frontend/src/router/index.ts | 220 +- frontend/src/router/routeHandlers.ts | 191 - frontend/src/router/routeItem.ts | 47 - frontend/src/router/routes.ts | 82 + frontend/src/services/ApiServiceFactory.ts | 21 +- frontend/src/services/AuthService.ts | 124 - frontend/src/services/fetchData.ts | 158 - frontend/src/services/http/HttpCommon.ts | 67 - .../services/http/HttpRequestInterceptors.ts | 18 - .../services/http/HttpResponseInterceptors.ts | 62 - frontend/src/services/utils.ts | 63 +- frontend/src/static/sideNav.json | 33 - frontend/src/store/ApplicationState.ts | 49 +- frontend/src/store/BreadcrumbState.ts | 27 - frontend/src/store/Constants.ts | 14 - frontend/src/store/CurrentTabState.ts | 11 - frontend/src/store/FamLoginUserState.ts | 348 -- frontend/src/store/LoadingState.ts | 22 - frontend/src/store/NotificationState.ts | 155 - frontend/src/store/ProfileSidebarState.ts | 16 +- frontend/src/store/SideNavState.ts | 14 +- frontend/src/store/ToastState.ts | 82 - frontend/src/tests/EnvironmentSetting.test.ts | 20 - frontend/src/tests/ForestClientCard.spec.ts | 142 - frontend/src/tests/ForestClientInput.spec.ts | 411 --- .../src/tests/GrantApplicationAdmin.spec.ts | 159 - frontend/src/tests/Landing.spec.ts | 82 - frontend/src/tests/PageTitle.spec.ts | 53 - frontend/src/tests/ProtectedLayout.spec.ts | 19 - frontend/src/tests/UserDomainSelect.spec.ts | 73 - frontend/src/tests/UserIdentityCard.spec.ts | 114 - frontend/src/tests/UserNameInput.spec.ts | 404 --- frontend/src/tests/common/ForestClientData.ts | 15 - frontend/src/tests/common/fixJsdomCssErr.ts | 12 - frontend/src/tests/readme.md | 7 - frontend/src/types/AuthTypes.ts | 35 + frontend/src/types/BreadCrumbTypes.ts | 8 +- frontend/src/types/ManagePermissionsTypes.ts | 17 + frontend/src/types/NotificationTypes.ts | 21 + frontend/src/types/RouteTypes.ts | 8 + frontend/src/types/SideNavTypes.ts | 26 + frontend/src/types/TableTypes.ts | 2 +- frontend/src/utils/ApiUtils.ts | 90 + frontend/src/utils/DateUtils.ts | 12 +- frontend/src/utils/UserUtils.ts | 33 +- frontend/src/views/AddAppPermission/index.vue | 445 +++ frontend/src/views/AddAppPermission/utils.ts | 167 + frontend/src/views/AddFamPermission/index.vue | 237 ++ frontend/src/views/AddFamPermission/utils.ts | 50 + frontend/src/views/GrantAccessView.vue | 7 - .../src/views/GrantApplicationAdminView.vue | 7 - .../src/views/GrantDelegatedAdminView.vue | 7 - frontend/src/views/LandingView.vue | 7 - frontend/src/views/LandingView/index.vue | 96 + frontend/src/views/ManagePermissionsView.vue | 7 - .../NotificationStack.vue | 49 + .../src/views/ManagePermissionsView/index.vue | 343 ++ .../src/views/ManagePermissionsView/utils.ts | 266 ++ frontend/src/views/MyPermissions/index.vue | 24 + frontend/src/views/MyPermissionsView.vue | 7 - frontend/src/views/NoAccess/index.vue | 47 + .../NotFound.vue => views/NotFound/index.vue} | 6 +- frontend/src/views/UserDetails/index.vue | 102 +- frontend/tsconfig.config.json | 2 +- frontend/tsconfig.json | 28 +- frontend/vite.config.ts | 56 +- 174 files changed, 9581 insertions(+), 9699 deletions(-) create mode 100644 frontend/src/assets/styles/themes.scss create mode 100644 frontend/src/components/AddPermissions/ForestClientCard.vue create mode 100644 frontend/src/components/AddPermissions/ForestClientSection.vue create mode 100644 frontend/src/components/AddPermissions/RoleSelectTable.vue rename frontend/src/components/{grantaccess/form => AddPermissions}/UserDomainSelect.vue (64%) create mode 100644 frontend/src/components/AddPermissions/UserIdentityCard.vue create mode 100644 frontend/src/components/AddPermissions/UserNameSection.vue delete mode 100644 frontend/src/components/AuthCallbackHandler.vue rename frontend/src/components/{CardTextCol => CardColumn}/index.vue (57%) delete mode 100644 frontend/src/components/Landing.vue create mode 100644 frontend/src/components/ManagePermissionsTable/ConfirmDialogText.vue rename frontend/src/components/{common => ManagePermissionsTable}/NewUserTag.vue (100%) rename frontend/src/components/{managePermissions/table => ManagePermissionsTable}/TablePlaceholder.vue (61%) create mode 100644 frontend/src/components/ManagePermissionsTable/index.vue create mode 100644 frontend/src/components/ManagePermissionsTable/utils.ts create mode 100644 frontend/src/components/MyPermissionsTable/index.vue create mode 100644 frontend/src/components/MyPermissionsTable/utils.ts create mode 100644 frontend/src/components/Skeletons/InputSkeleton.vue create mode 100644 frontend/src/components/Skeletons/PSkeleton.vue create mode 100644 frontend/src/components/Skeletons/TableSkeleton.vue create mode 100644 frontend/src/components/Table/TableHeaderTitle.vue create mode 100644 frontend/src/components/Table/TableToolbar.vue delete mode 100644 frontend/src/components/TableSkeleton/index.vue rename frontend/src/components/{common => }/TermsAndConditions.vue (78%) rename frontend/src/components/{common => UI}/BoolCheckbox.vue (85%) rename frontend/src/components/{BreadCrumbs/index.vue => UI/BreadCrumbs.vue} (73%) create mode 100644 frontend/src/components/UI/Button.vue create mode 100644 frontend/src/components/UI/Chip.vue rename frontend/src/components/{common => UI}/Divider.vue (73%) create mode 100644 frontend/src/components/UI/Dropdown.vue create mode 100644 frontend/src/components/UI/ErrorText.vue create mode 100644 frontend/src/components/UI/NotificationMessage.vue create mode 100644 frontend/src/components/UI/PageTitle.vue create mode 100644 frontend/src/components/UI/Spinner.vue create mode 100644 frontend/src/components/UI/StepContainer.vue delete mode 100644 frontend/src/components/common/Button.vue delete mode 100644 frontend/src/components/common/Icon.vue delete mode 100644 frontend/src/components/common/NotificationMessage.vue delete mode 100644 frontend/src/components/common/NotificationStack.vue delete mode 100644 frontend/src/components/common/PageTitle.vue delete mode 100644 frontend/src/components/common/SideNav.vue delete mode 100644 frontend/src/components/common/ToastMessage.vue delete mode 100644 frontend/src/components/grantaccess/ForestClientCard.vue delete mode 100644 frontend/src/components/grantaccess/GrantAccess.vue delete mode 100644 frontend/src/components/grantaccess/GrantApplicationAdmin.vue delete mode 100644 frontend/src/components/grantaccess/GrantDelegatedAdmin.vue delete mode 100644 frontend/src/components/grantaccess/StepContainer.vue delete mode 100644 frontend/src/components/grantaccess/UserIdentityCard.vue delete mode 100644 frontend/src/components/grantaccess/form/ForestClientInput.vue delete mode 100644 frontend/src/components/grantaccess/form/RoleSelect.vue delete mode 100644 frontend/src/components/grantaccess/form/RoleSelectTable.vue delete mode 100644 frontend/src/components/grantaccess/form/UserNameInput.vue delete mode 100644 frontend/src/components/managePermissions/ConfirmDialogText.vue delete mode 100644 frontend/src/components/managePermissions/ManagePermissions.vue delete mode 100644 frontend/src/components/managePermissions/ManagePermissionsTitle.vue delete mode 100644 frontend/src/components/managePermissions/table/ApplicationAdminTable.vue delete mode 100644 frontend/src/components/managePermissions/table/DataTableHeader.vue delete mode 100644 frontend/src/components/managePermissions/table/DelegatedAdminTable.vue delete mode 100644 frontend/src/components/managePermissions/table/UserDataTable.vue delete mode 100644 frontend/src/components/managePermissions/table/utils.ts delete mode 100644 frontend/src/components/myPermissions/MyPermissions.vue delete mode 100644 frontend/src/components/myPermissions/MyPermissionsTable.vue create mode 100644 frontend/src/composables/useAuth.ts rename frontend/src/constants/{DateFormat.ts => DateFormats.ts} (100%) create mode 100644 frontend/src/constants/InjectionKeys.ts create mode 100644 frontend/src/constants/SideNavConfig.ts delete mode 100644 frontend/src/enum/IconEnum.ts delete mode 100644 frontend/src/enum/SeverityEnum.ts delete mode 100644 frontend/src/enum/TabEnum.ts delete mode 100644 frontend/src/errors/FamCustomError.ts rename frontend/src/{components/header => layouts}/Header.vue (65%) rename frontend/src/{components/common => layouts}/ProfileSidebar.vue (50%) create mode 100644 frontend/src/layouts/SideNav.vue delete mode 100644 frontend/src/layouts/SimpleLayout.vue create mode 100644 frontend/src/providers/AuthProvider.vue create mode 100644 frontend/src/providers/authState.ts create mode 100644 frontend/src/router/RouteGuards.ts delete mode 100644 frontend/src/router/routeHandlers.ts delete mode 100644 frontend/src/router/routeItem.ts create mode 100644 frontend/src/router/routes.ts delete mode 100644 frontend/src/services/AuthService.ts delete mode 100644 frontend/src/services/fetchData.ts delete mode 100644 frontend/src/services/http/HttpCommon.ts delete mode 100644 frontend/src/services/http/HttpRequestInterceptors.ts delete mode 100644 frontend/src/services/http/HttpResponseInterceptors.ts delete mode 100644 frontend/src/static/sideNav.json delete mode 100644 frontend/src/store/BreadcrumbState.ts delete mode 100644 frontend/src/store/Constants.ts delete mode 100644 frontend/src/store/CurrentTabState.ts delete mode 100644 frontend/src/store/FamLoginUserState.ts delete mode 100644 frontend/src/store/LoadingState.ts delete mode 100644 frontend/src/store/NotificationState.ts delete mode 100644 frontend/src/store/ToastState.ts delete mode 100644 frontend/src/tests/EnvironmentSetting.test.ts delete mode 100644 frontend/src/tests/ForestClientCard.spec.ts delete mode 100644 frontend/src/tests/ForestClientInput.spec.ts delete mode 100644 frontend/src/tests/GrantApplicationAdmin.spec.ts delete mode 100644 frontend/src/tests/Landing.spec.ts delete mode 100644 frontend/src/tests/PageTitle.spec.ts delete mode 100644 frontend/src/tests/ProtectedLayout.spec.ts delete mode 100644 frontend/src/tests/UserDomainSelect.spec.ts delete mode 100644 frontend/src/tests/UserIdentityCard.spec.ts delete mode 100644 frontend/src/tests/UserNameInput.spec.ts delete mode 100644 frontend/src/tests/common/ForestClientData.ts delete mode 100644 frontend/src/tests/common/fixJsdomCssErr.ts delete mode 100644 frontend/src/tests/readme.md create mode 100644 frontend/src/types/AuthTypes.ts create mode 100644 frontend/src/types/ManagePermissionsTypes.ts create mode 100644 frontend/src/types/NotificationTypes.ts create mode 100644 frontend/src/types/RouteTypes.ts create mode 100644 frontend/src/types/SideNavTypes.ts create mode 100644 frontend/src/utils/ApiUtils.ts create mode 100644 frontend/src/views/AddAppPermission/index.vue create mode 100644 frontend/src/views/AddAppPermission/utils.ts create mode 100644 frontend/src/views/AddFamPermission/index.vue create mode 100644 frontend/src/views/AddFamPermission/utils.ts delete mode 100644 frontend/src/views/GrantAccessView.vue delete mode 100644 frontend/src/views/GrantApplicationAdminView.vue delete mode 100644 frontend/src/views/GrantDelegatedAdminView.vue delete mode 100644 frontend/src/views/LandingView.vue create mode 100644 frontend/src/views/LandingView/index.vue delete mode 100644 frontend/src/views/ManagePermissionsView.vue create mode 100644 frontend/src/views/ManagePermissionsView/NotificationStack.vue create mode 100644 frontend/src/views/ManagePermissionsView/index.vue create mode 100644 frontend/src/views/ManagePermissionsView/utils.ts create mode 100644 frontend/src/views/MyPermissions/index.vue delete mode 100644 frontend/src/views/MyPermissionsView.vue create mode 100644 frontend/src/views/NoAccess/index.vue rename frontend/src/{components/NotFound.vue => views/NotFound/index.vue} (56%) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index e608f56ea..79f87c30d 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -1,180 +1,180 @@ name: SonarCloud analysis on: - pull_request: - push: - branches: - - main + pull_request: + push: + branches: + - main jobs: - ci-auth: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - # Deep fetch is required for SonarCloud - fetch-depth: 0 + ci-auth: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Deep fetch is required for SonarCloud + fetch-depth: 0 - - uses: actions/setup-python@v4 - with: - python-version: 3.12 + - uses: actions/setup-python@v4 + with: + python-version: 3.12 - - name: Tests and coverage - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} - POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} - FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} - run: | - cd server/auth_function - pip install -r requirements.txt -r requirements-dev.txt - pip install pytest-cov - pytest --cov=. --cov-branch --cov-report=xml \ - -v --md=report.md --emoji + - name: Tests and coverage + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} + POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} + FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} + run: | + cd server/auth_function + pip install -r requirements.txt -r requirements-dev.txt + pip install pytest-cov + pytest --cov=. --cov-branch --cov-report=xml \ + -v --md=report.md --emoji + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@v2.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_AUTH }} + with: + projectBaseDir: server/auth_function + args: > + -Dsonar.exclusions=**/test/**/*,config.py + -Dsonar.organization=bcgov-sonarcloud + -Dsonar.projectKey=nr-forests-access-management_auth + -Dsonar.python.coverage.reportPaths=*coverage*.xml + -Dsonar.python.version=3.12 + -Dsonar.sources=. + -Dsonar.tests=test - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@v2.3.0 + ci-backend: + runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_AUTH }} - with: - projectBaseDir: server/auth_function - args: > - -Dsonar.exclusions=**/test/**/*,config.py - -Dsonar.organization=bcgov-sonarcloud - -Dsonar.projectKey=nr-forests-access-management_auth - -Dsonar.python.coverage.reportPaths=*coverage*.xml - -Dsonar.python.version=3.12 - -Dsonar.sources=. - -Dsonar.tests=test + environment: dev + organization: bcgov + USE_POSTGRES: false + steps: + - uses: actions/checkout@v4 + with: + # Deep fetch is required for SonarCloud + fetch-depth: 0 - ci-backend: - runs-on: ubuntu-latest - env: - environment: dev - organization: bcgov - USE_POSTGRES: false - steps: - - uses: actions/checkout@v4 - with: - # Deep fetch is required for SonarCloud - fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: 3.12 - - uses: actions/setup-python@v4 - with: - python-version: 3.12 + - name: Tests and coverage + env: + FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} + IDIM_PROXY_API_KEY: ${{ secrets.IDIM_PROXY_API_API_KEY }} + GC_NOTIFY_EMAIL_API_KEY: "${{ secrets.GC_NOTIFY_EMAIL_API_KEY }}" + TEST_IDIR_USER_GUID: "${{ secrets.TEST_IDIR_USER_GUID }}" + POSTGRES_USER: ${{ vars.LOCAL_BACKEND_POSTGRES_USER }} + POSTGRES_PASSWORD: ${{ vars.LOCAL_POSTGRES_PASSWORD }} + POSTGRES_HOST: ${{ vars.LOCAL_POSTGRES_HOST }} + POSTGRES_DB: ${{ vars.LOCAL_POSTGRES_DB }} + POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} + POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} + COGNITO_REGION: ${{ vars.LOCAL_COGNITO_REGION }} + COGNITO_USER_POOL_ID: ${{ vars.LOCAL_COGNITO_USER_POOL_ID }} + COGNITO_CLIENT_ID: ${{ vars.LOCAL_COGNITO_CLIENT_ID }} + COGNITO_USER_POOL_DOMAIN: ${{ vars.LOCAL_COGNITO_USER_POOL_DOMAIN }} + ENABLE_BCSC_JWKS_ENDPOINT: ${{ vars.LOCAL_ENABLE_BCSC_JWKS_ENDPOINT }} + run: | + cd server/backend + pip install -r requirements.txt -r requirements-dev.txt + pip install pytest-cov + pytest --cov=. --cov-branch --cov-report=xml \ + -v --md=report.md --emoji - - name: Tests and coverage - env: - FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} - IDIM_PROXY_API_KEY: ${{ secrets.IDIM_PROXY_API_API_KEY }} - GC_NOTIFY_EMAIL_API_KEY: "${{ secrets.GC_NOTIFY_EMAIL_API_KEY }}" - TEST_IDIR_USER_GUID: "${{ secrets.TEST_IDIR_USER_GUID }}" - POSTGRES_USER: ${{ vars.LOCAL_BACKEND_POSTGRES_USER }} - POSTGRES_PASSWORD: ${{ vars.LOCAL_POSTGRES_PASSWORD }} - POSTGRES_HOST: ${{ vars.LOCAL_POSTGRES_HOST }} - POSTGRES_DB: ${{ vars.LOCAL_POSTGRES_DB }} - POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} - POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} - COGNITO_REGION: ${{ vars.LOCAL_COGNITO_REGION }} - COGNITO_USER_POOL_ID: ${{ vars.LOCAL_COGNITO_USER_POOL_ID }} - COGNITO_CLIENT_ID: ${{ vars.LOCAL_COGNITO_CLIENT_ID }} - COGNITO_USER_POOL_DOMAIN: ${{ vars.LOCAL_COGNITO_USER_POOL_DOMAIN }} - ENABLE_BCSC_JWKS_ENDPOINT: ${{ vars.LOCAL_ENABLE_BCSC_JWKS_ENDPOINT }} - run: | - cd server/backend - pip install -r requirements.txt -r requirements-dev.txt - pip install pytest-cov - pytest --cov=. --cov-branch --cov-report=xml \ - -v --md=report.md --emoji + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@v2.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }} + with: + projectBaseDir: server/backend + args: > + -Dsonar.host.url=https://sonarcloud.io + -Dsonar.organization=bcgov-sonarcloud + -Dsonar.projectKey=nr-forests-access-management_backend + -Dsonar.python.coverage.reportPaths=*coverage*.xml + -Dsonar.python.version=3.12 + -Dsonar.sources=api + -Dsonar.tests=testspg - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@v2.3.0 + ci-admin-management: + runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }} - with: - projectBaseDir: server/backend - args: > - -Dsonar.host.url=https://sonarcloud.io - -Dsonar.organization=bcgov-sonarcloud - -Dsonar.projectKey=nr-forests-access-management_backend - -Dsonar.python.coverage.reportPaths=*coverage*.xml - -Dsonar.python.version=3.12 - -Dsonar.sources=api - -Dsonar.tests=testspg + environment: dev + organization: bcgov + steps: + - uses: actions/checkout@v4 + with: + # Deep fetch is required for SonarCloud + fetch-depth: 0 - ci-admin-management: - runs-on: ubuntu-latest - env: - environment: dev - organization: bcgov - steps: - - uses: actions/checkout@v4 - with: - # Deep fetch is required for SonarCloud - fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: 3.12 - - uses: actions/setup-python@v4 - with: - python-version: 3.12 + - name: Tests and coverage + env: + FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} + IDIM_PROXY_API_KEY: ${{ secrets.IDIM_PROXY_API_API_KEY }} + GC_NOTIFY_EMAIL_API_KEY: "${{ secrets.GC_NOTIFY_EMAIL_API_KEY }}" + POSTGRES_USER: ${{ vars.LOCAL_ADMAN_POSTGRES_USER }} + POSTGRES_PASSWORD: ${{ vars.LOCAL_POSTGRES_PASSWORD }} + POSTGRES_HOST: ${{ vars.LOCAL_POSTGRES_HOST }} + POSTGRES_DB: ${{ vars.LOCAL_POSTGRES_DB }} + POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} + POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} + COGNITO_REGION: ${{ vars.LOCAL_COGNITO_REGION }} + COGNITO_USER_POOL_ID: ${{ vars.LOCAL_COGNITO_USER_POOL_ID }} + COGNITO_CLIENT_ID: ${{ vars.LOCAL_COGNITO_CLIENT_ID }} + COGNITO_USER_POOL_DOMAIN: ${{ vars.LOCAL_COGNITO_USER_POOL_DOMAIN }} + run: | + cd server/admin_management + pip install -r requirements.txt -r requirements-dev.txt + pip install pytest-cov + pytest --cov=. --cov-branch --cov-report=xml \ + -v --md=report.md --emoji - - name: Tests and coverage - env: - FC_API_TOKEN_TEST: ${{ secrets.FOREST_CLIENT_API_API_KEY_TEST }} - IDIM_PROXY_API_KEY: ${{ secrets.IDIM_PROXY_API_API_KEY }} - GC_NOTIFY_EMAIL_API_KEY: "${{ secrets.GC_NOTIFY_EMAIL_API_KEY }}" - POSTGRES_USER: ${{ vars.LOCAL_ADMAN_POSTGRES_USER }} - POSTGRES_PASSWORD: ${{ vars.LOCAL_POSTGRES_PASSWORD }} - POSTGRES_HOST: ${{ vars.LOCAL_POSTGRES_HOST }} - POSTGRES_DB: ${{ vars.LOCAL_POSTGRES_DB }} - POSTGRES_PORT: ${{ vars.LOCAL_POSTGRES_PORT }} - POSTGRES_PORT_TESTCONTAINER: ${{ vars.LOCAL_POSTGRES_PORT_TESTCONTAINER }} - COGNITO_REGION: ${{ vars.LOCAL_COGNITO_REGION }} - COGNITO_USER_POOL_ID: ${{ vars.LOCAL_COGNITO_USER_POOL_ID }} - COGNITO_CLIENT_ID: ${{ vars.LOCAL_COGNITO_CLIENT_ID }} - COGNITO_USER_POOL_DOMAIN: ${{ vars.LOCAL_COGNITO_USER_POOL_DOMAIN }} - run: | - cd server/admin_management - pip install -r requirements.txt -r requirements-dev.txt - pip install pytest-cov - pytest --cov=. --cov-branch --cov-report=xml \ - -v --md=report.md --emoji - - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@v2.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ADMIN }} - with: - projectBaseDir: server/admin_management - args: > - -Dsonar.host.url=https://sonarcloud.io - -Dsonar.organization=bcgov-sonarcloud - -Dsonar.projectKey=nr-forests-access-management_admin - -Dsonar.python.coverage.reportPaths=*coverage*.xml - -Dsonar.python.version=3.12 - -Dsonar.sources=api - -Dsonar.tests=tests + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@v2.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ADMIN }} + with: + projectBaseDir: server/admin_management + args: > + -Dsonar.host.url=https://sonarcloud.io + -Dsonar.organization=bcgov-sonarcloud + -Dsonar.projectKey=nr-forests-access-management_admin + -Dsonar.python.coverage.reportPaths=*coverage*.xml + -Dsonar.python.version=3.12 + -Dsonar.sources=api + -Dsonar.tests=tests - ci-frontend: - runs-on: ubuntu-latest - steps: - - uses: bcgov-nr/action-test-and-analyse@v1.2.1 - with: - commands: | - npm run install-frontend - npm run build - npm run test-coverage - dir: frontend - node_version: "18" - sonar_args: > - -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts - -Dsonar.organization=bcgov-sonarcloud - -Dsonar.project.monorepo.enabled=true - -Dsonar.projectKey=nr-forests-access-management_frontend - -Dsonar.sources=src - -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info - sonar_token: ${{ secrets.SONAR_TOKEN_FRONTEND }} - triggers: ("frontend" "terraform-frontend/") + ci-frontend: + runs-on: ubuntu-latest + steps: + - uses: bcgov-nr/action-test-and-analyse@v1.2.1 + with: + commands: | + npm run install-frontend + npm run build + npm run test-coverage + dir: frontend + node_version: "18" + sonar_args: > + -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts + -Dsonar.organization=bcgov-sonarcloud + -Dsonar.project.monorepo.enabled=true + -Dsonar.projectKey=nr-forests-access-management_frontend + -Dsonar.sources=src + -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info + sonar_token: ${{ secrets.SONAR_TOKEN_FRONTEND }} + triggers: ("frontend" "terraform-frontend/") diff --git a/.vscode/settings.json b/.vscode/settings.json index e3b013e9a..c2576b82a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,5 @@ { - "editor.rulers": [ - 80, - 120 - ], + "editor.rulers": [80, 120], "editor.insertSpaces": true, "editor.tabSize": 4, "editor.detectIndentation": true, @@ -13,13 +10,22 @@ "python.formatting.provider": "black", "python.linting.flake8Enabled": true, "python.linting.enabled": true, - "python.linting.flake8Args": ["--append-config=${workspaceFolder}/server/backend/.flake8"], + "python.linting.flake8Args": [ + "--append-config=${workspaceFolder}/server/backend/.flake8" + ], "python.testing.cwd": "./server/backend", "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"], "python.languageServer": "Pylance", "files.trimTrailingWhitespace": true, "files.eol": "\n", + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "prettier.tabWidth": 4, + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } - - diff --git a/client-code-gen/admin-management-openapi.json b/client-code-gen/admin-management-openapi.json index 6b2204e0a..fea9047e0 100644 --- a/client-code-gen/admin-management-openapi.json +++ b/client-code-gen/admin-management-openapi.json @@ -1 +1,945 @@ -{"openapi":"3.0.3","info":{"title":"Forest Access Management - FAM - Admin Management API","description":"\nForest Access Management Admin Management API used by the Forest Access Management application\nto define admin access to forest applications.\n","contact":{"name":"Team Heartwood","url":"https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Team+Heartwood","email":"SIBIFSAF@victoria1.gov.bc.ca"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"version":"0.0.1"},"paths":{"/smoke_test":{"get":{"tags":["Smoke Test"],"summary":"Smoke Test","description":"List of different applications that are administered by FAM","operationId":"smoke_test","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"6jfveou69mgford233or30hmta":[]}]}},"/application_admins":{"get":{"tags":["FAM Application Admin"],"summary":"Get Application Admins","operationId":"get_application_admins","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FamAppAdminGetResponse"},"type":"array","title":"Response Get Application Admins"}}}}},"security":[{"6jfveou69mgford233or30hmta":[]}]},"post":{"tags":["FAM Application Admin"],"summary":"Create Application Admin","operationId":"create_application_admin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamAppAdminCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamAppAdminGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"6jfveou69mgford233or30hmta":[]}]}},"/application_admins/{application_admin_id}":{"delete":{"tags":["FAM Application Admin"],"summary":"Delete Application Admin","operationId":"delete_application_admin","security":[{"6jfveou69mgford233or30hmta":[]}],"parameters":[{"name":"application_admin_id","in":"path","required":true,"schema":{"type":"integer","title":"Application Admin Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/access_control_privileges":{"post":{"tags":["FAM Access Control Privileges"],"summary":"Create Access Control Privilege Many","description":"Grant Delegated Admin Privileges","operationId":"create_access_control_privilege_many","security":[{"6jfveou69mgford233or30hmta":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamAccessControlPrivilegeCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamAccessControlPrivilegeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["FAM Access Control Privileges"],"summary":"Get Access Control Privileges By Application Id","description":"Get Delegated Admin Privileges For an Application","operationId":"get_access_control_privileges_by_application_id","security":[{"6jfveou69mgford233or30hmta":[]}],"parameters":[{"name":"application_id","in":"query","required":true,"schema":{"type":"integer","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FamAccessControlPrivilegeGetResponse"},"title":"Response Get Access Control Privileges By Application Id"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/access_control_privileges/{access_control_privilege_id}":{"delete":{"tags":["FAM Access Control Privileges"],"summary":"Delete Access Control Privilege","operationId":"delete_access_control_privilege","security":[{"6jfveou69mgford233or30hmta":[]}],"parameters":[{"name":"access_control_privilege_id","in":"path","required":true,"schema":{"type":"integer","title":"Access Control Privilege Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin-user-accesses":{"get":{"tags":["Admin User Accesses"],"summary":"Admin User Access Privilege","description":"Access privilege for logged on admin user for what applications/roles(scoped) the user can grant.","operationId":"Admin user access privilege","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserAccessResponse"}}}}},"security":[{"6jfveou69mgford233or30hmta":[]}]}}},"components":{"schemas":{"AdminRoleAuthGroup":{"type":"string","enum":["FAM_ADMIN","APP_ADMIN","DELEGATED_ADMIN"],"title":"AdminRoleAuthGroup","description":"FAM data model does not explicitly have these role group of admins.\nHowever, business rules do differentiate purpose of admins as:\n (FAM_ADMIN, [APP]_ADMIN, DELEGATED_ADMIN)\n# Referencing to FAM confluence for design:\n https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Delegated+Access+Administration+Design (Auth Function)"},"AdminUserAccessResponse":{"properties":{"access":{"items":{"$ref":"#/components/schemas/FamAuthGrantDto"},"type":"array","title":"Access"}},"type":"object","required":["access"],"title":"AdminUserAccessResponse"},"AppEnv":{"type":"string","enum":["DEV","TEST","PROD"],"title":"AppEnv"},"EmailSendingStatus":{"type":"string","enum":["NOT_REQUIRED","SENT_TO_EMAIL_SERVICE_SUCCESS","SENT_TO_EMAIL_SERVICE_FAILURE"],"title":"EmailSendingStatus"},"FamAccessControlPrivilegeCreateRequest":{"properties":{"user_name":{"type":"string","maxLength":20,"minLength":3,"title":"User Name"},"user_guid":{"type":"string","maxLength":32,"minLength":32,"title":"User Guid"},"user_type_code":{"$ref":"#/components/schemas/UserType"},"role_id":{"type":"integer","title":"Role Id"},"forest_client_numbers":{"anyOf":[{"items":{"type":"string","maxLength":8,"minLength":1},"type":"array"},{"type":"null"}],"title":"Forest Client Numbers"},"requires_send_user_email":{"type":"boolean","title":"Requires Send User Email","default":false}},"type":"object","required":["user_name","user_guid","user_type_code","role_id"],"title":"FamAccessControlPrivilegeCreateRequest","description":"This is used at router level, the data we receive from frontend.\nUse username and user_type_code to get user_id,\nand for concrete role, can use its role_id directly,\nbut for abstract role, need to create/get child role_id based on the forest client number,\nand then use schema FamAccessControlPrivilegeCreateDto to insert into the database"},"FamAccessControlPrivilegeCreateResponse":{"properties":{"status_code":{"type":"integer","title":"Status Code"},"detail":{"$ref":"#/components/schemas/FamAccessControlPrivilegeGetResponse"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["status_code","detail"],"title":"FamAccessControlPrivilegeCreateResponse"},"FamAccessControlPrivilegeGetResponse":{"properties":{"access_control_privilege_id":{"type":"integer","title":"Access Control Privilege Id"},"user_id":{"type":"integer","title":"User Id"},"role_id":{"type":"integer","title":"Role Id"},"user":{"$ref":"#/components/schemas/FamUserInfoDto"},"role":{"$ref":"#/components/schemas/FamRoleWithClientDto"}},"type":"object","required":["access_control_privilege_id","user_id","role_id","user","role"],"title":"FamAccessControlPrivilegeGetResponse"},"FamAccessControlPrivilegeResponse":{"properties":{"email_sending_status":{"allOf":[{"$ref":"#/components/schemas/EmailSendingStatus"}],"default":"NOT_REQUIRED"},"assignments_detail":{"items":{"$ref":"#/components/schemas/FamAccessControlPrivilegeCreateResponse"},"type":"array","title":"Assignments Detail"}},"type":"object","required":["assignments_detail"],"title":"FamAccessControlPrivilegeResponse"},"FamAppAdminCreateRequest":{"properties":{"user_name":{"type":"string","maxLength":20,"minLength":3,"title":"User Name"},"user_guid":{"type":"string","maxLength":32,"minLength":32,"title":"User Guid"},"user_type_code":{"$ref":"#/components/schemas/UserType"},"application_id":{"type":"integer","title":"Application Id"}},"type":"object","required":["user_name","user_guid","user_type_code","application_id"],"title":"FamAppAdminCreateRequest"},"FamAppAdminGetResponse":{"properties":{"application_admin_id":{"type":"integer","title":"Application Admin Id"},"user_id":{"type":"integer","title":"User Id"},"application_id":{"type":"integer","title":"Application Id"},"user":{"$ref":"#/components/schemas/FamUserInfoDto"},"application":{"$ref":"#/components/schemas/FamApplicationBase"}},"type":"object","required":["application_admin_id","user_id","application_id","user","application"],"title":"FamAppAdminGetResponse"},"FamApplicationBase":{"properties":{"application_name":{"type":"string","maxLength":100,"title":"Application Name"},"application_description":{"type":"string","maxLength":200,"title":"Application Description"},"app_environment":{"anyOf":[{"$ref":"#/components/schemas/AppEnv"},{"type":"null"}]}},"type":"object","required":["application_name","application_description"],"title":"FamApplicationBase"},"FamApplicationDto":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"env":{"anyOf":[{"$ref":"#/components/schemas/AppEnv"},{"type":"null"}]}},"type":"object","required":["id","name"],"title":"FamApplicationDto"},"FamAuthGrantDto":{"properties":{"auth_key":{"$ref":"#/components/schemas/AdminRoleAuthGroup"},"grants":{"items":{"$ref":"#/components/schemas/FamGrantDetailDto"},"type":"array","title":"Grants"}},"type":"object","required":["auth_key","grants"],"title":"FamAuthGrantDto"},"FamForestClientBase":{"properties":{"forest_client_number":{"type":"string","maxLength":8,"title":"Forest Client Number"}},"type":"object","required":["forest_client_number"],"title":"FamForestClientBase"},"FamGrantDetailDto":{"properties":{"application":{"$ref":"#/components/schemas/FamApplicationDto"},"roles":{"anyOf":[{"items":{"$ref":"#/components/schemas/FamRoleDto"},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["application"],"title":"FamGrantDetailDto"},"FamRoleBase":{"properties":{"role_name":{"type":"string","maxLength":100,"title":"Role Name"},"role_type_code":{"$ref":"#/components/schemas/RoleType"}},"type":"object","required":["role_name","role_type_code"],"title":"FamRoleBase"},"FamRoleDto":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"type":"string","maxLength":300,"title":"Description"},"type_code":{"$ref":"#/components/schemas/RoleType"},"forest_clients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Forest Clients"}},"type":"object","required":["id","name","description","type_code"],"title":"FamRoleDto"},"FamRoleWithClientDto":{"properties":{"role_id":{"type":"integer","title":"Role Id"},"role_name":{"type":"string","maxLength":100,"title":"Role Name"},"client_number":{"anyOf":[{"$ref":"#/components/schemas/FamForestClientBase"},{"type":"null"}]},"parent_role":{"anyOf":[{"$ref":"#/components/schemas/FamRoleBase"},{"type":"null"}]},"application":{"$ref":"#/components/schemas/FamApplicationBase"}},"type":"object","required":["role_id","role_name","application"],"title":"FamRoleWithClientDto"},"FamUserInfoDto":{"properties":{"user_name":{"type":"string","maxLength":20,"title":"User Name"},"user_type":{"$ref":"#/components/schemas/FamUserTypeDto"},"first_name":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Email"}},"type":"object","required":["user_name","user_type"],"title":"FamUserInfoDto"},"FamUserTypeDto":{"properties":{"code":{"$ref":"#/components/schemas/UserType"},"description":{"type":"string","maxLength":35,"title":"Description"}},"type":"object","required":["code","description"],"title":"FamUserTypeDto"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RoleType":{"type":"string","enum":["A","C"],"title":"RoleType"},"UserType":{"type":"string","enum":["I","B"],"title":"UserType"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"6jfveou69mgford233or30hmta":{"type":"oauth2","flows":{"authorizationCode":{"scopes":{},"authorizationUrl":"https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/authorize","tokenUrl":"https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/token"}}}}}} \ No newline at end of file +{ + "openapi": "3.0.3", + "info": { + "title": "Forest Access Management - FAM - Admin Management API", + "description": "\nForest Access Management Admin Management API used by the Forest Access Management application\nto define admin access to forest applications.\n", + "contact": { + "name": "Team Heartwood", + "url": "https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Team+Heartwood", + "email": "SIBIFSAF@victoria1.gov.bc.ca" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "0.0.1" + }, + "paths": { + "/smoke_test": { + "get": { + "tags": ["Smoke Test"], + "summary": "Smoke Test", + "description": "List of different applications that are administered by FAM", + "operationId": "smoke_test", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] + } + }, + "/application_admins": { + "get": { + "tags": ["FAM Application Admin"], + "summary": "Get Application Admins", + "operationId": "get_application_admins", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/FamAppAdminGetResponse" + }, + "type": "array", + "title": "Response Get Application Admins" + } + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] + }, + "post": { + "tags": ["FAM Application Admin"], + "summary": "Create Application Admin", + "operationId": "create_application_admin", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamAppAdminCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamAppAdminGetResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] + } + }, + "/application_admins/{application_admin_id}": { + "delete": { + "tags": ["FAM Application Admin"], + "summary": "Delete Application Admin", + "operationId": "delete_application_admin", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "application_admin_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Application Admin Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/access_control_privileges": { + "post": { + "tags": ["FAM Access Control Privileges"], + "summary": "Create Access Control Privilege Many", + "description": "Grant Delegated Admin Privileges", + "operationId": "create_access_control_privilege_many", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamAccessControlPrivilegeCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamAccessControlPrivilegeResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["FAM Access Control Privileges"], + "summary": "Get Access Control Privileges By Application Id", + "description": "Get Delegated Admin Privileges For an Application", + "operationId": "get_access_control_privileges_by_application_id", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "application_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FamAccessControlPrivilegeGetResponse" + }, + "title": "Response Get Access Control Privileges By Application Id" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/access_control_privileges/{access_control_privilege_id}": { + "delete": { + "tags": ["FAM Access Control Privileges"], + "summary": "Delete Access Control Privilege", + "operationId": "delete_access_control_privilege", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "access_control_privilege_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Access Control Privilege Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/admin-user-accesses": { + "get": { + "tags": ["Admin User Accesses"], + "summary": "Admin User Access Privilege", + "description": "Access privilege for logged on admin user for what applications/roles(scoped) the user can grant.", + "operationId": "Admin user access privilege", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminUserAccessResponse" + } + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] + } + } + }, + "components": { + "schemas": { + "AdminRoleAuthGroup": { + "type": "string", + "enum": ["FAM_ADMIN", "APP_ADMIN", "DELEGATED_ADMIN"], + "title": "AdminRoleAuthGroup", + "description": "FAM data model does not explicitly have these role group of admins.\nHowever, business rules do differentiate purpose of admins as:\n (FAM_ADMIN, [APP]_ADMIN, DELEGATED_ADMIN)\n# Referencing to FAM confluence for design:\n https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Delegated+Access+Administration+Design (Auth Function)" + }, + "AdminUserAccessResponse": { + "properties": { + "access": { + "items": { + "$ref": "#/components/schemas/FamAuthGrantDto" + }, + "type": "array", + "title": "Access" + } + }, + "type": "object", + "required": ["access"], + "title": "AdminUserAccessResponse" + }, + "AppEnv": { + "type": "string", + "enum": ["DEV", "TEST", "PROD"], + "title": "AppEnv" + }, + "EmailSendingStatus": { + "type": "string", + "enum": [ + "NOT_REQUIRED", + "SENT_TO_EMAIL_SERVICE_SUCCESS", + "SENT_TO_EMAIL_SERVICE_FAILURE" + ], + "title": "EmailSendingStatus" + }, + "FamAccessControlPrivilegeCreateRequest": { + "properties": { + "user_name": { + "type": "string", + "maxLength": 20, + "minLength": 3, + "title": "User Name" + }, + "user_guid": { + "type": "string", + "maxLength": 32, + "minLength": 32, + "title": "User Guid" + }, + "user_type_code": { + "$ref": "#/components/schemas/UserType" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "forest_client_numbers": { + "anyOf": [ + { + "items": { + "type": "string", + "maxLength": 8, + "minLength": 1 + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Forest Client Numbers" + }, + "requires_send_user_email": { + "type": "boolean", + "title": "Requires Send User Email", + "default": false + } + }, + "type": "object", + "required": [ + "user_name", + "user_guid", + "user_type_code", + "role_id" + ], + "title": "FamAccessControlPrivilegeCreateRequest", + "description": "This is used at router level, the data we receive from frontend.\nUse username and user_type_code to get user_id,\nand for concrete role, can use its role_id directly,\nbut for abstract role, need to create/get child role_id based on the forest client number,\nand then use schema FamAccessControlPrivilegeCreateDto to insert into the database" + }, + "FamAccessControlPrivilegeCreateResponse": { + "properties": { + "status_code": { + "type": "integer", + "title": "Status Code" + }, + "detail": { + "$ref": "#/components/schemas/FamAccessControlPrivilegeGetResponse" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message" + } + }, + "type": "object", + "required": ["status_code", "detail"], + "title": "FamAccessControlPrivilegeCreateResponse" + }, + "FamAccessControlPrivilegeGetResponse": { + "properties": { + "access_control_privilege_id": { + "type": "integer", + "title": "Access Control Privilege Id" + }, + "user_id": { + "type": "integer", + "title": "User Id" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "user": { + "$ref": "#/components/schemas/FamUserInfoDto" + }, + "role": { + "$ref": "#/components/schemas/FamRoleWithClientDto" + } + }, + "type": "object", + "required": [ + "access_control_privilege_id", + "user_id", + "role_id", + "user", + "role" + ], + "title": "FamAccessControlPrivilegeGetResponse" + }, + "FamAccessControlPrivilegeResponse": { + "properties": { + "email_sending_status": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailSendingStatus" + } + ], + "default": "NOT_REQUIRED" + }, + "assignments_detail": { + "items": { + "$ref": "#/components/schemas/FamAccessControlPrivilegeCreateResponse" + }, + "type": "array", + "title": "Assignments Detail" + } + }, + "type": "object", + "required": ["assignments_detail"], + "title": "FamAccessControlPrivilegeResponse" + }, + "FamAppAdminCreateRequest": { + "properties": { + "user_name": { + "type": "string", + "maxLength": 20, + "minLength": 3, + "title": "User Name" + }, + "user_guid": { + "type": "string", + "maxLength": 32, + "minLength": 32, + "title": "User Guid" + }, + "user_type_code": { + "$ref": "#/components/schemas/UserType" + }, + "application_id": { + "type": "integer", + "title": "Application Id" + } + }, + "type": "object", + "required": [ + "user_name", + "user_guid", + "user_type_code", + "application_id" + ], + "title": "FamAppAdminCreateRequest" + }, + "FamAppAdminGetResponse": { + "properties": { + "application_admin_id": { + "type": "integer", + "title": "Application Admin Id" + }, + "user_id": { + "type": "integer", + "title": "User Id" + }, + "application_id": { + "type": "integer", + "title": "Application Id" + }, + "user": { + "$ref": "#/components/schemas/FamUserInfoDto" + }, + "application": { + "$ref": "#/components/schemas/FamApplicationBase" + } + }, + "type": "object", + "required": [ + "application_admin_id", + "user_id", + "application_id", + "user", + "application" + ], + "title": "FamAppAdminGetResponse" + }, + "FamApplicationBase": { + "properties": { + "application_id": { + "type": "integer", + "title": "Application Id" + }, + "application_name": { + "type": "string", + "maxLength": 100, + "title": "Application Name" + }, + "application_description": { + "type": "string", + "maxLength": 200, + "title": "Application Description" + }, + "app_environment": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppEnv" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "application_id", + "application_name", + "application_description" + ], + "title": "FamApplicationBase" + }, + "FamApplicationDto": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "type": "string", + "maxLength": 100, + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 200 + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "env": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppEnv" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["id", "name"], + "title": "FamApplicationDto" + }, + "FamAuthGrantDto": { + "properties": { + "auth_key": { + "$ref": "#/components/schemas/AdminRoleAuthGroup" + }, + "grants": { + "items": { + "$ref": "#/components/schemas/FamGrantDetailDto" + }, + "type": "array", + "title": "Grants" + } + }, + "type": "object", + "required": ["auth_key", "grants"], + "title": "FamAuthGrantDto" + }, + "FamForestClientBase": { + "properties": { + "client_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } + ], + "title": "Client Name" + }, + "forest_client_number": { + "type": "string", + "maxLength": 8, + "title": "Forest Client Number" + } + }, + "type": "object", + "required": ["forest_client_number"], + "title": "FamForestClientBase" + }, + "FamGrantDetailDto": { + "properties": { + "application": { + "$ref": "#/components/schemas/FamApplicationDto" + }, + "roles": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/FamRoleDto" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Roles" + } + }, + "type": "object", + "required": ["application"], + "title": "FamGrantDetailDto" + }, + "FamRoleBase": { + "properties": { + "role_name": { + "type": "string", + "maxLength": 100, + "title": "Role Name" + }, + "role_type_code": { + "$ref": "#/components/schemas/RoleType" + } + }, + "type": "object", + "required": ["role_name", "role_type_code"], + "title": "FamRoleBase" + }, + "FamRoleDto": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "type": "string", + "maxLength": 100, + "title": "Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 300 + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "type_code": { + "$ref": "#/components/schemas/RoleType" + }, + "forest_clients": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Forest Clients" + } + }, + "type": "object", + "required": ["id", "name", "description", "type_code"], + "title": "FamRoleDto" + }, + "FamRoleWithClientDto": { + "properties": { + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "role_name": { + "type": "string", + "maxLength": 100, + "title": "Role Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 300 + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "client_number": { + "anyOf": [ + { + "$ref": "#/components/schemas/FamForestClientBase" + }, + { + "type": "null" + } + ] + }, + "parent_role": { + "anyOf": [ + { + "$ref": "#/components/schemas/FamRoleBase" + }, + { + "type": "null" + } + ] + }, + "application": { + "$ref": "#/components/schemas/FamApplicationBase" + } + }, + "type": "object", + "required": [ + "role_id", + "role_name", + "description", + "application" + ], + "title": "FamRoleWithClientDto" + }, + "FamUserInfoDto": { + "properties": { + "user_name": { + "type": "string", + "maxLength": 20, + "title": "User Name" + }, + "user_type": { + "$ref": "#/components/schemas/FamUserTypeDto" + }, + "first_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "First Name" + }, + "last_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Last Name" + }, + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 250 + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": ["user_name", "user_type"], + "title": "FamUserInfoDto" + }, + "FamUserTypeDto": { + "properties": { + "code": { + "$ref": "#/components/schemas/UserType" + }, + "description": { + "type": "string", + "maxLength": 35, + "title": "Description" + } + }, + "type": "object", + "required": ["code", "description"], + "title": "FamUserTypeDto" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "RoleType": { + "type": "string", + "enum": ["A", "C"], + "title": "RoleType" + }, + "UserType": { + "type": "string", + "enum": ["I", "B"], + "title": "UserType" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" + } + }, + "securitySchemes": { + "6jfveou69mgford233or30hmta": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "scopes": {}, + "authorizationUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/authorize", + "tokenUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/token" + } + } + } + } + } +} diff --git a/client-code-gen/app-access-control-openapi.json b/client-code-gen/app-access-control-openapi.json index e8ef5ca19..5d9bd5d7a 100644 --- a/client-code-gen/app-access-control-openapi.json +++ b/client-code-gen/app-access-control-openapi.json @@ -1,1686 +1,1570 @@ { - "openapi": "3.0.3", - "info": { - "title": "Forest Access Management - FAM - API", - "description": "\nForest Access Management API used by the Forest Access Management application\nto Define who has access to what apps, and what roles they will operate under\n once access is granted.\n", - "contact": { - "name": "Team Heartwood", - "url": "https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Team+Heartwood", - "email": "SIBIFSAF@victoria1.gov.bc.ca" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "0.0.1" - }, - "paths": { - "/fam_applications/{application_id}/user_role_assignment": { - "get": { - "tags": [ - "FAM Applications" - ], - "summary": "Get Fam Application User Role Assignment", - "description": "gets the roles assignment associated with an application", - "operationId": "get_fam_application_user_role_assignment", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "application_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FamApplicationUserRoleAssignmentGetSchema" - }, - "title": "Response Get Fam Application User Role Assignment" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/fam_applications/{application_id}/users/{user_id}": { - "get": { - "tags": [ - "FAM Applications" - ], - "summary": "Retrieve User Information by User ID under an application", - "description": "Retrieve the user data for a given user id under an authorized application.\n\nArgs:\n userId (int): The ID of the user.\n applicationId (int): The ID of the application the user has access to.\n\nReturns:\n FamUserInfoSchema: The user information corresponding to the provided userId.", - "operationId": "get_application_user_by_id", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "User Id" - } - }, - { - "name": "application_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FamUserInfoSchema" - } - } - } - }, - "404": { - "description": "User not found", - "content": { - "application/json": { - "example": { - "detail": "User not found" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/user_role_assignment": { - "post": { - "tags": [ - "FAM User Role Assignment" - ], - "summary": "Create User Role Assignment Many", - "description": "Grant User Access to an application's role.", - "operationId": "create_user_role_assignment_many", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FamUserRoleAssignmentCreateSchema" - } - } - }, - "required": true + "openapi": "3.0.3", + "info": { + "title": "Forest Access Management - FAM - API", + "description": "\nForest Access Management API used by the Forest Access Management application\nto Define who has access to what apps, and what roles they will operate under\n once access is granted.\n", + "contact": { + "name": "Team Heartwood", + "url": "https://apps.nrs.gov.bc.ca/int/confluence/display/FSAST1/Team+Heartwood", + "email": "SIBIFSAF@victoria1.gov.bc.ca" }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FamUserRoleAssignmentRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ] - } + "version": "0.0.1" }, - "/user_role_assignment/{user_role_xref_id}": { - "delete": { - "tags": [ - "FAM User Role Assignment" - ], - "summary": "Delete User Role Assignment", - "description": "Remove a specific application's role from user's access.", - "operationId": "delete_user_role_assignment", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "user_role_xref_id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "title": "User Role Xref Id" - } - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/forest_clients/search": { - "get": { - "tags": [ - "FAM Forest Clients" - ], - "summary": "Search", - "description": "Forest Client(s) search (by defined query parameter(s)).\nparam: 'client_number=[query_value]'\n Note! Current Forest Client API limits it to exact search for a whole 8-digits number.\nreturn: List of found FamForestClient. However, currently only 1 exact match returns.", - "operationId": "search", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "client_number", - "in": "query", - "required": true, - "schema": { - "type": "string", - "minLength": 3, - "maxLength": 8, - "title": "Client Number" - } - }, - { - "name": "application_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FamForestClientSchema" - }, - "title": "Response Search" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "paths": { + "/fam_applications/{application_id}/user_role_assignment": { + "get": { + "tags": ["FAM Applications"], + "summary": "Get Fam Application User Role Assignment", + "description": "gets the roles assignment associated with an application", + "operationId": "get_fam_application_user_role_assignment", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FamApplicationUserRoleAssignmentGetSchema" + }, + "title": "Response Get Fam Application User Role Assignment" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } - } - } - }, - "/identity_search/idir": { - "get": { - "tags": [ - "IDIR/BCeID Proxy" - ], - "summary": "Idir Search", - "operationId": "idir_search", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "query", - "required": true, - "schema": { - "type": "string", - "maxLength": 20, - "title": "User Id" - } - }, - { - "name": "application_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdimProxyIdirInfoSchema" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + }, + "/fam_applications/{application_id}/users/{user_id}": { + "get": { + "tags": ["FAM Applications"], + "summary": "Retrieve User Information by User ID under an application", + "description": "Retrieve the user data for a given user id under an authorized application.\n\nArgs:\n userId (int): The ID of the user.\n applicationId (int): The ID of the application the user has access to.\n\nReturns:\n FamUserInfoSchema: The user information corresponding to the provided userId.", + "operationId": "get_application_user_by_id", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "User Id" + } + }, + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamUserInfoSchema" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "example": { + "detail": "User not found" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } - } - } - } - } - }, - "/identity_search/bceid": { - "get": { - "tags": [ - "IDIR/BCeID Proxy" - ], - "summary": "Bceid Search", - "operationId": "bceid_search", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "query", - "required": true, - "schema": { - "type": "string", - "maxLength": 20, - "title": "User Id" } - }, - { - "name": "application_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" + }, + "/user_role_assignment": { + "post": { + "tags": ["FAM User Role Assignment"], + "summary": "Create User Role Assignment Many", + "description": "Grant User Access to an application's role.", + "operationId": "create_user_role_assignment_many", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamUserRoleAssignmentCreateSchema" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamUserRoleAssignmentRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdimProxyBceidInfoSchema" + }, + "/user_role_assignment/{user_role_xref_id}": { + "delete": { + "tags": ["FAM User Role Assignment"], + "summary": "Delete User Role Assignment", + "description": "Remove a specific application's role from user's access.", + "operationId": "delete_user_role_assignment", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "user_role_xref_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "User Role Xref Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + }, + "/forest_clients/search": { + "get": { + "tags": ["FAM Forest Clients"], + "summary": "Search", + "description": "Forest Client(s) search (by defined query parameter(s)).\nparam: 'client_number=[query_value]'\n Note! Current Forest Client API limits it to exact search for a whole 8-digits number.\nreturn: List of found FamForestClient. However, currently only 1 exact match returns.", + "operationId": "search", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "client_number", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 3, + "maxLength": 8, + "title": "Client Number" + } + }, + { + "name": "application_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FamForestClientSchema" + }, + "title": "Response Search" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } - } - } - }, - "/user_terms_conditions/user:validate": { - "post": { - "tags": [ - "FAM User Terms and Conditions" - ], - "summary": "Validate User Requires Accept Terms And Conditions", - "operationId": "validate_user_requires_accept_terms_and_conditions", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "boolean", - "title": "Response Validate User Requires Accept Terms And Conditions" + }, + "/identity_search/idir": { + "get": { + "tags": ["IDIR/BCeID Proxy"], + "summary": "Idir Search", + "operationId": "idir_search", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "maxLength": 20, + "title": "User Id" + } + }, + { + "name": "application_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdimProxyIdirInfoSchema" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } }, - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ] - } - }, - "/user_terms_conditions": { - "post": { - "tags": [ - "FAM User Terms and Conditions" - ], - "summary": "Create User Terms And Conditions", - "description": "Create a record for terms and conditions acceptance. \n\nIf no version is provided, we store the 1st version of the terms and conditions.", - "operationId": "create_user_terms_and_conditions", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + "/identity_search/bceid": { + "get": { + "tags": ["IDIR/BCeID Proxy"], + "summary": "Bceid Search", + "operationId": "bceid_search", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "maxLength": 20, + "title": "User Id" + } + }, + { + "name": "application_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdimProxyBceidInfoSchema" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - } }, - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ] - } - }, - "/users/users-information": { - "put": { - "tags": [ - "FAM User" - ], - "summary": "Update User Information From Idim Source", - "description": "Call IDIM web service to grab latest user information and update records in FAM database for IDIR and Business BCeID users", - "operationId": "update_user_information_from_idim_source", - "security": [ - { - "APIKeyHeader": [] - } - ], - "parameters": [ - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 100, - "title": "Per Page" - } - }, - { - "name": "use_pagination", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false, - "title": "Use Pagination" + "/user_terms_conditions/user:validate": { + "post": { + "tags": ["FAM User Terms and Conditions"], + "summary": "Validate User Requires Accept Terms And Conditions", + "operationId": "validate_user_requires_accept_terms_and_conditions", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Validate User Requires Accept Terms And Conditions" + } + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FamUserUpdateResponseSchema" - } - } + }, + "/user_terms_conditions": { + "post": { + "tags": ["FAM User Terms and Conditions"], + "summary": "Create User Terms And Conditions", + "description": "Create a record for terms and conditions acceptance. \n\nIf no version is provided, we store the 1st version of the terms and conditions.", + "operationId": "create_user_terms_and_conditions", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ] } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + }, + "/users/users-information": { + "put": { + "tags": ["FAM User"], + "summary": "Update User Information From Idim Source", + "description": "Call IDIM web service to grab latest user information and update records in FAM database for IDIR and Business BCeID users", + "operationId": "update_user_information_from_idim_source", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 100, + "title": "Per Page" + } + }, + { + "name": "use_pagination", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false, + "title": "Use Pagination" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FamUserUpdateResponseSchema" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } - } - } - } - } - }, - "/permission-audit-history": { - "get": { - "tags": [ - "Permission Audit" - ], - "summary": "Get Permission Audit History By User And Application", - "description": "Retrieve the permission audit history for a given user and application.\n\nArgs:\n userId (int): The ID of the user for whom the audit history is being requested.\n applicationId (int): The ID of the application associated with the audit history.\n\nReturns:\n List[PermissionAuditHistoryRes]: A list of audit history records for the given user and application.", - "operationId": "get_permission_audit_history_by_user_and_application", - "security": [ - { - "6jfveou69mgford233or30hmta": [] - } - ], - "parameters": [ - { - "name": "user_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "title": "User Id" - } - }, - { - "name": "application_id", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "title": "Application Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PermissionAuditHistoryRes" - }, - "title": "Response Get Permission Audit History By User And Application" + }, + "/permission-audit-history": { + "get": { + "tags": ["Permission Audit"], + "summary": "Get Permission Audit History By User And Application", + "description": "Retrieve the permission audit history for a given user and application.\n\nArgs:\n userId (int): The ID of the user for whom the audit history is being requested.\n applicationId (int): The ID of the application associated with the audit history.\n\nReturns:\n List[PermissionAuditHistoryRes]: A list of audit history records for the given user and application.", + "operationId": "get_permission_audit_history_by_user_and_application", + "security": [ + { + "6jfveou69mgford233or30hmta": [] + } + ], + "parameters": [ + { + "name": "user_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "User Id" + } + }, + { + "name": "application_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Application Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionAuditHistoryRes" + }, + "title": "Response Get Permission Audit History By User And Application" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } } - } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + }, + "/bcsc/token/dev": { + "post": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Token Dev", + "operationId": "bcsc_token_dev", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/token/dev": { - "post": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Token Dev", - "operationId": "bcsc_token_dev", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/token/test": { + "post": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Token Test", + "operationId": "bcsc_token_test", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/token/test": { - "post": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Token Test", - "operationId": "bcsc_token_test", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/token/prod": { + "post": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Token Prod", + "operationId": "bcsc_token_prod", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/token/prod": { - "post": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Token Prod", - "operationId": "bcsc_token_prod", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/userinfo/dev": { + "get": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Userinfo Dev", + "operationId": "bcsc_userinfo_dev", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/userinfo/dev": { - "get": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Userinfo Dev", - "operationId": "bcsc_userinfo_dev", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/userinfo/test": { + "get": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Userinfo Test", + "operationId": "bcsc_userinfo_test", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/userinfo/test": { - "get": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Userinfo Test", - "operationId": "bcsc_userinfo_test", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/userinfo/prod": { + "get": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Userinfo Prod", + "operationId": "bcsc_userinfo_prod", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/userinfo/prod": { - "get": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Userinfo Prod", - "operationId": "bcsc_userinfo_prod", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/bcsc/jwks.json": { + "get": { + "tags": ["BCSC Proxy"], + "summary": "Bcsc Jwks", + "operationId": "bcsc_jwks", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } - } - } - }, - "/bcsc/jwks.json": { - "get": { - "tags": [ - "BCSC Proxy" - ], - "summary": "Bcsc Jwks", - "operationId": "bcsc_jwks", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - + }, + "/smoke_test": { + "get": { + "tags": ["Smoke Test"], + "summary": "Smoke Test", + "description": "List of different applications that are administered by FAM", + "operationId": "smoke_test", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } } - } } - } } - } }, - "/smoke_test": { - "get": { - "tags": [ - "Smoke Test" - ], - "summary": "Smoke Test", - "description": "List of different applications that are administered by FAM", - "operationId": "smoke_test", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "EmailSendingStatus": { - "type": "string", - "enum": [ - "NOT_REQUIRED", - "SENT_TO_EMAIL_SERVICE_SUCCESS", - "SENT_TO_EMAIL_SERVICE_FAILURE" - ], - "title": "EmailSendingStatus" - }, - "FamApplicationSchema": { - "properties": { - "application_id": { - "type": "integer", - "title": "Application Id" - }, - "application_name": { - "type": "string", - "maxLength": 100, - "title": "Application Name" - }, - "application_description": { - "type": "string", - "maxLength": 200, - "title": "Application Description" - } - }, - "type": "object", - "required": [ - "application_id", - "application_name", - "application_description" - ], - "title": "FamApplicationSchema" - }, - "FamApplicationUserRoleAssignmentGetSchema": { - "properties": { - "user_role_xref_id": { - "type": "integer", - "title": "User Role Xref Id" - }, - "user_id": { - "type": "integer", - "title": "User Id" - }, - "role_id": { - "type": "integer", - "title": "Role Id" - }, - "user": { - "$ref": "#/components/schemas/FamUserInfoSchema" - }, - "role": { - "$ref": "#/components/schemas/FamRoleWithClientSchema" - } - }, - "type": "object", - "required": [ - "user_role_xref_id", - "user_id", - "role_id", - "user", - "role" - ], - "title": "FamApplicationUserRoleAssignmentGetSchema" - }, - "FamForestClientSchema": { - "properties": { - "client_name": { - "anyOf": [ - { - "type": "string", - "maxLength": 60 - }, - { - "type": "null" - } - ], - "title": "Client Name" - }, - "forest_client_number": { - "type": "string", - "maxLength": 8, - "title": "Forest Client Number" - }, - "status": { - "anyOf": [ - { - "$ref": "#/components/schemas/FamForestClientStatusSchema" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "forest_client_number" - ], - "title": "FamForestClientSchema" - }, - "FamForestClientStatusSchema": { - "properties": { - "status_code": { - "$ref": "#/components/schemas/FamForestClientStatusType" - }, - "description": { - "type": "string", - "maxLength": 10, - "title": "Description" - } - }, - "type": "object", - "required": [ - "status_code", - "description" - ], - "title": "FamForestClientStatusSchema" - }, - "FamForestClientStatusType": { - "type": "string", - "enum": [ - "A", - "I" - ], - "title": "FamForestClientStatusType" - }, - "FamRoleMinSchema": { - "properties": { - "role_name": { - "type": "string", - "maxLength": 100, - "title": "Role Name" - }, - "role_type_code": { - "$ref": "#/components/schemas/RoleType" - }, - "application": { - "$ref": "#/components/schemas/FamApplicationSchema" - } - }, - "type": "object", - "required": [ - "role_name", - "role_type_code", - "application" - ], - "title": "FamRoleMinSchema" - }, - "FamRoleWithClientSchema": { - "properties": { - "role_name": { - "type": "string", - "maxLength": 100, - "title": "Role Name" - }, - "role_type_code": { - "$ref": "#/components/schemas/RoleType" - }, - "application": { - "$ref": "#/components/schemas/FamApplicationSchema" - }, - "role_id": { - "type": "integer", - "title": "Role Id" - }, - "display_name": { - "anyOf": [ - { + "components": { + "schemas": { + "EmailSendingStatus": { "type": "string", - "maxLength": 100 - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 300 - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "forest_client": { - "anyOf": [ - { - "$ref": "#/components/schemas/FamForestClientSchema" - }, - { - "type": "null" - } - ] - }, - "parent_role": { - "anyOf": [ - { - "$ref": "#/components/schemas/FamRoleMinSchema" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "role_name", - "role_type_code", - "application", - "role_id", - "description", - "forest_client" - ], - "title": "FamRoleWithClientSchema" - }, - "FamUserInfoSchema": { - "properties": { - "user_name": { - "type": "string", - "maxLength": 20, - "title": "User Name" - }, - "user_type": { - "$ref": "#/components/schemas/FamUserTypeSchema" - }, - "first_name": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "First Name" - }, - "last_name": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Last Name" - }, - "email": { - "anyOf": [ - { + "enum": [ + "NOT_REQUIRED", + "SENT_TO_EMAIL_SERVICE_SUCCESS", + "SENT_TO_EMAIL_SERVICE_FAILURE" + ], + "title": "EmailSendingStatus" + }, + "FamApplicationSchema": { + "properties": { + "application_id": { + "type": "integer", + "title": "Application Id" + }, + "application_name": { + "type": "string", + "maxLength": 100, + "title": "Application Name" + }, + "application_description": { + "type": "string", + "maxLength": 200, + "title": "Application Description" + } + }, + "type": "object", + "required": [ + "application_id", + "application_name", + "application_description" + ], + "title": "FamApplicationSchema" + }, + "FamApplicationUserRoleAssignmentGetSchema": { + "properties": { + "user_role_xref_id": { + "type": "integer", + "title": "User Role Xref Id" + }, + "user_id": { + "type": "integer", + "title": "User Id" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "user": { + "$ref": "#/components/schemas/FamUserInfoSchema" + }, + "role": { + "$ref": "#/components/schemas/FamRoleWithClientSchema" + } + }, + "type": "object", + "required": [ + "user_role_xref_id", + "user_id", + "role_id", + "user", + "role" + ], + "title": "FamApplicationUserRoleAssignmentGetSchema" + }, + "FamForestClientSchema": { + "properties": { + "client_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } + ], + "title": "Client Name" + }, + "forest_client_number": { + "type": "string", + "maxLength": 8, + "title": "Forest Client Number" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/FamForestClientStatusSchema" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": ["forest_client_number"], + "title": "FamForestClientSchema" + }, + "FamForestClientStatusSchema": { + "properties": { + "status_code": { + "$ref": "#/components/schemas/FamForestClientStatusType" + }, + "description": { + "type": "string", + "maxLength": 10, + "title": "Description" + } + }, + "type": "object", + "required": ["status_code", "description"], + "title": "FamForestClientStatusSchema" + }, + "FamForestClientStatusType": { "type": "string", - "maxLength": 250 - }, - { - "type": "null" - } - ], - "title": "Email" - } - }, - "type": "object", - "required": [ - "user_name", - "user_type" - ], - "title": "FamUserInfoSchema" - }, - "FamUserRoleAssignmentCreateRes": { - "properties": { - "status_code": { - "type": "integer", - "title": "Status Code" - }, - "detail": { - "$ref": "#/components/schemas/FamApplicationUserRoleAssignmentGetSchema" - }, - "error_message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Message" - } - }, - "type": "object", - "required": [ - "status_code", - "detail" - ], - "title": "FamUserRoleAssignmentCreateRes" - }, - "FamUserRoleAssignmentCreateSchema": { - "properties": { - "user_name": { - "type": "string", - "maxLength": 20, - "minLength": 3, - "title": "User Name" - }, - "user_guid": { - "type": "string", - "maxLength": 32, - "minLength": 32, - "title": "User Guid" - }, - "user_type_code": { - "$ref": "#/components/schemas/UserType" - }, - "role_id": { - "type": "integer", - "title": "Role Id" - }, - "forest_client_numbers": { - "anyOf": [ - { - "items": { - "type": "string", - "maxLength": 8, - "minLength": 1 + "enum": ["A", "I"], + "title": "FamForestClientStatusType" + }, + "FamRoleMinSchema": { + "properties": { + "role_name": { + "type": "string", + "maxLength": 100, + "title": "Role Name" + }, + "role_type_code": { + "$ref": "#/components/schemas/RoleType" + }, + "application": { + "$ref": "#/components/schemas/FamApplicationSchema" + } }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Forest Client Numbers" - }, - "requires_send_user_email": { - "type": "boolean", - "title": "Requires Send User Email", - "default": false - } - }, - "type": "object", - "required": [ - "user_name", - "user_guid", - "user_type_code", - "role_id" - ], - "title": "FamUserRoleAssignmentCreateSchema" - }, - "FamUserRoleAssignmentRes": { - "properties": { - "email_sending_status": { - "allOf": [ - { - "$ref": "#/components/schemas/EmailSendingStatus" - } - ], - "default": "NOT_REQUIRED" - }, - "assignments_detail": { - "items": { - "$ref": "#/components/schemas/FamUserRoleAssignmentCreateRes" + "type": "object", + "required": ["role_name", "role_type_code", "application"], + "title": "FamRoleMinSchema" }, - "type": "array", - "title": "Assignments Detail" - } - }, - "type": "object", - "required": [ - "assignments_detail" - ], - "title": "FamUserRoleAssignmentRes" - }, - "FamUserTypeSchema": { - "properties": { - "code": { - "$ref": "#/components/schemas/UserType" - }, - "description": { - "type": "string", - "maxLength": 35, - "title": "Description" - } - }, - "type": "object", - "required": [ - "code", - "description" - ], - "title": "FamUserTypeSchema" - }, - "FamUserUpdateResponseSchema": { - "properties": { - "total_db_users_count": { - "type": "integer", - "title": "Total Db Users Count" - }, - "current_page": { - "type": "integer", - "title": "Current Page" - }, - "users_count_on_page": { - "type": "integer", - "title": "Users Count On Page" - }, - "success_user_id_list": { - "items": { - "type": "integer" + "FamRoleWithClientSchema": { + "properties": { + "role_name": { + "type": "string", + "maxLength": 100, + "title": "Role Name" + }, + "role_type_code": { + "$ref": "#/components/schemas/RoleType" + }, + "application": { + "$ref": "#/components/schemas/FamApplicationSchema" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "display_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 300 + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "forest_client": { + "anyOf": [ + { + "$ref": "#/components/schemas/FamForestClientSchema" + }, + { + "type": "null" + } + ] + }, + "parent_role": { + "anyOf": [ + { + "$ref": "#/components/schemas/FamRoleMinSchema" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "role_name", + "role_type_code", + "application", + "role_id", + "description", + "forest_client" + ], + "title": "FamRoleWithClientSchema" }, - "type": "array", - "title": "Success User Id List" - }, - "failed_user_id_list": { - "items": { - "type": "integer" + "FamUserInfoSchema": { + "properties": { + "user_name": { + "type": "string", + "maxLength": 20, + "title": "User Name" + }, + "user_type": { + "$ref": "#/components/schemas/FamUserTypeSchema" + }, + "first_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "First Name" + }, + "last_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Last Name" + }, + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 250 + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": ["user_name", "user_type"], + "title": "FamUserInfoSchema" }, - "type": "array", - "title": "Failed User Id List" - }, - "ignored_user_id_list": { - "items": { - "type": "integer" + "FamUserRoleAssignmentCreateRes": { + "properties": { + "status_code": { + "type": "integer", + "title": "Status Code" + }, + "detail": { + "$ref": "#/components/schemas/FamApplicationUserRoleAssignmentGetSchema" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message" + } + }, + "type": "object", + "required": ["status_code", "detail"], + "title": "FamUserRoleAssignmentCreateRes" }, - "type": "array", - "title": "Ignored User Id List" - }, - "mismatch_user_list": { - "items": { - "type": "integer" + "FamUserRoleAssignmentCreateSchema": { + "properties": { + "user_name": { + "type": "string", + "maxLength": 20, + "minLength": 3, + "title": "User Name" + }, + "user_guid": { + "type": "string", + "maxLength": 32, + "minLength": 32, + "title": "User Guid" + }, + "user_type_code": { + "$ref": "#/components/schemas/UserType" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "forest_client_numbers": { + "anyOf": [ + { + "items": { + "type": "string", + "maxLength": 8, + "minLength": 1 + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Forest Client Numbers" + }, + "requires_send_user_email": { + "type": "boolean", + "title": "Requires Send User Email", + "default": false + } + }, + "type": "object", + "required": [ + "user_name", + "user_guid", + "user_type_code", + "role_id" + ], + "title": "FamUserRoleAssignmentCreateSchema" }, - "type": "array", - "title": "Mismatch User List" - } - }, - "type": "object", - "required": [ - "total_db_users_count", - "current_page", - "users_count_on_page", - "success_user_id_list", - "failed_user_id_list", - "ignored_user_id_list", - "mismatch_user_list" - ], - "title": "FamUserUpdateResponseSchema" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" + "FamUserRoleAssignmentRes": { + "properties": { + "email_sending_status": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailSendingStatus" + } + ], + "default": "NOT_REQUIRED" + }, + "assignments_detail": { + "items": { + "$ref": "#/components/schemas/FamUserRoleAssignmentCreateRes" + }, + "type": "array", + "title": "Assignments Detail" + } + }, + "type": "object", + "required": ["assignments_detail"], + "title": "FamUserRoleAssignmentRes" }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "IdimProxyBceidInfoSchema": { - "properties": { - "found": { - "type": "boolean", - "title": "Found" - }, - "userId": { - "type": "string", - "maxLength": 20, - "title": "Userid" - }, - "guid": { - "anyOf": [ - { - "type": "string", - "maxLength": 32 - }, - { - "type": "null" - } - ], - "title": "Guid" - }, - "businessGuid": { - "anyOf": [ - { - "type": "string", - "maxLength": 32 - }, - { - "type": "null" - } - ], - "title": "Businessguid" - }, - "businessLegalName": { - "anyOf": [ - { - "type": "string", - "maxLength": 60 - }, - { - "type": "null" - } - ], - "title": "Businesslegalname" - }, - "firstName": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Firstname" - }, - "lastName": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Lastname" - }, - "email": { - "anyOf": [ - { - "type": "string", - "maxLength": 250 - }, - { - "type": "null" - } - ], - "title": "Email" - } - }, - "type": "object", - "required": [ - "found", - "userId" - ], - "title": "IdimProxyBceidInfoSchema" - }, - "IdimProxyIdirInfoSchema": { - "properties": { - "found": { - "type": "boolean", - "title": "Found" - }, - "userId": { - "type": "string", - "maxLength": 20, - "title": "Userid" - }, - "guid": { - "anyOf": [ - { - "type": "string", - "maxLength": 32 - }, - { - "type": "null" - } - ], - "title": "Guid" - }, - "firstName": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Firstname" - }, - "lastName": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Lastname" - }, - "email": { - "anyOf": [ - { - "type": "string", - "maxLength": 250 - }, - { - "type": "null" - } - ], - "title": "Email" - } - }, - "type": "object", - "required": [ - "found", - "userId" - ], - "title": "IdimProxyIdirInfoSchema" - }, - "PermissionAuditHistoryRes": { - "properties": { - "create_date": { - "type": "string", - "format": "date-time", - "title": "Create Date" - }, - "create_user": { - "type": "string", - "title": "Create User" - }, - "change_date": { - "type": "string", - "format": "date-time", - "title": "Change Date" - }, - "change_performer_user_details": { - "$ref": "#/components/schemas/PrivilegeChangePerformerSchema" - }, - "privilege_change_type_code": { - "$ref": "#/components/schemas/PrivilegeChangeTypeEnum" - }, - "privilege_details": { - "$ref": "#/components/schemas/PrivilegeDetailsSchema" - }, - "privilege_change_audit_id": { - "type": "integer", - "title": "Privilege Change Audit Id" - }, - "change_performer_user_id": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Change Performer User Id" - }, - "privilege_change_type_description": { - "type": "string", - "title": "Privilege Change Type Description" - } - }, - "type": "object", - "required": [ - "create_date", - "create_user", - "change_date", - "change_performer_user_details", - "privilege_change_type_code", - "privilege_details", - "privilege_change_audit_id", - "change_performer_user_id", - "privilege_change_type_description" - ], - "title": "PermissionAuditHistoryRes", - "description": "This class is used to transfer data related to the changes made to a user's permissions,\ntypically in the context of an audit trail. It encapsulates details about the change,\nincluding when it occurred, who performed the change, who the change was applied to,\nand the specific details of the permission changes." - }, - "PrivilegeChangePerformerSchema": { - "properties": { - "username": { - "type": "string", - "maxLength": 20, - "title": "Username" - }, - "first_name": { - "anyOf": [ - { - "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "First Name" - }, - "last_name": { - "anyOf": [ - { + "FamUserTypeSchema": { + "properties": { + "code": { + "$ref": "#/components/schemas/UserType" + }, + "description": { + "type": "string", + "maxLength": 35, + "title": "Description" + } + }, + "type": "object", + "required": ["code", "description"], + "title": "FamUserTypeSchema" + }, + "FamUserUpdateResponseSchema": { + "properties": { + "total_db_users_count": { + "type": "integer", + "title": "Total Db Users Count" + }, + "current_page": { + "type": "integer", + "title": "Current Page" + }, + "users_count_on_page": { + "type": "integer", + "title": "Users Count On Page" + }, + "success_user_id_list": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Success User Id List" + }, + "failed_user_id_list": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Failed User Id List" + }, + "ignored_user_id_list": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Ignored User Id List" + }, + "mismatch_user_list": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Mismatch User List" + } + }, + "type": "object", + "required": [ + "total_db_users_count", + "current_page", + "users_count_on_page", + "success_user_id_list", + "failed_user_id_list", + "ignored_user_id_list", + "mismatch_user_list" + ], + "title": "FamUserUpdateResponseSchema" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "IdimProxyBceidInfoSchema": { + "properties": { + "found": { + "type": "boolean", + "title": "Found" + }, + "userId": { + "type": "string", + "maxLength": 20, + "title": "Userid" + }, + "guid": { + "anyOf": [ + { + "type": "string", + "maxLength": 32 + }, + { + "type": "null" + } + ], + "title": "Guid" + }, + "businessGuid": { + "anyOf": [ + { + "type": "string", + "maxLength": 32 + }, + { + "type": "null" + } + ], + "title": "Businessguid" + }, + "businessLegalName": { + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } + ], + "title": "Businesslegalname" + }, + "firstName": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Firstname" + }, + "lastName": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Lastname" + }, + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 250 + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": ["found", "userId"], + "title": "IdimProxyBceidInfoSchema" + }, + "IdimProxyIdirInfoSchema": { + "properties": { + "found": { + "type": "boolean", + "title": "Found" + }, + "userId": { + "type": "string", + "maxLength": 20, + "title": "Userid" + }, + "guid": { + "anyOf": [ + { + "type": "string", + "maxLength": 32 + }, + { + "type": "null" + } + ], + "title": "Guid" + }, + "firstName": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Firstname" + }, + "lastName": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Lastname" + }, + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 250 + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": ["found", "userId"], + "title": "IdimProxyIdirInfoSchema" + }, + "PermissionAuditHistoryRes": { + "properties": { + "create_date": { + "type": "string", + "format": "date-time", + "title": "Create Date" + }, + "create_user": { + "type": "string", + "title": "Create User" + }, + "change_date": { + "type": "string", + "format": "date-time", + "title": "Change Date" + }, + "change_performer_user_details": { + "$ref": "#/components/schemas/PrivilegeChangePerformerSchema" + }, + "privilege_change_type_code": { + "$ref": "#/components/schemas/PrivilegeChangeTypeEnum" + }, + "privilege_details": { + "$ref": "#/components/schemas/PrivilegeDetailsSchema" + }, + "privilege_change_audit_id": { + "type": "integer", + "title": "Privilege Change Audit Id" + }, + "change_performer_user_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Change Performer User Id" + }, + "privilege_change_type_description": { + "type": "string", + "title": "Privilege Change Type Description" + } + }, + "type": "object", + "required": [ + "create_date", + "create_user", + "change_date", + "change_performer_user_details", + "privilege_change_type_code", + "privilege_details", + "privilege_change_audit_id", + "change_performer_user_id", + "privilege_change_type_description" + ], + "title": "PermissionAuditHistoryRes", + "description": "This class is used to transfer data related to the changes made to a user's permissions,\ntypically in the context of an audit trail. It encapsulates details about the change,\nincluding when it occurred, who performed the change, who the change was applied to,\nand the specific details of the permission changes." + }, + "PrivilegeChangePerformerSchema": { + "properties": { + "username": { + "type": "string", + "maxLength": 20, + "title": "Username" + }, + "first_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "First Name" + }, + "last_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 50 + }, + { + "type": "null" + } + ], + "title": "Last Name" + }, + "email": { + "anyOf": [ + { + "type": "string", + "maxLength": 250 + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": ["username"], + "title": "PrivilegeChangePerformerSchema", + "description": "This schema represents the structure of the `change_user_details` JSON field used in fam_privilege_change_audit.\n\nThe `change_user_details` field captures information about the user who performed a change, including\nthe `username`, `first_name`, `last_name`, and `email`. It is used to record the user details at the time\nof the audit event, ensuring that changes to these details later do not affect the integrity of the audit log.\n\nFor regular users, all fields (`username`, `first_name`, `last_name`, and `email`) are included. However,\nwhen the change is performed by a system account, only the `username` field is present, and it is set to\n\"system\". The schema includes validation logic to enforce this rule.\n\nAttributes:\n username (str): The username of the user performing the change. For system accounts, this is \"system\".\n first_name (str, optional): The first name of the user. Not present for system accounts.\n last_name (str, optional): The last name of the user. Not present for system accounts.\n email (str, optional): The email address of the user. Not present for system accounts.\n\nValidation:\n The schema includes a validator to ensure that for system accounts (where `username` is \"system\"),\n no other fields (`first_name`, `last_name`, `email`) are populated." + }, + "PrivilegeChangeTypeEnum": { "type": "string", - "maxLength": 50 - }, - { - "type": "null" - } - ], - "title": "Last Name" - }, - "email": { - "anyOf": [ - { + "enum": ["GRANT", "REVOKE", "UPDATE"], + "title": "PrivilegeChangeTypeEnum" + }, + "PrivilegeDetailsPermissionTypeEnum": { "type": "string", - "maxLength": 250 - }, - { - "type": "null" - } - ], - "title": "Email" - } - }, - "type": "object", - "required": [ - "username" - ], - "title": "PrivilegeChangePerformerSchema", - "description": "This schema represents the structure of the `change_user_details` JSON field used in fam_privilege_change_audit.\n\nThe `change_user_details` field captures information about the user who performed a change, including\nthe `username`, `first_name`, `last_name`, and `email`. It is used to record the user details at the time\nof the audit event, ensuring that changes to these details later do not affect the integrity of the audit log.\n\nFor regular users, all fields (`username`, `first_name`, `last_name`, and `email`) are included. However,\nwhen the change is performed by a system account, only the `username` field is present, and it is set to\n\"system\". The schema includes validation logic to enforce this rule.\n\nAttributes:\n username (str): The username of the user performing the change. For system accounts, this is \"system\".\n first_name (str, optional): The first name of the user. Not present for system accounts.\n last_name (str, optional): The last name of the user. Not present for system accounts.\n email (str, optional): The email address of the user. Not present for system accounts.\n\nValidation:\n The schema includes a validator to ensure that for system accounts (where `username` is \"system\"),\n no other fields (`first_name`, `last_name`, `email`) are populated." - }, - "PrivilegeChangeTypeEnum": { - "type": "string", - "enum": [ - "GRANT", - "REVOKE", - "UPDATE" - ], - "title": "PrivilegeChangeTypeEnum" - }, - "PrivilegeDetailsPermissionTypeEnum": { - "type": "string", - "enum": [ - "End User", - "Delegated Admin", - "Application Admin" - ], - "title": "PrivilegeDetailsPermissionTypeEnum" - }, - "PrivilegeDetailsRoleSchema": { - "properties": { - "role": { - "type": "string", - "maxLength": 100, - "title": "Role" - }, - "scopes": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/PrivilegeDetailsScopeSchema" + "enum": ["End User", "Delegated Admin", "Application Admin"], + "title": "PrivilegeDetailsPermissionTypeEnum" + }, + "PrivilegeDetailsRoleSchema": { + "properties": { + "role": { + "type": "string", + "maxLength": 100, + "title": "Role" + }, + "scopes": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PrivilegeDetailsScopeSchema" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Scopes" + } }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Scopes" - } - }, - "type": "object", - "required": [ - "role" - ], - "title": "PrivilegeDetailsRoleSchema" - }, - "PrivilegeDetailsSchema": { - "properties": { - "permission_type": { - "$ref": "#/components/schemas/PrivilegeDetailsPermissionTypeEnum" - }, - "roles": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/PrivilegeDetailsRoleSchema" + "type": "object", + "required": ["role"], + "title": "PrivilegeDetailsRoleSchema" + }, + "PrivilegeDetailsSchema": { + "properties": { + "permission_type": { + "$ref": "#/components/schemas/PrivilegeDetailsPermissionTypeEnum" + }, + "roles": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PrivilegeDetailsRoleSchema" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Roles" + } }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Roles" - } - }, - "type": "object", - "required": [ - "permission_type" - ], - "title": "PrivilegeDetailsSchema", - "description": "This schema represents the structure of the `privilege_details` JSON field used in the `fam_privilege_change_audit` table.\n\nThe `privilege_details` field captures the details of the privileges being changed during a privilege audit event.\nIt includes information about the `permission_type` and, types of permissions, the associated roles and scopes.\n\nAttributes:\n permission_type (PrivilegeDetailsPermissionTypeEnum): The type of permission being changed.\n roles (List[PrivilegeDetailsRoleSchema], optional): A list of roles associated with the permission.\n Required for `END_USER` and `DELEGATED_ADMIN` permission types, and should be omitted for `APPLICATION_ADMIN`.\n\nValidation:\n The schema includes a validator to ensure that roles are appropriately present or absent based on the `permission_type`." - }, - "PrivilegeDetailsScopeSchema": { - "properties": { - "scope_type": { - "$ref": "#/components/schemas/PrivilegeDetailsScopeTypeEnum" - }, - "client_id": { - "anyOf": [ - { + "type": "object", + "required": ["permission_type"], + "title": "PrivilegeDetailsSchema", + "description": "This schema represents the structure of the `privilege_details` JSON field used in the `fam_privilege_change_audit` table.\n\nThe `privilege_details` field captures the details of the privileges being changed during a privilege audit event.\nIt includes information about the `permission_type` and, types of permissions, the associated roles and scopes.\n\nAttributes:\n permission_type (PrivilegeDetailsPermissionTypeEnum): The type of permission being changed.\n roles (List[PrivilegeDetailsRoleSchema], optional): A list of roles associated with the permission.\n Required for `END_USER` and `DELEGATED_ADMIN` permission types, and should be omitted for `APPLICATION_ADMIN`.\n\nValidation:\n The schema includes a validator to ensure that roles are appropriately present or absent based on the `permission_type`." + }, + "PrivilegeDetailsScopeSchema": { + "properties": { + "scope_type": { + "$ref": "#/components/schemas/PrivilegeDetailsScopeTypeEnum" + }, + "client_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 8 + }, + { + "type": "null" + } + ], + "title": "Client Id" + }, + "client_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 60 + }, + { + "type": "null" + } + ], + "title": "Client Name" + } + }, + "type": "object", + "required": ["scope_type"], + "title": "PrivilegeDetailsScopeSchema" + }, + "PrivilegeDetailsScopeTypeEnum": { "type": "string", - "maxLength": 8 - }, - { - "type": "null" - } - ], - "title": "Client Id" - }, - "client_name": { - "anyOf": [ - { + "enum": ["Client", "District"], + "title": "PrivilegeDetailsScopeTypeEnum" + }, + "RoleType": { "type": "string", - "maxLength": 60 - }, - { - "type": "null" - } - ], - "title": "Client Name" - } - }, - "type": "object", - "required": [ - "scope_type" - ], - "title": "PrivilegeDetailsScopeSchema" - }, - "PrivilegeDetailsScopeTypeEnum": { - "type": "string", - "enum": [ - "Client", - "District" - ], - "title": "PrivilegeDetailsScopeTypeEnum" - }, - "RoleType": { - "type": "string", - "enum": [ - "A", - "C" - ], - "title": "RoleType" - }, - "UserType": { - "type": "string", - "enum": [ - "I", - "B" - ], - "title": "UserType" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" + "enum": ["A", "C"], + "title": "RoleType" + }, + "UserType": { + "type": "string", + "enum": ["I", "B"], + "title": "UserType" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } }, - { - "type": "integer" + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" + } + }, + "securitySchemes": { + "6jfveou69mgford233or30hmta": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "scopes": {}, + "authorizationUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/authorize", + "tokenUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/token" + } } - ] }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - } + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + } + } }, - "securitySchemes": { - "6jfveou69mgford233or30hmta": { - "type": "oauth2", - "flows": { - "authorizationCode": { - "scopes": { - - }, - "authorizationUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/authorize", - "tokenUrl": "https://dev-fam-user-pool-domain.auth.ca-central-1.amazoncognito.com/token" - } + "tags": [ + { + "name": "Forest Access Management - FAM", + "description": "Controls the user access to different Forest basedapplications and what roles different users will have once logged in" } - }, - "APIKeyHeader": { - "type": "apiKey", - "in": "header", - "name": "X-API-Key" - } - } - }, - "tags": [ - { - "name": "Forest Access Management - FAM", - "description": "Controls the user access to different Forest basedapplications and what roles different users will have once logged in" - } - ] -} \ No newline at end of file + ] +} diff --git a/client-code-gen/gen/admin-management-api/model/fam-application-base.ts b/client-code-gen/gen/admin-management-api/model/fam-application-base.ts index 94c2b4a81..b45042039 100644 --- a/client-code-gen/gen/admin-management-api/model/fam-application-base.ts +++ b/client-code-gen/gen/admin-management-api/model/fam-application-base.ts @@ -23,6 +23,12 @@ import { AppEnv } from './app-env'; * @interface FamApplicationBase */ export interface FamApplicationBase { + /** + * + * @type {number} + * @memberof FamApplicationBase + */ + 'application_id': number; /** * * @type {string} diff --git a/client-code-gen/gen/admin-management-api/model/fam-forest-client-base.ts b/client-code-gen/gen/admin-management-api/model/fam-forest-client-base.ts index acd407fce..913465846 100644 --- a/client-code-gen/gen/admin-management-api/model/fam-forest-client-base.ts +++ b/client-code-gen/gen/admin-management-api/model/fam-forest-client-base.ts @@ -20,6 +20,12 @@ * @interface FamForestClientBase */ export interface FamForestClientBase { + /** + * + * @type {string} + * @memberof FamForestClientBase + */ + 'client_name'?: string | null; /** * * @type {string} diff --git a/client-code-gen/gen/admin-management-api/model/fam-role-dto.ts b/client-code-gen/gen/admin-management-api/model/fam-role-dto.ts index 81d1bff53..6316e7472 100644 --- a/client-code-gen/gen/admin-management-api/model/fam-role-dto.ts +++ b/client-code-gen/gen/admin-management-api/model/fam-role-dto.ts @@ -40,7 +40,13 @@ export interface FamRoleDto { * @type {string} * @memberof FamRoleDto */ - 'description': string; + 'display_name'?: string | null; + /** + * + * @type {string} + * @memberof FamRoleDto + */ + 'description': string | null; /** * * @type {RoleType} diff --git a/client-code-gen/gen/admin-management-api/model/fam-role-with-client-dto.ts b/client-code-gen/gen/admin-management-api/model/fam-role-with-client-dto.ts index d63384271..755001702 100644 --- a/client-code-gen/gen/admin-management-api/model/fam-role-with-client-dto.ts +++ b/client-code-gen/gen/admin-management-api/model/fam-role-with-client-dto.ts @@ -41,6 +41,18 @@ export interface FamRoleWithClientDto { * @memberof FamRoleWithClientDto */ 'role_name': string; + /** + * + * @type {string} + * @memberof FamRoleWithClientDto + */ + 'display_name'?: string | null; + /** + * + * @type {string} + * @memberof FamRoleWithClientDto + */ + 'description': string | null; /** * * @type {FamForestClientBase} diff --git a/client-code-gen/gen/admin-management-api/package-lock.json b/client-code-gen/gen/admin-management-api/package-lock.json index 695e3339c..18e542802 100644 --- a/client-code-gen/gen/admin-management-api/package-lock.json +++ b/client-code-gen/gen/admin-management-api/package-lock.json @@ -1,123 +1,131 @@ { - "name": "typescript-axios", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "typescript-axios", - "version": "1.0.0", - "license": "Unlicense", - "dependencies": { - "axios": "1.7.4" - }, - "devDependencies": { - "typescript": "^4.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" + "name": "typescript-axios", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "typescript-axios", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "axios": "1.7.4" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^4.0" + } + }, + "node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } } - } } diff --git a/client-code-gen/gen/admin-management-api/package.json b/client-code-gen/gen/admin-management-api/package.json index 30e6e19a9..ab1f83903 100755 --- a/client-code-gen/gen/admin-management-api/package.json +++ b/client-code-gen/gen/admin-management-api/package.json @@ -1,32 +1,33 @@ { - "name": "typescript-axios", - "version": "1.0.0", - "description": "OpenAPI client for typescript-axios", - "author": "OpenAPI-Generator Contributors", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "keywords": [ - "axios", - "typescript", - "openapi-client", - "openapi-generator", - "typescript-axios" - ], - "license": "Unlicense", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "module": "./dist/esm/index.js", - "sideEffects": false, - "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", - "prepare": "npm run build" - }, - "dependencies": { - "axios": "1.7.4" - }, - "devDependencies": { - "typescript": "^4.0" - } + "name": "typescript-axios", + "version": "1.0.0", + "description": "OpenAPI client for typescript-axios", + "author": "OpenAPI-Generator Contributors", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "keywords": [ + "axios", + "typescript", + "openapi-client", + "openapi-generator", + "typescript-axios" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" + }, + "dependencies": { + "axios": "1.7.4" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^4.0" + } } diff --git a/client-code-gen/gen/app-access-control-api/.openapi-generator/FILES b/client-code-gen/gen/app-access-control-api/.openapi-generator/FILES index 05b7991c6..dee8dd029 100755 --- a/client-code-gen/gen/app-access-control-api/.openapi-generator/FILES +++ b/client-code-gen/gen/app-access-control-api/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore README.md api.ts api/bcscproxy-api.ts diff --git a/client-code-gen/gen/app-access-control-api/package-lock.json b/client-code-gen/gen/app-access-control-api/package-lock.json index 5280e353f..756996a95 100644 --- a/client-code-gen/gen/app-access-control-api/package-lock.json +++ b/client-code-gen/gen/app-access-control-api/package-lock.json @@ -1,140 +1,140 @@ { - "name": "typescript-axios", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "typescript-axios", - "version": "1.0.0", - "license": "Unlicense", - "dependencies": { - "axios": "1.7.4" - }, - "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^4.0" - } - }, - "node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" + "name": "typescript-axios", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "typescript-axios", + "version": "1.0.0", + "license": "Unlicense", + "dependencies": { + "axios": "1.7.4" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^4.0" + } + }, + "node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } } - } } diff --git a/client-code-gen/gen/app-access-control-api/package.json b/client-code-gen/gen/app-access-control-api/package.json index 39eaf7a04..ab1f83903 100755 --- a/client-code-gen/gen/app-access-control-api/package.json +++ b/client-code-gen/gen/app-access-control-api/package.json @@ -1,33 +1,33 @@ { - "name": "typescript-axios", - "version": "1.0.0", - "description": "OpenAPI client for typescript-axios", - "author": "OpenAPI-Generator Contributors", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "keywords": [ - "axios", - "typescript", - "openapi-client", - "openapi-generator", - "typescript-axios" - ], - "license": "Unlicense", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "module": "./dist/esm/index.js", - "sideEffects": false, - "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", - "prepare": "npm run build" - }, - "dependencies": { - "axios": "1.7.4" - }, - "devDependencies": { - "@types/node": "^12.11.5", - "typescript": "^4.0" - } + "name": "typescript-axios", + "version": "1.0.0", + "description": "OpenAPI client for typescript-axios", + "author": "OpenAPI-Generator Contributors", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "keywords": [ + "axios", + "typescript", + "openapi-client", + "openapi-generator", + "typescript-axios" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "module": "./dist/esm/index.js", + "sideEffects": false, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json", + "prepare": "npm run build" + }, + "dependencies": { + "axios": "1.7.4" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^4.0" + } } diff --git a/frontend/package-lock.json b/frontend/package-lock.json index fb79b55e0..b3a61c40a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,7 +9,8 @@ "version": "0.0.0", "dependencies": { "@bcgov-nr/nr-theme": "^1.8.9", - "@carbon/icons-vue": "^10.89.0", + "@carbon/icons-vue": "^10.99.1", + "@carbon/themes": "^11.43.0", "@carbon/type": "^11.31.0", "@tanstack/vue-query": "^5.56.2", "aws-amplify": "^5.3.21", @@ -18,7 +19,6 @@ "fam-admin-mgmt-api": "file:../client-code-gen/gen/admin-management-api", "fam-app-acsctl-api": "file:../client-code-gen/gen/app-access-control-api", "luxon": "^3.5.0", - "primeflex": "^3.3.1", "primevue": "3.46.0", "vee-validate": "^4.12.6", "vue": "^3.4.23", @@ -27,12 +27,14 @@ }, "devDependencies": { "@tanstack/vue-query-devtools": "^5.56.2", + "@tsconfig/node20": "^20.1.4", "@types/bootstrap": "^5.2.5", "@types/luxon": "^3.4.2", + "@types/node": "^20.16.11", "@vitejs/plugin-vue": "^4.0.0", "@vitest/coverage-v8": "^0.34.0", "@vue/test-utils": "^2.4.5", - "@vue/tsconfig": "0.1.3", + "@vue/tsconfig": "^0.5.1", "jsdom": "^22.0.0", "npm-run-all2": "^6.0.0", "sass": "^1.77.1", @@ -52,6 +54,7 @@ "axios": "1.7.4" }, "devDependencies": { + "@types/node": "^12.11.5", "typescript": "^4.0" } }, @@ -7602,52 +7605,81 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@carbon/colors": { + "version": "11.28.0", + "resolved": "https://registry.npmjs.org/@carbon/colors/-/colors-11.28.0.tgz", + "integrity": "sha512-zmNJk5Ec453aL3bk9RRSmM+dkVbyVMvUuKd6szJCOWLoqBFBXbd3PDRZO0AZeHp/Iel9sBRf1gUYej1BJ/5+hw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@ibm/telemetry-js": "^1.5.0" + } + }, "node_modules/@carbon/grid": { - "version": "11.27.0", - "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-11.27.0.tgz", - "integrity": "sha512-UfFFpZCagdQf/PRmCQrmx8OnOBwgNmef0C0XP8tWt07DBCaa4cKI7/GI1hR2RW6EnrlHT1+d2Uk81e3EHnovmw==", + "version": "11.29.0", + "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-11.29.0.tgz", + "integrity": "sha512-SAJhTexN6TjbItcUczOqhzgHBGXLhvUhlTdyqj+wzUH0tqEN8g6gLp+1sn9+rL+kV4obSb/7bdSESZtwQr/tQg==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@carbon/layout": "^11.26.0", + "@carbon/layout": "^11.28.0", "@ibm/telemetry-js": "^1.5.0" } }, "node_modules/@carbon/icon-helpers": { - "version": "10.47.0", - "resolved": "https://registry.npmjs.org/@carbon/icon-helpers/-/icon-helpers-10.47.0.tgz", - "integrity": "sha512-vv2Wkuw7lYkYVKrn5ABzlZD+6ioAYwMuyKi2XPqYY3hrHYoL4CQUnuSFDhlj0DR2HHCB0L5MGRLxHLucx5cc7g==", + "version": "10.53.1", + "resolved": "https://registry.npmjs.org/@carbon/icon-helpers/-/icon-helpers-10.53.1.tgz", + "integrity": "sha512-xRON96jbFLYClsxi/oaLSwT/Z5AePGY85J8bsAuLl4CzAiFFi8M/edzKEgtUYgRH3WSTQDuVzWsyuCoAx7Pmfw==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@ibm/telemetry-js": "^1.2.1" + "@ibm/telemetry-js": "^1.5.0" } }, "node_modules/@carbon/icons-vue": { - "version": "10.89.0", - "resolved": "https://registry.npmjs.org/@carbon/icons-vue/-/icons-vue-10.89.0.tgz", - "integrity": "sha512-uuzBAeH3tOJ+OVZSyutG9IoXSxhQ+pDp+JkH40h6bSZsvsmsxP6J6hxF8D5keCY9I1wxFFUvFHKS3JjS38P9yg==", + "version": "10.99.1", + "resolved": "https://registry.npmjs.org/@carbon/icons-vue/-/icons-vue-10.99.1.tgz", + "integrity": "sha512-VC0mRjGri+Ghv8Zkk3iUoaVYUTHLstXj5sB+qYnqPi1sKlE8lUOokgO+r8ReipFUq3um8xze/BXzEjWJQtYC6A==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@carbon/icon-helpers": "^10.47.0", - "@ibm/telemetry-js": "^1.2.1" + "@carbon/icon-helpers": "^10.53.1", + "@ibm/telemetry-js": "^1.5.0" } }, "node_modules/@carbon/layout": { - "version": "11.26.0", - "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-11.26.0.tgz", - "integrity": "sha512-PYA2c9y9OaVwuxnTo9ez2FQfKZKejIvbpRdCedB4Z61JAfv03e7ZKU55AdKUstdElanL4HS/drEE/H71siPoiw==", + "version": "11.28.0", + "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-11.28.0.tgz", + "integrity": "sha512-Yl0Dsxs00EgAaCKpZCXgebuf9BwiBK66a1Oiao6D12p3ViciZ4L18mlRgOPBcDlolP2tUtncz48TlfkWC097hQ==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { "@ibm/telemetry-js": "^1.5.0" } }, + "node_modules/@carbon/themes": { + "version": "11.43.0", + "resolved": "https://registry.npmjs.org/@carbon/themes/-/themes-11.43.0.tgz", + "integrity": "sha512-iBDxHVn1y7QYKVCeBqMjLzryDl5mUG2C67KQbJqGqCfYMKI8L+dkw6KmeeWUYv8rhRhqZq27mm+AODchXO0zcw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@carbon/colors": "^11.28.0", + "@carbon/layout": "^11.28.0", + "@carbon/type": "^11.33.0", + "@ibm/telemetry-js": "^1.5.0", + "color": "^4.0.0" + } + }, "node_modules/@carbon/type": { - "version": "11.31.0", - "resolved": "https://registry.npmjs.org/@carbon/type/-/type-11.31.0.tgz", - "integrity": "sha512-ehcLIp8MOUy828hkcU5TZldvJPmXHAu55f9cUa5K9OU2LRjddwdYUIqOr3PlCiPQgXl9M/rvce4hXAHCfdwYeg==", + "version": "11.33.0", + "resolved": "https://registry.npmjs.org/@carbon/type/-/type-11.33.0.tgz", + "integrity": "sha512-v3lfot0vcHNw6WDe32ap3ewpMGwUqhZ6z56sN11jzngRrWVPFgA9U7NciuoylFw301l2htJuZu0dBS2F4ViCXQ==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@carbon/grid": "^11.27.0", - "@carbon/layout": "^11.26.0", + "@carbon/grid": "^11.29.0", + "@carbon/layout": "^11.28.0", "@ibm/telemetry-js": "^1.5.0" } }, @@ -8996,6 +9028,13 @@ "node": ">= 10" } }, + "node_modules/@tsconfig/node20": { + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", + "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", + "dev": true, + "license": "MIT" + }, "node_modules/@turf/boolean-clockwise": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-6.5.0.tgz", @@ -9092,11 +9131,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.10.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz", - "integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==", + "version": "20.16.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.11.tgz", + "integrity": "sha512-y+cTCACu92FyA5fgQSAI8A1H429g7aSK2HsO7K4XYUWc4dY5IUz55JSDIYT6/VsOLfGy8vmvQYC2hfb0iF16Uw==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/node-fetch": { @@ -9520,18 +9560,11 @@ } }, "node_modules/@vue/tsconfig": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.1.3.tgz", - "integrity": "sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.5.1.tgz", + "integrity": "sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==", "dev": true, - "peerDependencies": { - "@types/node": "*" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } + "license": "MIT" }, "node_modules/abab": { "version": "2.0.6", @@ -10387,6 +10420,19 @@ "node": ">=6" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -10403,6 +10449,16 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -14039,11 +14095,6 @@ "@types/yargs-parser": "*" } }, - "node_modules/primeflex": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/primeflex/-/primeflex-3.3.1.tgz", - "integrity": "sha512-zaOq3YvcOYytbAmKv3zYc+0VNS9Wg5d37dfxZnveKBFPr7vEIwfV5ydrpiouTft8MVW6qNjfkaQphHSnvgQbpQ==" - }, "node_modules/primevue": { "version": "3.46.0", "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.46.0.tgz", @@ -14954,6 +15005,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -15634,9 +15700,10 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" }, "node_modules/unfetch": { "version": "4.2.0", diff --git a/frontend/package.json b/frontend/package.json index 61ec1604a..a82842bc6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,7 @@ { "name": "fam-frontend", "version": "0.0.0", + "type": "module", "scripts": { "install-app-access-control-api-client": "cd ../client-code-gen/gen/app-access-control-api && npm ci", "install-admin-management-api-client": "cd ../client-code-gen/gen/admin-management-api && npm ci", @@ -16,7 +17,8 @@ }, "dependencies": { "@bcgov-nr/nr-theme": "^1.8.9", - "@carbon/icons-vue": "^10.89.0", + "@carbon/icons-vue": "^10.99.1", + "@carbon/themes": "^11.43.0", "@carbon/type": "^11.31.0", "@tanstack/vue-query": "^5.56.2", "aws-amplify": "^5.3.21", @@ -25,7 +27,6 @@ "fam-admin-mgmt-api": "file:../client-code-gen/gen/admin-management-api", "fam-app-acsctl-api": "file:../client-code-gen/gen/app-access-control-api", "luxon": "^3.5.0", - "primeflex": "^3.3.1", "primevue": "3.46.0", "vee-validate": "^4.12.6", "vue": "^3.4.23", @@ -34,12 +35,14 @@ }, "devDependencies": { "@tanstack/vue-query-devtools": "^5.56.2", + "@tsconfig/node20": "^20.1.4", "@types/bootstrap": "^5.2.5", "@types/luxon": "^3.4.2", + "@types/node": "^20.16.11", "@vitejs/plugin-vue": "^4.0.0", "@vitest/coverage-v8": "^0.34.0", "@vue/test-utils": "^2.4.5", - "@vue/tsconfig": "0.1.3", + "@vue/tsconfig": "^0.5.1", "jsdom": "^22.0.0", "npm-run-all2": "^6.0.0", "sass": "^1.77.1", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 8099b674b..4bd34b25b 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,34 +1,32 @@ diff --git a/frontend/src/assets/styles/card.scss b/frontend/src/assets/styles/card.scss index 31af8ab16..ff3eac10d 100644 --- a/frontend/src/assets/styles/card.scss +++ b/frontend/src/assets/styles/card.scss @@ -1,50 +1,34 @@ -@use 'sass:map'; -@use '@bcgov-nr/nr-theme/design-tokens/light-theme.scss' as lightTheme; +@use "sass:map"; +@use "@bcgov-nr/nr-theme/design-tokens/light-theme.scss" as lightTheme; -.p-card .p-card-header { - display: flex; - padding: 1.5rem; - align-items: center; +.custom-card-container { + .p-card { + .p-card-header { + display: flex; + padding: 1.5rem; + align-items: center; - svg { - color: map.get(lightTheme.$light-theme, 'support-success'); - margin-bottom: 0.1rem; - } - - p { - margin: 0; - padding: 0 0 0 1rem; - display: inline-flex; - margin-bottom: 0; - color: map.get(lightTheme.$light-theme, 'text-primary'); - font-size: 0.875rem; - font-style: normal; - font-weight: 700; - line-height: 1.125rem; /* 128.571% */ - letter-spacing: 0.01rem; - } -} + svg { + color: map.get(lightTheme.$light-theme, "support-success"); + margin-bottom: 0.1rem; + } -.p-card .p-card-content { - display: flex; - padding: 0; - margin: 0; - - div { - display: flex; - flex-direction: column; - align-self: center; - } - - label { - color: map.get(lightTheme.$light-theme, 'text-primary'); - margin: 0 0 0.75rem; - } + p { + margin: 0; + padding: 0 0 0 1rem; + display: inline-flex; + margin-bottom: 0; + color: map.get(lightTheme.$light-theme, "text-primary"); + font-size: 0.875rem; + font-style: normal; + font-weight: 700; + line-height: 1.125rem; /* 128.571% */ + letter-spacing: 0.01rem; + } + } - span { - margin: 0; - font-size: 0.875rem; - line-height: 1.25rem; - letter-spacing: 0.01rem; + .custom-carbon-icon-misuse { + fill: var(--support-error); + } } } diff --git a/frontend/src/assets/styles/default-theme.scss b/frontend/src/assets/styles/default-theme.scss index 0c8170256..3f614839c 100644 --- a/frontend/src/assets/styles/default-theme.scss +++ b/frontend/src/assets/styles/default-theme.scss @@ -1,61 +1,64 @@ -@use 'sass:map'; -@use '@bcgov-nr/nr-theme/design-tokens/light-theme.scss' as lightTheme; -@use '@bcgov-nr/nr-theme/design-tokens/dark-theme.scss' as darkTheme; -@use '@bcgov-nr/nr-theme/design-tokens/light-notifications.scss' as lightNotifications; +@use "sass:map"; +@use "@bcgov-nr/nr-theme/design-tokens/light-theme.scss" as lightTheme; +@use "@bcgov-nr/nr-theme/design-tokens/dark-theme.scss" as darkTheme; + +@use "@bcgov-nr/nr-theme/design-tokens/light-notifications.scss" as + lightNotifications; // need to use type family first, and then use stylesheet, so the body type tokens can get the font path correctly -@use '@bcgov-nr/nr-theme/design-tokens/type-family.scss'; -@use '@bcgov-nr/nr-theme/style-sheets/primevue-components-overrides.scss'; +@use "@bcgov-nr/nr-theme/design-tokens/type-family.scss"; +@use "@bcgov-nr/nr-theme/style-sheets/primevue-components-overrides.scss"; // Header $header-height: 3rem; $header-width: 100vw; // Card -$card-width: 38rem; -$card-margin-top: 2rem; //darkTheme -$dark-text-primary: map.get(darkTheme.$dark-theme, 'text-primary'); -$text-on-color: map.get(darkTheme.$dark-theme, 'text-on-color'); +$dark-text-primary: map.get(darkTheme.$dark-theme, "text-primary"); +$text-on-color: map.get(darkTheme.$dark-theme, "text-on-color"); //lightTheme -$light-layer-selected-01: map.get(lightTheme.$light-theme, 'layer-selected-01'); -$light-layer-hover-01: map.get(lightTheme.$light-theme, 'layer-hover-01'); +$light-layer-selected-01: map.get(lightTheme.$light-theme, "layer-selected-01"); +$light-layer-hover-01: map.get(lightTheme.$light-theme, "layer-hover-01"); $light-layer-selected-hover-01: map.get( lightTheme.$light-theme, - 'layer-selected-hover-01' + "layer-selected-hover-01" ); -$light-link-primary: map.get(lightTheme.$light-theme, 'link-primary'); +$light-link-primary: map.get(lightTheme.$light-theme, "link-primary"); $light-link-primary-hover: map.get( lightTheme.$light-theme, - 'link-primary-hover' + "link-primary-hover" +); +$light-background-inverse: map.get( + lightTheme.$light-theme, + "background-inverse" ); -$light-background-inverse: map.get(lightTheme.$light-theme, 'background-inverse'); //border $light-border-interactive: map.get( lightTheme.$light-theme, - 'border-interactive' + "border-interactive" ); -$light-border-subtle-00: map.get(lightTheme.$light-theme, 'border-subtle-00'); -$light-border-strong-01: map.get(lightTheme.$light-theme, 'border-strong-01'); +$light-border-subtle-00: map.get(lightTheme.$light-theme, "border-subtle-00"); +$light-border-strong-01: map.get(lightTheme.$light-theme, "border-strong-01"); //text -$light-text-primary: map.get(lightTheme.$light-theme, 'text-primary'); -$light-text-secondary: map.get(lightTheme.$light-theme, 'text-secondary'); -$light-text-error: map.get(lightTheme.$light-theme, 'text-error'); +$light-text-primary: map.get(lightTheme.$light-theme, "text-primary"); +$light-text-secondary: map.get(lightTheme.$light-theme, "text-secondary"); +$light-text-error: map.get(lightTheme.$light-theme, "text-error"); -$light-background-brand: map.get(lightTheme.$light-theme, 'background-brand'); -$light-interactive: map.get(lightTheme.$light-theme, 'interactive'); +$light-background-brand: map.get(lightTheme.$light-theme, "background-brand"); +$light-interactive: map.get(lightTheme.$light-theme, "interactive"); //background -$light-layer-one: map.get(lightTheme.$light-theme, 'layer-01'); -$light-layer-two: map.get(lightTheme.$light-theme, 'layer-02'); +$light-layer-one: map.get(lightTheme.$light-theme, "layer-01"); +$light-layer-two: map.get(lightTheme.$light-theme, "layer-02"); //support -$light-support-error: map.get(lightTheme.$light-theme, 'support-error'); -$light-support-success: map.get(lightTheme.$light-theme, 'support-success'); +$light-support-error: map.get(lightTheme.$light-theme, "support-error"); +$light-support-success: map.get(lightTheme.$light-theme, "support-success"); //icon -$light-icon-primary: map.get(lightTheme.$light-theme, 'icon-primary'); -$light-icon-on-color: map.get(lightTheme.$light-theme, 'icon-on-color'); +$light-icon-primary: map.get(lightTheme.$light-theme, "icon-primary"); +$light-icon-on-color: map.get(lightTheme.$light-theme, "icon-on-color"); diff --git a/frontend/src/assets/styles/icon.scss b/frontend/src/assets/styles/icon.scss index e93fc57cc..f764ba22f 100644 --- a/frontend/src/assets/styles/icon.scss +++ b/frontend/src/assets/styles/icon.scss @@ -1,11 +1,11 @@ -@import '@/assets/styles/styles.scss'; +@import "@/assets/styles/styles.scss"; .custom-carbon-icon-misuse { - color: $light-support-error !important; + color: $light-support-error; } .custom-carbon-icon-checkmark--filled { - color: $light-support-success !important; + color: $light-support-success; } .custom-carbon-icon-user--follow, diff --git a/frontend/src/assets/styles/layout.scss b/frontend/src/assets/styles/layout.scss index e42bdd09b..39646aee9 100644 --- a/frontend/src/assets/styles/layout.scss +++ b/frontend/src/assets/styles/layout.scss @@ -1,5 +1,4 @@ body { - overflow: hidden; padding: 0; margin: 0; } @@ -15,8 +14,6 @@ label { height: calc(100vh - $header-height); width: 100vw; bottom: 0; - overflow-y: auto; - overflow-x: hidden; padding: 1.06rem 1rem 0 1rem; } @@ -34,7 +31,7 @@ input::-webkit-inner-spin-button { } /* Firefox */ -input[type='number'] { +input[type="number"] { -moz-appearance: textfield; } @@ -69,15 +66,8 @@ input[type='number'] { .invalid { font-size: 0.875em; color: $light-text-error; -} - -.custom-card { - margin-top: $card-margin-top; - width: 100%; -} - -.data-table-container { - z-index: -1; + display: flex; + align-items: center; } .custom-data-table { @@ -94,34 +84,15 @@ input[type='number'] { } } -@media (max-width: 390px) { - .data-table-container { - margin: 0; - padding: 0; - } -} - @media (min-width: 768px) { .main { padding: 2.5rem 2.5rem 0 2.5rem; width: 100vw; } + .form-container { width: 38rem; } - - .custom-card { - width: $card-width; - } - - .data-table-container { - margin: 0; - padding: 0; - } - - .no-app-selected { - margin: 0 14rem; - } } @media (min-width: 1024px) { @@ -134,22 +105,3 @@ input[type='number'] { width: calc(100vw - 16rem); } } - -@media (min-width: 1280px) { - .no-app-selected { - margin: 0 25rem; - } -} - -@media (min-width: 1536px) { - .no-app-selected { - margin: 0 33rem; - } -} - -@media (min-width: 1920px) { - .no-app-selected { - margin: 0 43.3rem; - width: auto; - } -} diff --git a/frontend/src/assets/styles/styles.scss b/frontend/src/assets/styles/styles.scss index 85afb3597..5e6332052 100644 --- a/frontend/src/assets/styles/styles.scss +++ b/frontend/src/assets/styles/styles.scss @@ -1,28 +1,22 @@ -@use 'sass:map'; -@use '@bcgov-nr/nr-theme/design-tokens/type-family.scss' as typeFamily; +@use "sass:map"; +@use "@bcgov-nr/nr-theme/design-tokens/type-family.scss" as typeFamily; +@use "@carbon/type" as type; // Import all of Bootstrap's CSS -@import '~bootstrap/scss/bootstrap'; +@import "~bootstrap/scss/bootstrap"; -@import 'base'; - -// Components -@import '@bcgov-nr/nr-theme/style-sheets/primevue-components-overrides.scss'; +@import "base"; :root { - --font-family: map.get(typeFamily.$type-family, 'sans'); + --font-family: map.get(typeFamily.$type-family, "sans"); --primevue-striped-row-color: rgba(0, 0, 0, 0.05); } body { - font-family: map.get(typeFamily.$type-family, 'sans'); + font-family: map.get(typeFamily.$type-family, "sans"); } /* ----------------- form input styles --------------------------- */ -.form-field { - margin-bottom: 1.5rem; -} - .input-with-verify-button { padding: 0; width: 100%; @@ -31,7 +25,7 @@ body { } .custom-height { - max-height: 2.813rem !important; + max-height: 2.5rem; } .button-stack { @@ -44,10 +38,14 @@ body { grid-template-columns: 1fr 1fr; Button { - width: auto !important; + width: auto; } } +p { + margin: 0; +} + // when screen width < 390px @media (max-width: 390px) { .input-with-verify-button { @@ -63,12 +61,42 @@ body { width: 38rem; Button { - width: 15rem !important; + width: 15rem; gap: 2rem; white-space: nowrap; } } .p-dialog { - max-width: 40rem !important; + max-width: 40rem; + } +} + +.fam-table { + p { + margin: 0; + } + + background: var(--layer-02, #fff); + + border-radius: 0 0.25rem 0.25rem 0.25rem; + border: 0.0625rem solid var(--border-subtle-00); + + .p-datatable-thead { + .p-column-title { + padding: 1rem 1rem 1rem 0; + color: var(--text-primary); + } + svg { + margin: 0; + } } + + .p-datatable-tbody { + @include type.type-style("body-01"); + color: var(--text-primary); + } +} + +.error-icon { + fill: var(--support-error); } diff --git a/frontend/src/assets/styles/themes.scss b/frontend/src/assets/styles/themes.scss new file mode 100644 index 000000000..4c5ad8329 --- /dev/null +++ b/frontend/src/assets/styles/themes.scss @@ -0,0 +1,17 @@ +@use "sass:map"; +@use "@bcgov-nr/nr-theme/design-tokens/light-theme.scss" as light; +@use "@bcgov-nr/nr-theme/design-tokens/dark-theme.scss" as dark; + +@use "@carbon/themes/scss/themes"; +@use "@carbon/themes/scss/theme" with ( + $theme: light.$light-theme, + $fallback: themes.$white +); + +@forward "@carbon/themes/scss/theme"; + +:root { + @each $key, $value in light.$light-theme { + --#{$key}: #{$value}; + } +} diff --git a/frontend/src/components/AddPermissions/ForestClientCard.vue b/frontend/src/components/AddPermissions/ForestClientCard.vue new file mode 100644 index 000000000..b31b6b1ec --- /dev/null +++ b/frontend/src/components/AddPermissions/ForestClientCard.vue @@ -0,0 +1,174 @@ + + + + diff --git a/frontend/src/components/AddPermissions/ForestClientSection.vue b/frontend/src/components/AddPermissions/ForestClientSection.vue new file mode 100644 index 000000000..9941b9ccc --- /dev/null +++ b/frontend/src/components/AddPermissions/ForestClientSection.vue @@ -0,0 +1,400 @@ + + + + + diff --git a/frontend/src/components/AddPermissions/RoleSelectTable.vue b/frontend/src/components/AddPermissions/RoleSelectTable.vue new file mode 100644 index 000000000..f276ba612 --- /dev/null +++ b/frontend/src/components/AddPermissions/RoleSelectTable.vue @@ -0,0 +1,90 @@ + + + + diff --git a/frontend/src/components/grantaccess/form/UserDomainSelect.vue b/frontend/src/components/AddPermissions/UserDomainSelect.vue similarity index 64% rename from frontend/src/components/grantaccess/form/UserDomainSelect.vue rename to frontend/src/components/AddPermissions/UserDomainSelect.vue index 1f7aba581..a860dbdb1 100644 --- a/frontend/src/components/grantaccess/form/UserDomainSelect.vue +++ b/frontend/src/components/AddPermissions/UserDomainSelect.vue @@ -1,22 +1,26 @@ @@ -29,7 +33,7 @@ const computedDomain = computed({ v-model="computedDomain" inputId="idirSelect" name="domainRadioOptions" - :value="domainOptions.IDIR" + :value="UserType.I" /> @@ -38,7 +42,7 @@ const computedDomain = computed({ v-model="computedDomain" inputId="businessBceidSelect" name="domainRadioOptions" - :value="domainOptions.BCEID" + :value="UserType.B" />