From 5188d0eb58055308d37ebd3c7404982839d1c789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ver=C3=B3nika=20Sif=20Sigur=C3=B0ard=C3=B3ttir?= Date: Wed, 5 Feb 2025 14:43:56 +0000 Subject: [PATCH] feat(new-primary-school): Update key-options and api name (#17809) * [TS-971] Update key-options and api name * Update messages --- charts/islandis-services/api/values.dev.yaml | 2 +- charts/islandis-services/api/values.prod.yaml | 2 +- .../islandis-services/api/values.staging.yaml | 2 +- .../application-system-api/values.dev.yaml | 2 +- .../application-system-api/values.prod.yaml | 2 +- .../values.staging.yaml | 2 +- charts/islandis/values.dev.yaml | 4 +- charts/islandis/values.prod.yaml | 4 +- charts/islandis/values.staging.yaml | 4 +- infra/src/dsl/xroad.ts | 6 +- .../fields/ContactsTableRepeater/index.tsx | 8 +- .../AllergiesAndIntolerances.tsx | 4 +- .../Review/review-groups/FreeSchoolMeal.tsx | 2 +- .../allergiesAndIntolerancesSubSection.ts | 4 +- .../freeSchoolMealSubSection.ts | 2 +- .../new-primary-school/src/lib/constants.ts | 7 +- .../new-primary-school/src/lib/messages.ts | 38 +- libs/clients/mms/frigg/project.json | 2 +- libs/clients/mms/frigg/src/clientConfig.json | 381 +++++++++++++++--- .../mms/frigg/src/lib/friggClient.config.ts | 2 +- .../mms/frigg/src/lib/friggClient.service.ts | 2 +- 21 files changed, 369 insertions(+), 113 deletions(-) diff --git a/charts/islandis-services/api/values.dev.yaml b/charts/islandis-services/api/values.dev.yaml index 004e51a22b4d..619e9812fe4b 100644 --- a/charts/islandis-services/api/values.dev.yaml +++ b/charts/islandis-services/api/values.dev.yaml @@ -120,7 +120,7 @@ env: XROAD_INNA_PATH: 'IS-DEV/GOV/10066/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS-DEV/GOV/10030/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS-DEV/GOV/10014/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS-DEV/GOV/10066/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS-DEV/GOV/10066/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]' diff --git a/charts/islandis-services/api/values.prod.yaml b/charts/islandis-services/api/values.prod.yaml index 88ccb252d185..73a55b526166 100644 --- a/charts/islandis-services/api/values.prod.yaml +++ b/charts/islandis-services/api/values.prod.yaml @@ -120,7 +120,7 @@ env: XROAD_INNA_PATH: 'IS/GOV/6601241280/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS/GOV/6501912189/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS/GOV/5804170510/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS/GOV/6601241280/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS/GOV/6601241280/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]' diff --git a/charts/islandis-services/api/values.staging.yaml b/charts/islandis-services/api/values.staging.yaml index b63b0b309781..c750de62eee7 100644 --- a/charts/islandis-services/api/values.staging.yaml +++ b/charts/islandis-services/api/values.staging.yaml @@ -120,7 +120,7 @@ env: XROAD_INNA_PATH: 'IS-TEST/GOV/6601241280/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS-TEST/GOV/6501912189/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS-TEST/GOV/10014/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS-TEST/GOV/6601241280/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS-TEST/GOV/6601241280/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]' diff --git a/charts/islandis-services/application-system-api/values.dev.yaml b/charts/islandis-services/application-system-api/values.dev.yaml index 93ed7e47e392..c457c63ba342 100644 --- a/charts/islandis-services/application-system-api/values.dev.yaml +++ b/charts/islandis-services/application-system-api/values.dev.yaml @@ -103,7 +103,7 @@ env: XROAD_HOLAR_UNIVERSITY_PATH: 'IS-DEV/EDU/10055/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS-DEV/EDU/10049/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS-DEV/GOV/10066/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS-DEV/GOV/10001/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS-DEV/GOV/10014/DMR-Protected/official-journal-application' diff --git a/charts/islandis-services/application-system-api/values.prod.yaml b/charts/islandis-services/application-system-api/values.prod.yaml index 59743d74b77c..f8a5078aa776 100644 --- a/charts/islandis-services/application-system-api/values.prod.yaml +++ b/charts/islandis-services/application-system-api/values.prod.yaml @@ -103,7 +103,7 @@ env: XROAD_HOLAR_UNIVERSITY_PATH: 'IS/EDU/5001694359/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS/EDU/4210984099/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS/GOV/6601241280/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS/GOV/6503760649/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS/GOV/10014/DMR-Protected/official-journal-application' diff --git a/charts/islandis-services/application-system-api/values.staging.yaml b/charts/islandis-services/application-system-api/values.staging.yaml index 64c4570d446f..4480236ca962 100644 --- a/charts/islandis-services/application-system-api/values.staging.yaml +++ b/charts/islandis-services/application-system-api/values.staging.yaml @@ -103,7 +103,7 @@ env: XROAD_HOLAR_UNIVERSITY_PATH: 'IS-TEST/EDU/10055/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS-TEST/EDU/10049/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS-TEST/GOV/6601241280/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS-TEST/GOV/6503760649/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS-TEST/GOV/10014/DMR-Protected/official-journal-application' diff --git a/charts/islandis/values.dev.yaml b/charts/islandis/values.dev.yaml index 5136eeda1507..637617d3f8ec 100644 --- a/charts/islandis/values.dev.yaml +++ b/charts/islandis/values.dev.yaml @@ -371,7 +371,7 @@ api: XROAD_INNA_PATH: 'IS-DEV/GOV/10066/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS-DEV/GOV/10030/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS-DEV/GOV/10014/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS-DEV/GOV/10066/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS-DEV/GOV/10066/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]' @@ -663,7 +663,7 @@ application-system-api: XROAD_HOLAR_UNIVERSITY_PATH: 'IS-DEV/EDU/10055/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS-DEV/EDU/10049/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS-DEV/GOV/10066/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS-DEV/GOV/10001/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS-DEV/GOV/10014/DMR-Protected/official-journal-application' diff --git a/charts/islandis/values.prod.yaml b/charts/islandis/values.prod.yaml index 78de24b4587c..9280241ddd23 100644 --- a/charts/islandis/values.prod.yaml +++ b/charts/islandis/values.prod.yaml @@ -359,7 +359,7 @@ api: XROAD_INNA_PATH: 'IS/GOV/6601241280/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS/GOV/6501912189/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS/GOV/5804170510/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS/GOV/6601241280/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS/GOV/6601241280/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]' @@ -651,7 +651,7 @@ application-system-api: XROAD_HOLAR_UNIVERSITY_PATH: 'IS/EDU/5001694359/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS/EDU/4210984099/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS/GOV/6601241280/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS/GOV/6503760649/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS/GOV/10014/DMR-Protected/official-journal-application' diff --git a/charts/islandis/values.staging.yaml b/charts/islandis/values.staging.yaml index 01cd2763ebfe..02e58a59c01d 100644 --- a/charts/islandis/values.staging.yaml +++ b/charts/islandis/values.staging.yaml @@ -371,7 +371,7 @@ api: XROAD_INNA_PATH: 'IS-TEST/GOV/6601241280/MMS-Protected/inna-v1' XROAD_INTELLECTUAL_PROPERTIES_PATH: 'IS-TEST/GOV/6501912189/WebAPI-Public/HUG-webAPI' XROAD_JUDICIAL_SYSTEM_SP_PATH: 'IS-TEST/GOV/10014/Rettarvorslugatt-Private/judicial-system-mailbox-api' - XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-api' XROAD_MMS_GRADE_SERVICE_ID: 'IS-TEST/GOV/6601241280/MMS-Protected/grade-api-v1' XROAD_MMS_LICENSE_SERVICE_ID: 'IS-TEST/GOV/6601241280/MMS-Protected/license-api-v1' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]' @@ -660,7 +660,7 @@ application-system-api: XROAD_HOLAR_UNIVERSITY_PATH: 'IS-TEST/EDU/10055/Holar-Protected/brautskraning-v1' XROAD_ICELAND_UNIVERSITY_OF_THE_ARTS_PATH: 'IS-TEST/EDU/10049/LHI-Protected/brautskraning-v1' XROAD_INNA_PATH: 'IS-TEST/GOV/6601241280/MMS-Protected/inna-v1' - XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-service' + XROAD_MMS_FRIGG_PATH: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-api' XROAD_NATIONAL_REGISTRY_REDIS_NODES: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]' XROAD_NATIONAL_REGISTRY_SERVICE_PATH: 'IS-TEST/GOV/6503760649/SKRA-Protected/Einstaklingar-v1' XROAD_OFFICIAL_JOURNAL_APPLICATION_PATH: 'IS-TEST/GOV/10014/DMR-Protected/official-journal-application' diff --git a/infra/src/dsl/xroad.ts b/infra/src/dsl/xroad.ts index d09a0c2b9fad..2ebfd16e5ad0 100644 --- a/infra/src/dsl/xroad.ts +++ b/infra/src/dsl/xroad.ts @@ -906,9 +906,9 @@ export const OfficialJournalOfIcelandApplication = new XroadConf({ export const Frigg = new XroadConf({ env: { XROAD_MMS_FRIGG_PATH: { - dev: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service', - staging: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-service', - prod: 'IS/GOV/10066/MMS-Protected/frigg-form-service', + dev: 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api', + staging: 'IS-TEST/GOV/10066/MMS-Protected/frigg-form-api', + prod: 'IS/GOV/10066/MMS-Protected/frigg-form-api', }, }, }) diff --git a/libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx b/libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx index 08784e4ecf8f..b392fab4ddcb 100644 --- a/libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx +++ b/libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx @@ -52,7 +52,7 @@ const ContactsTableRepeater: FC> = ({ label: newPrimarySchoolMessages.shared.fullName, width: 'half', type: 'text', - dataTestId: 'relative-full-name', + dataTestId: 'contact-full-name', }, phoneNumber: { component: 'input', @@ -61,7 +61,7 @@ const ContactsTableRepeater: FC> = ({ type: 'tel', format: '###-####', placeholder: '000-0000', - dataTestId: 'relative-phone-number', + dataTestId: 'contact-phone-number', }, nationalId: { component: 'input', @@ -70,7 +70,7 @@ const ContactsTableRepeater: FC> = ({ type: 'text', format: '######-####', placeholder: '000000-0000', - dataTestId: 'relative-national-id', + dataTestId: 'contact-national-id', }, relation: { component: 'select', @@ -78,7 +78,7 @@ const ContactsTableRepeater: FC> = ({ width: 'half', placeholder: newPrimarySchoolMessages.shared.relationPlaceholder, options: relationFriggOptions, - dataTestId: 'relative-relation', + dataTestId: 'contact-relation', }, }, table: { diff --git a/libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx b/libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx index e50328bb7363..4a5a0f45219f 100644 --- a/libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx +++ b/libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx @@ -41,13 +41,13 @@ export const AllergiesAndIntolerances = ({ options: foodAllergiesOrIntolerancesOptions, loading: foodAllergiesOrIntolerancesLoading, error: foodAllergiesOrIntolerancesError, - } = useFriggOptions(OptionsType.INTOLERANCE) // TODO: Update when Júní has updated key-options + } = useFriggOptions(OptionsType.FOOD_ALLERGY_AND_INTOLERANCE) const { options: otherAllergiesOptions, loading: otherAllergiesLoading, error: otherAllergiesError, - } = useFriggOptions(OptionsType.ALLERGY) // TODO: Update when Júní has updated key-options + } = useFriggOptions(OptionsType.ALLERGY) return ( src/clientConfig.json", + "curl -H \"X-Road-Client: IS-DEV/GOV/10000/island-is-client\" http://localhost:8081/r1/IS-DEV/GOV/10066/MMS-Protected/getOpenAPI?serviceCode=frigg-form-api > src/clientConfig.json", "prettier --write src/clientConfig.json" ], "parallel": false, diff --git a/libs/clients/mms/frigg/src/clientConfig.json b/libs/clients/mms/frigg/src/clientConfig.json index 8bbfcae254ef..eba63846a186 100644 --- a/libs/clients/mms/frigg/src/clientConfig.json +++ b/libs/clients/mms/frigg/src/clientConfig.json @@ -25,15 +25,14 @@ } } }, - "tags": ["Frigg"], - "security": [{ "bearer": [] }] + "security": [{ "bearer": [] }], + "tags": ["Frigg"] } }, "/forms/types": { "get": { - "operationId": "getFormTypes", - "summary": "Get list of types of forms", "description": "Get types.", + "operationId": "getFormTypes", "parameters": [], "responses": { "200": { @@ -45,48 +44,15 @@ } } }, - "tags": ["Frigg"], - "security": [{ "bearer": [] }] - } - }, - "/forms/reviews/{reviewId}/{action}": { - "post": { - "operationId": "updateReview", - "summary": "Review form", - "description": "Review form.", - "parameters": [ - { - "name": "reviewId", - "required": true, - "in": "path", - "schema": { "type": "string" } - }, - { - "name": "action", - "required": true, - "in": "path", - "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/SuccessModel" } - } - } - } - }, - "tags": ["Frigg"], - "security": [{ "bearer": [] }] + "security": [{ "bearer": [] }], + "summary": "Get list of types of forms", + "tags": ["Frigg"] } }, "/key-options": { "get": { - "operationId": "getAllKeyOptions", - "summary": "Get all key options.", "description": "Get all key options, can be filtered by type. If type input is not valid, all key options will be returned.", + "operationId": "getAllKeyOptions", "parameters": [ { "name": "type", @@ -109,14 +75,14 @@ } } }, + "summary": "Get all key options.", "tags": ["Frigg"] } }, "/key-options/types": { "get": { - "operationId": "getKeyOptionsTypes", - "summary": "Get list of types of key options", "description": "Get types.", + "operationId": "getKeyOptionsTypes", "parameters": [], "responses": { "200": { @@ -128,6 +94,7 @@ } } }, + "summary": "Get list of types of key options", "tags": ["Frigg"] } }, @@ -141,10 +108,42 @@ }, "/schools": { "get": { - "operationId": "getAllSchoolsByMunicipality", - "summary": "Get all schools.", "description": "Returns a paginated collection of schools.", - "parameters": [], + "operationId": "getAllSchoolsByMunicipality", + "parameters": [ + { + "name": "sort", + "required": false, + "in": "query", + "description": "Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter. The sort order should follow the [UNICODE, 16] standard.", + "schema": { "type": "string" } + }, + { + "name": "orderBy", + "required": false, + "in": "query", + "description": "The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc). The sort order should follow the [UNICODE, 16] standard.", + "schema": { + "default": "asc", + "type": "string", + "enum": ["asc", "desc"] + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "To define the download segmentation value i.e. the maximum number of records to be contained in the response.", + "schema": { "default": 100, "type": "number", "minimum": 1 } + }, + { + "name": "offset", + "required": false, + "in": "query", + "description": "The number of the first record to be supplied in the segmented response message.", + "schema": { "default": 0, "type": "number", "minimum": 0 } + } + ], "responses": { "200": { "description": "", @@ -156,16 +155,25 @@ } } } + }, + "default": { + "headers": { + "x-total-count": { + "description": "The total number of resources that are available to be returned", + "schema": { "type": "integer" } + } + }, + "description": "" } }, + "summary": "Get all schools.", "tags": ["Frigg"] } }, "/students/{nationalId}": { "get": { - "operationId": "getUserBySourcedId", - "summary": "Get user by nationalId", "description": "Get user by Id.", + "operationId": "getUserBySourcedId", "parameters": [ { "name": "nationalId", @@ -184,8 +192,115 @@ } } }, - "tags": ["Frigg"], - "security": [{ "bearer": [] }] + "security": [{ "bearer": [] }], + "summary": "Get user by nationalId", + "tags": ["Frigg"] + } + }, + "/registrations/{orgId}": { + "get": { + "description": "Get registration", + "operationId": "getRegistration", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { "type": "string" } + }, + { + "name": "sort", + "required": false, + "in": "query", + "description": "Identifies the sort criteria to be used for the records in the response message. Use with the orderBy parameter. The sort order should follow the [UNICODE, 16] standard.", + "schema": { "type": "string" } + }, + { + "name": "orderBy", + "required": false, + "in": "query", + "description": "The form of ordering for response to the sorted request i.e. ascending (asc) or descending (desc). The sort order should follow the [UNICODE, 16] standard.", + "schema": { + "default": "asc", + "type": "string", + "enum": ["asc", "desc"] + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "To define the download segmentation value i.e. the maximum number of records to be contained in the response.", + "schema": { "default": 100, "type": "number", "minimum": 1 } + }, + { + "name": "offset", + "required": false, + "in": "query", + "description": "The number of the first record to be supplied in the segmented response message.", + "schema": { "default": 0, "type": "number", "minimum": 0 } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/RegistrationModel" } + } + } + } + }, + "default": { + "headers": { + "x-total-count": { + "description": "The total number of resources that are available to be returned", + "schema": { "type": "integer" } + } + }, + "description": "" + } + }, + "security": [{ "bearer": [] }], + "summary": "Registration", + "tags": ["Frigg"] + } + }, + "/registrations/{id}/{orgId}": { + "get": { + "description": "Get registration by ID", + "operationId": "getRegistrationById", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "type": "string" } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistrationDetailModel" + } + } + } + } + }, + "security": [{ "bearer": [] }], + "summary": "Registration by ID", + "tags": ["Frigg"] } } }, @@ -312,16 +427,9 @@ "properties": { "formId": { "type": "string", "description": "Id of form created" }, "reviewId": { "type": "string", "description": "Id of review" }, - "status": { "type": "string", "description": "Status of form" } - }, - "required": ["formId", "reviewId", "status"] - }, - "SuccessModel": { - "type": "object", - "properties": { - "success": { "type": "boolean", "description": "Submission response" } + "state": { "type": "string", "description": "Status of form" } }, - "required": ["success"] + "required": ["formId", "reviewId", "state"] }, "Value": { "type": "object", @@ -376,12 +484,12 @@ "type": "object", "properties": { "id": { "type": "string" }, - "street": { "type": "string" }, + "address": { "type": "string" }, "municipality": { "type": "object", "nullable": true }, - "zip": { "type": "string" }, + "postCode": { "type": "string" }, "country": { "type": "object", "nullable": true } }, - "required": ["id", "street", "municipality", "zip", "country"] + "required": ["id", "address", "municipality", "postCode", "country"] }, "OrganizationModel": { "type": "object", @@ -471,8 +579,8 @@ "id": { "type": "string" }, "nationalId": { "type": "string" }, "name": { "type": "string" }, - "phone": { "type": "string" }, - "email": { "type": "string" }, + "phone": { "type": "object" }, + "email": { "type": "object" }, "role": { "type": "string" }, "domicile": { "nullable": true, @@ -533,6 +641,151 @@ "memberships", "agents" ] + }, + "RegistrationModel": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "nameOfChild": { "type": "string" }, + "nationalId": { "type": "string" }, + "defaultOrganization": { + "$ref": "#/components/schemas/MembershipOrganizationModel" + }, + "selectedOrganization": { + "$ref": "#/components/schemas/MembershipOrganizationModel" + }, + "requestingMeeting": { "type": "boolean" }, + "expectedStartDate": { "format": "date-time", "type": "string" }, + "reason": { "type": "string" }, + "movingAbroad": { "type": "boolean" } + }, + "required": [ + "id", + "nameOfChild", + "nationalId", + "defaultOrganization", + "selectedOrganization", + "requestingMeeting", + "expectedStartDate", + "reason", + "movingAbroad" + ] + }, + "ReviewActionModel": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "action": { + "type": "string", + "enum": ["pending", "approved", "rejected"] + }, + "status": { + "type": "string", + "enum": [ + "pendingAction", + "pendingActionBefore", + "pendingActionAfter", + "pending", + "approvedAction", + "approved", + "rejectedAction", + "rejected" + ] + }, + "order": { "type": "number" }, + "organization": { + "$ref": "#/components/schemas/MembershipOrganizationModel" + }, + "actionAt": { + "format": "date-time", + "type": "string", + "nullable": true + }, + "nextActionId": { "type": "object" } + }, + "required": [ + "id", + "action", + "status", + "order", + "organization", + "actionAt", + "nextActionId" + ] + }, + "ReviewModel": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "state": { + "type": "string", + "enum": ["pending", "approved", "rejected"] + }, + "displayStatus": { "type": "string" }, + "actions": { + "type": "array", + "items": { "$ref": "#/components/schemas/ReviewActionModel" } + }, + "createdAt": { "format": "date-time", "type": "string" }, + "updatedAt": { "format": "date-time", "type": "string" } + }, + "required": [ + "id", + "state", + "displayStatus", + "actions", + "createdAt", + "updatedAt" + ] + }, + "LanguageModel": { + "type": "object", + "properties": { + "nativeLanguage": { "type": "string" }, + "noIcelandic": { "type": "boolean" }, + "otherLanguages": { "type": "array", "items": { "type": "string" } } + }, + "required": ["nativeLanguage", "noIcelandic", "otherLanguages"] + }, + "RegistrationDetailModel": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "nameOfChild": { "type": "string" }, + "nationalId": { "type": "string" }, + "defaultOrganization": { + "$ref": "#/components/schemas/MembershipOrganizationModel" + }, + "selectedOrganization": { + "$ref": "#/components/schemas/MembershipOrganizationModel" + }, + "requestingMeeting": { "type": "boolean" }, + "expectedStartDate": { "format": "date-time", "type": "string" }, + "reason": { "type": "string" }, + "movingAbroad": { "type": "boolean" }, + "review": { "$ref": "#/components/schemas/ReviewModel" }, + "user": { "$ref": "#/components/schemas/UserModel" }, + "agents": { + "type": "array", + "items": { "$ref": "#/components/schemas/AgentModel" } + }, + "language": { "$ref": "#/components/schemas/LanguageModel" } + }, + "required": [ + "id", + "nameOfChild", + "nationalId", + "defaultOrganization", + "selectedOrganization", + "requestingMeeting", + "expectedStartDate", + "reason", + "movingAbroad", + "review", + "user", + "agents", + "language" + ] } } } diff --git a/libs/clients/mms/frigg/src/lib/friggClient.config.ts b/libs/clients/mms/frigg/src/lib/friggClient.config.ts index 8889c509c261..892bfbab073e 100644 --- a/libs/clients/mms/frigg/src/lib/friggClient.config.ts +++ b/libs/clients/mms/frigg/src/lib/friggClient.config.ts @@ -13,7 +13,7 @@ export const FriggClientConfig = defineConfig>({ load: (env) => ({ xRoadServicePath: env.required( 'XROAD_MMS_FRIGG_PATH', - 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-service', + 'IS-DEV/GOV/10066/MMS-Protected/frigg-form-api', ), scope: [MMSScope.frigg], }), diff --git a/libs/clients/mms/frigg/src/lib/friggClient.service.ts b/libs/clients/mms/frigg/src/lib/friggClient.service.ts index 345650cb36d5..6fd06782a7b8 100644 --- a/libs/clients/mms/frigg/src/lib/friggClient.service.ts +++ b/libs/clients/mms/frigg/src/lib/friggClient.service.ts @@ -26,7 +26,7 @@ export class FriggClientService { } async getAllSchoolsByMunicipality(user: User): Promise { - return await this.friggApiWithAuth(user).getAllSchoolsByMunicipality() + return await this.friggApiWithAuth(user).getAllSchoolsByMunicipality({}) } async getUserById(user: User, childNationalId: string): Promise {