From 94bc14e57d3e9e8d6209ea77417bea63459e658d Mon Sep 17 00:00:00 2001 From: selfcare-github-bot <146744076+selfcare-github-bot@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:05:01 +0200 Subject: [PATCH] [Update OpenAPI] Merge openapi Support API PROD using openapi-merge-cli (#328) Co-authored-by: manuraf <12083207+manuraf@users.noreply.github.com> --- .../v1/openapi.prod.json | 2731 ++++++++++------- .../pnpg_support_service/v1/openapi.prod.json | 1243 ++++---- 2 files changed, 2335 insertions(+), 1639 deletions(-) diff --git a/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json b/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json index 3591edec..0cd4ec5a 100644 --- a/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json +++ b/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "title": "selc-external-api", + "title": "Support API service", "description": "This service acts as an orchestrator for information coming from different services and as a proxy", "version": "1.0.0" }, @@ -12,29 +12,126 @@ ], "tags": [ { - "name": "institutions", - "description": "Institution Controller" + "name": "Institution", + "description": "Institution V 2 Controller" + }, + { + "name": "Onboarding", + "description": "Onboarding V 2 Controller" + }, + { + "name": "Token", + "description": "Token Controller" + }, + { + "name": "User", + "description": "User V 2 Controller" + }, + { + "name": "Delegation", + "description": "Delegation Controller" + }, + { + "name": "UserGroup", + "description": "User group endpoint CRUD operations" } ], "paths": { - "/institutions/{institutionId}/users": { + "/delegations": { "get": { "tags": [ - "institutions" + "Delegation" ], - "summary": "getInstitutionUsers", - "description": "Retrieve institution's users", - "operationId": "getInstitutionUsersUsingGET", + "summary": "Retrieve institution's delegations", + "description": "Retrieve institution's delegations", + "operationId": "getDelegationsUsingGET", "parameters": [ { "name": "institutionId", - "in": "path", - "description": "Institution's unique identifier", - "required": true, - "style": "simple", + "in": "query", + "description": "The internal identifier of the institution", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "brokerId", + "in": "query", + "description": "The internal identifier of the institution", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "productId", + "in": "query", + "description": "Product's unique identifier", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "description": "Description ente", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "taxCode", + "in": "query", + "description": "Institution's tax code", + "required": false, + "style": "form", "schema": { "type": "string" } + }, + { + "name": "order", + "in": "query", + "description": "Order to show response NONE, ASC, DESC", + "required": false, + "style": "form", + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC", + "NONE" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "page", + "required": false, + "style": "form", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "size", + "in": "query", + "description": "size", + "required": false, + "style": "form", + "schema": { + "type": "integer", + "format": "int32" + } } ], "responses": { @@ -45,7 +142,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UserInfoResponse" + "$ref": "#/components/schemas/DelegationResponse" } } } @@ -84,11 +181,11 @@ "/institutions": { "get": { "tags": [ - "institutions" + "Institution" ], "summary": "Gets institutions filtering by taxCode and/or subunitCode", "description": "Gets institutions filtering by taxCode and/or subunitCode", - "operationId": "getInstitutionsByTaxCodeUsingGET", + "operationId": "getInstitutionsUsingGET", "parameters": [ { "name": "taxCode", @@ -109,6 +206,26 @@ "schema": { "type": "string" } + }, + { + "name": "origin", + "in": "query", + "description": "origin", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "originId", + "in": "query", + "description": "originId", + "required": false, + "style": "form", + "schema": { + "type": "string" + } } ], "responses": { @@ -152,31 +269,18 @@ ] } }, - "/institutions/{institutionId}/contract": { + "/institutions/{institutionId}/users": { "get": { "tags": [ - "institutions" + "Institution" ], - "summary": "getContract", - "description": "Service to retrieve a contract given institutionId and productId", - "operationId": "getContractUsingGET", + "summary": "The API retrieves user's info including details of roles on products", + "operationId": "getInstitutionUsersUsingGET", "parameters": [ { "name": "institutionId", "in": "path", - "description": "Institution's unique internal Id", - "required": true, - "style": "simple", - "schema": { - "type": "string" - } - }, - { - "name": "productId", - "in": "query", - "description": "Product's unique identifier", "required": true, - "style": "form", "schema": { "type": "string" } @@ -186,10 +290,12 @@ "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "byte" + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProductResponse" + } } } } @@ -199,105 +305,37 @@ "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } }, "401": { - "description": "Unauthorized", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - } - }, - "security": [ - { - "bearerAuth": [ - "global" - ] - } - ] - } - }, - "/users": { - "post": { - "tags": [ - "users" - ], - "summary": "getUserInfo", - "description": "Service to retrieve user info including institutions and products linked to him", - "operationId": "getUserInfoUsingPOST", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchUserDto" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserInfoResource" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "Not Authorized", "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } }, - "500": { - "description": "Internal Server Error", + "404": { + "description": "Not Found", "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } @@ -315,18 +353,15 @@ "/users/{id}": { "get": { "tags": [ - "users" + "User" ], - "summary": "getUserById", - "description": "Get user by Id", + "summary": "Retrieves user given userId and optional ProductId", "operationId": "getUserInfoUsingGET", "parameters": [ { "name": "id", "in": "path", - "description": "User's unique identifier", "required": true, - "style": "simple", "schema": { "type": "string" } @@ -334,9 +369,13 @@ { "name": "institutionId", "in": "query", - "description": "The internal identifier of the institution", - "required": false, - "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "productId", + "in": "query", "schema": { "type": "string" } @@ -346,7 +385,7 @@ "200": { "description": "OK", "content": { - "*/*": { + "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } @@ -358,7 +397,27 @@ "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "401": { + "description": "Not Authorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" } } } @@ -368,7 +427,7 @@ "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } @@ -383,87 +442,74 @@ ] } }, - "/delegations": { - "get": { + "/api/ResendNotification": { + "post": { "tags": [ - "Delegation" + "Notification" ], - "summary": "Retrieve institution's delegations", - "description": "Retrieve institution's delegations", - "operationId": "getDelegationsUsingGET", + "operationId": "sendOnboardigNotificationUsingPOST", + "summary": "", + "description": "", "parameters": [ { - "name": "institutionId", - "in": "query", - "description": "The internal identifier of the institution", - "required": false, - "style": "form", - "schema": { - "type": "string" - } - }, - { - "name": "brokerId", + "name": "onboardingId", "in": "query", - "description": "The internal identifier of the institution", - "required": false, - "style": "form", + "description": "Onboarding Id", + "required": true, "schema": { "type": "string" } - }, - { - "name": "productId", - "in": "query", - "description": "Product's unique identifier", - "required": false, - "style": "form", - "schema": { - "type": "string" + } + ], + "responses": { + "202": { + "description": "", + "content": { + "application/json": {} } - }, + } + }, + "security": [ { - "name": "mode", - "in": "query", - "description": "Mode (full or normal) to retreieve institution's delegations", - "required": false, - "style": "form", - "schema": { - "type": "string", - "enum": [ - "FULL", - "NORMAL" - ] - } - }, + "bearerAuth": [ + "global" + ] + } + ] + } + }, + "/api/onboardings/notifications/count": { + "get": { + "tags": [ + "Notification" + ], + "summary": "Count notifications by filters", + "description": "Performs for every product a count of relative onboarding notifications sent", + "operationId": "countNotificationsUsingGET", + "parameters": [ { - "name": "page", + "name": "from", "in": "query", - "description": "page", + "description": "from date (in YYYY-MM-DD format)", "required": false, - "style": "form", "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "size", + "name": "to", "in": "query", - "description": "size", + "description": "to date (in YYYY-MM-DD format)", "required": false, - "style": "form", "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "search", + "name": "productId", "in": "query", - "description": "Description institution", + "description": "productId", "required": false, - "style": "form", "schema": { "type": "string" } @@ -477,31 +523,11 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/DelegationResponse" + "$ref": "#/components/schemas/NotificationCountResult" } } } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } } }, "security": [ @@ -513,107 +539,44 @@ ] } }, - "/user-groups": { + "/institutions/{institutionId}/contract": { "get": { "tags": [ - "UserGroup" + "Institution" ], - "summary": "getUserGroups", - "description": "Service that allows to get a list of UserGroup entities", - "operationId": "getUserGroupsUsingGET", + "summary": "getContract", + "description": "Service to retrieve a contract given institutionId and productId", + "operationId": "getContractUsingGET", "parameters": [ { "name": "institutionId", - "in": "query", - "description": "Users group's institutionId", - "required": false, - "style": "form", + "in": "path", + "description": "Institution's unique internal Id", + "required": true, + "style": "simple", "schema": { "type": "string" } }, - { - "name": "page", - "in": "query", - "description": "The page number to access (0 indexed, defaults to 0)", - "required": false, - "style": "form", - "allowReserved": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "size", - "in": "query", - "description": "Number of records per page (defaults to 20, max 2000)", - "required": false, - "style": "form", - "allowReserved": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "sort", - "in": "query", - "description": "Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.", - "required": false, - "style": "form", - "allowReserved": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, { "name": "productId", "in": "query", - "description": "Users group's productId", - "required": false, + "description": "Product's unique identifier", + "required": true, "style": "form", "schema": { "type": "string" } - }, - { - "name": "userId", - "in": "query", - "description": "Member's unique identifier", - "required": false, - "style": "form", - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "status", - "in": "query", - "description": "If filter on status is present, it must be used with at least one of the other filters", - "required": false, - "style": "form", - "schema": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "SUSPENDED" - ] - } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/PageOfUserGroupResource" + "type": "string", + "format": "byte" } } } @@ -689,7 +652,7 @@ "200": { "description": "OK", "content": { - "*/*": { + "application/json": { "schema": { "type": "array", "items": { @@ -709,6 +672,26 @@ } } }, + "401": { + "description": "Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -719,8 +702,8 @@ } } }, - "409": { - "description": "Conflict", + "500": { + "description": "Internal Server Error", "content": { "application/problem+json": { "schema": { @@ -739,43 +722,223 @@ ] } }, - "/onboarding/institutionOnboardings": { + "/tokens/products/{productId}": { "get": { "tags": [ - "Onboarding Controller" + "Token" ], - "summary": "Returns onboardings record by institution taxCode/subunitCode/origin/originId", - "description": "Returns onboardings record by institution taxCode/subunitCode/origin/originId", - "operationId": "onboardingInstitutionUsingGET", + "summary": "Service to retrieve tokens from product's identifier", + "description": "Service to retrieve tokens from product's identifier", + "operationId": "getTokensFromProductUsingGET", "parameters": [ { - "name": "origin", - "in": "query", + "name": "productId", + "in": "path", + "description": "Product's identifier", + "required": true, + "style": "simple", "schema": { "type": "string" } }, { - "name": "originId", + "name": "page", "in": "query", + "description": "Number of page", + "required": false, + "style": "form", "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "status", + "name": "size", "in": "query", + "description": "Number of elements per page", + "required": false, + "style": "form", "schema": { - "$ref": "#/components/schemas/OnboardingStatus" + "type": "integer", + "format": "int32" } }, { - "name": "subunitCode", + "name": "status", "in": "query", + "description": "Token's status. Available values: REQUEST, TOBEVALIDATED, PENDING, COMPLETED, FAILED, REJECTED, DELETED", + "required": false, + "style": "form", "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokensResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [ + "global" + ] + } + ] + } + }, + "/users": { + "post": { + "tags": [ + "User" + ], + "summary": "getUserInfo", + "description": "Service to retrieve user info including institutions and products linked to him, this service retrives 100 institutions at most", + "operationId": "V2getUserInfoUsingGET", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchUserDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [ + "global" + ] + } + ] + } + }, + "/onboarding/institutionOnboardings": { + "get": { + "tags": [ + "Onboarding" + ], + "summary": "Returns onboardings record by institution taxCode/subunitCode/origin/originId", + "operationId": "onboardingInstitutionUsingGET", + "parameters": [ + { + "name": "origin", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "originId", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "schema": { + "$ref": "#/components/schemas/OnboardingStatus" + } + }, + { + "name": "subunitCode", + "in": "query", + "schema": { + "type": "string" + } + }, { "name": "taxCode", "in": "query", @@ -792,7 +955,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/OnboardingResponse" + "$ref": "#/components/schemas/OnboardingResponse1" } } } @@ -817,21 +980,11 @@ "/onboarding/{onboardingId}/consume": { "put": { "tags": [ - "Onboarding Controller" + "Onboarding" ], "summary": "Perform complete operation of an onboarding request as /complete but without signature verification of the contract", - "description": "Perform complete operation of an onboarding request as /complete but without signature verification of the contract", "operationId": "completeOnboardingTokenConsume", "parameters": [ - { - "name": "x-selfcare-uid", - "in": "header", - "description": "Logged user's unique identifier", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "onboardingId", "in": "path", @@ -845,6 +998,9 @@ "content": { "multipart/form-data": { "schema": { + "required": [ + "contract" + ], "type": "object", "properties": { "contract": { @@ -879,49 +1035,13 @@ ] } }, - "/api/ResendNotification": { - "post": { - "tags": [ - "Notification" - ], - "operationId": "sendOnboardigNotificationUsingPOST", - "summary": "", - "description": "", - "parameters": [ - { - "name": "onboardingId", - "in": "query", - "description": "Onboarding Id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": {} - } - } - }, - "security": [ - { - "bearerAuth": [ - "global" - ] - } - ] - } - }, "/onboarding/{onboardingId}/update": { "put": { "tags": [ "Onboarding" ], - "operationId": "updateOnboardiUsingPUT", "summary": "Update onboarding request receiving onboarding id.Function can change some values. ", + "operationId": "updateOnboardiUsingPUT", "parameters": [ { "name": "onboardingId", @@ -971,21 +1091,21 @@ ] } }, - "/tokens/products/{productId}": { + "/user-groups": { "get": { "tags": [ - "Token" + "UserGroup" ], - "summary": "Service to retrieve tokens from product's identifier", - "description": "Service to retrieve tokens from product's identifier", - "operationId": "getTokensFromProductUsingGET", + "summary": "getUserGroups", + "description": "Service that allows to get a list of UserGroup entities", + "operationId": "getUserGroupsUsingGET", "parameters": [ { - "name": "productId", - "in": "path", - "description": "Product's identifier", - "required": true, - "style": "simple", + "name": "institutionId", + "in": "query", + "description": "Users group's institutionId", + "required": false, + "style": "form", "schema": { "type": "string" } @@ -993,9 +1113,10 @@ { "name": "page", "in": "query", - "description": "Number of page", + "description": "The page number to access (0 indexed, defaults to 0)", "required": false, "style": "form", + "allowReserved": true, "schema": { "type": "integer", "format": "int32" @@ -1004,37 +1125,79 @@ { "name": "size", "in": "query", - "description": "Number of elements per page", + "description": "Number of records per page (defaults to 20, max 2000)", "required": false, "style": "form", + "allowReserved": true, "schema": { "type": "integer", "format": "int32" } }, { - "name": "status", + "name": "sort", "in": "query", - "description": "Token's status. Available values: REQUEST, TOBEVALIDATED, PENDING, COMPLETED, FAILED, REJECTED, DELETED", + "description": "Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.", "required": false, "style": "form", + "allowReserved": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokensResource" - } + "type": "array", + "items": { + "type": "string" } } }, - "400": { + { + "name": "productId", + "in": "query", + "description": "Users group's productId", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Member's unique identifier", + "required": false, + "style": "form", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "status", + "in": "query", + "description": "If filter on status is present, it must be used with at least one of the other filters", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "string", + "enum": [ + "ACTIVE", + "DELETED", + "SUSPENDED" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageOfUserGroupResource" + } + } + } + }, + "400": { "description": "Bad Request", "content": { "application/problem+json": { @@ -1083,86 +1246,81 @@ } ] } - }, - "/api/onboardings/notifications/count": { - "get": { - "tags": [ - "Notification" - ], - "summary": "Count notifications by filters", - "description": "Performs for every product a count of relative onboarding notifications sent", - "operationId": "countNotificationsUsingGET", - "parameters": [ - { - "name": "from", - "in": "query", - "description": "from date (in YYYY-MM-DD format)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "to", - "in": "query", - "description": "to date (in YYYY-MM-DD format)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "productId", - "in": "query", - "description": "productId", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationCountResult" - } - } - } - } - } - }, - "security": [ - { - "bearerAuth": [ - "global" - ] - } - ] - } } }, "components": { "schemas": { - "InvalidParam": { - "title": "InvalidParam", - "required": [ - "name", - "reason" - ], + "DelegationResponse": { + "title": "DelegationResponse", "type": "object", "properties": { - "name": { + "brokerId": { + "type": "string" + }, + "brokerName": { + "type": "string" + }, + "brokerTaxCode": { + "type": "string" + }, + "brokerType": { + "type": "string" + }, + "createdAt": { "type": "string", - "description": "Invalid parameter name." + "format": "date-time" }, - "reason": { + "id": { + "type": "string" + }, + "institutionId": { + "type": "string" + }, + "institutionName": { + "type": "string" + }, + "institutionRootName": { + "type": "string" + }, + "institutionType": { "type": "string", - "description": "Invalid parameter reason." + "enum": [ + "AS", + "CON", + "GSP", + "PA", + "PG", + "PSP", + "PT", + "REC", + "SA", + "SCP" + ] + }, + "productId": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DELETED" + ] + }, + "taxCode": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "AOO", + "EA", + "PT" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time" } } }, @@ -1206,314 +1364,74 @@ }, "description": "A \"problem detail\" as a way to carry machine-readable details of errors (https://datatracker.ietf.org/doc/html/rfc7807)" }, - "SupportRequestDto": { - "title": "SupportRequestDto", + "InvalidParam": { + "title": "InvalidParam", "required": [ - "email" + "name", + "reason" ], "type": "object", "properties": { - "email": { + "name": { "type": "string", - "description": "User's email", - "format": "email", - "example": "email@example.com" + "description": "Invalid parameter name." }, - "productId": { + "reason": { "type": "string", - "description": "Product's identifier" + "description": "Invalid parameter reason." } } }, - "SupportResponse": { - "title": "SupportResponse", + "InstitutionsResponse": { + "title": "InstitutionsResponse", "type": "object", "properties": { - "redirectUrl": { - "type": "string" + "institutions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstitutionResponse" + } } } }, - "PageOfUserGroupResource": { - "title": "PageOfUserGroupResource", + "InstitutionResponse": { + "title": "InstitutionResponse", "type": "object", "properties": { - "content": { + "address": { + "type": "string" + }, + "aooParentCode": { + "type": "string" + }, + "attributes": { "type": "array", - "description": "The page content", "items": { - "$ref": "#/components/schemas/UserGroupResource" + "$ref": "#/components/schemas/AttributesResponse" } }, - "number": { - "type": "integer", - "description": "The number of the current page", - "format": "int32" + "businessRegisterPlace": { + "type": "string" }, - "size": { - "type": "integer", - "description": "The size of the page", - "format": "int32" + "city": { + "type": "string" }, - "totalElements": { - "type": "integer", - "description": "The total amount of elements", - "format": "int64" + "country": { + "type": "string" }, - "totalPages": { - "type": "integer", - "description": "The number of total pages", - "format": "int32" - } - } - }, - "UserGroupResource": { - "title": "UserGroupResource", - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Users group's description" + "county": { + "type": "string" }, - "id": { + "createdAt": { "type": "string", - "description": "Users group's unique identifier" - }, - "institutionId": { - "type": "string", - "description": "Users group's institutionId" - }, - "name": { - "type": "string", - "description": "Users group's name" - }, - "productId": { - "type": "string", - "description": "Users group's productId" - }, - "status": { - "type": "string", - "description": "Users group's status", - "enum": [ - "ACTIVE", - "DELETED", - "SUSPENDED" - ] - } - } - }, - "SearchUserDto": { - "title": "SearchUserDto", - "required": [ - "fiscalCode" - ], - "type": "object", - "properties": { - "fiscalCode": { - "type": "string", - "description": "User's fiscal code" - }, - "statuses": { - "type": "array", - "description": "User's statuses", - "items": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" - ] - } - } - } - }, - "UserInfoResource": { - "title": "UserInfoResource", - "type": "object", - "properties": { - "onboardedInstitutions": { - "type": "array", - "description": "Object that includes all info about onboarded institutions linked to a user", - "items": { - "$ref": "#/components/schemas/OnboardedInstitutionResource" - } - }, - "user": { - "description": "Object that includes all info about a user", - "$ref": "#/components/schemas/UserResource" - } - } - }, - "OnboardedInstitutionResource": { - "title": "OnboardedInstitutionResource", - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "Institution's address" - }, - "description": { - "type": "string", - "description": "Institution's description" - }, - "digitalAddress": { - "type": "string", - "description": "Institution's digital address" - }, - "id": { - "type": "string", - "description": "Institution's Id" - }, - "institutionType": { - "type": "string", - "description": "Institution's type", - "enum": [ - "GSP", - "PA", - "PG", - "PSP", - "PT", - "SCP", - "SA", - "AS", - "REC", - "CON" - ] - }, - "productInfo": { - "description": "Products' info of onboardings", - "$ref": "#/components/schemas/ProductInfo" - }, - "state": { - "type": "string", - "description": "Onboarding's state" - }, - "taxCode": { - "type": "string", - "description": "Institution's tax code" - }, - "userEmail": { - "type": "string", - "description": "User's email linked to the institution" - }, - "zipCode": { - "type": "string", - "description": "Institution's zip code" - } - } - }, - "InstitutionType": { - "enum": [ - "PA", - "PG", - "GSP", - "SA", - "PT", - "SCP", - "PSP", - "AS", - "REC", - "CON" - ], - "type": "string" - }, - "ProductInfo": { - "title": "ProductInfo", - "type": "object", - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, - "id": { - "type": "string" - }, - "productRole": { - "type": "string" - }, - "role": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "UserResource": { - "title": "UserResource", - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User's institutional email" - }, - "id": { - "type": "string", - "description": "User's unique identifier", - "format": "uuid" - }, - "name": { - "type": "string", - "description": "User's name" - }, - "roles": { - "type": "array", - "description": "User's roles in product", - "items": { - "type": "string" - } - }, - "surname": { - "type": "string", - "description": "User's surname" - }, - "fiscalCode": { - "type": "string", - "description": "User's fiscal code" - } - } - }, - "InstitutionsResponse": { - "title": "InstitutionsResponse", - "type": "object", - "properties": { - "institutions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstitutionResponse" - } - } - } - }, - "InstitutionResponse": { - "title": "InstitutionResponse", - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "aooParentCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttributesResponse" - } - }, - "businessRegisterPlace": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" + "format": "date-time" }, "dataProtectionOfficer": { "$ref": "#/components/schemas/DataProtectionOfficerResponse" }, + "delegation": { + "type": "boolean" + }, "description": { "type": "string" }, @@ -1538,25 +1456,34 @@ "institutionType": { "type": "string", "enum": [ + "AS", + "CON", "GSP", "PA", "PG", "PSP", "PT", - "SCP", - "SA", - "AS", "REC", - "CON" + "SA", + "SCP" ] }, - "origin": { + "istatCode": { "type": "string" }, - "originId": { + "logo": { "type": "string" }, - "parentDescription": { + "onboarding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OnboardedProductResponse" + } + }, + "origin": { + "type": "string" + }, + "originId": { "type": "string" }, "paymentServiceProvider": { @@ -1565,6 +1492,9 @@ "rea": { "type": "string" }, + "rootParent": { + "$ref": "#/components/schemas/RootParentResponse" + }, "shareCapital": { "type": "string" }, @@ -1589,12 +1519,6 @@ }, "zipCode": { "type": "string" - }, - "onboarding": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OnboardedProductResponse" - } } } }, @@ -1640,48 +1564,54 @@ } } }, - "Origin": { - "enum": [ - "MOCK", - "IPA", - "SELC", - "ANAC", - "UNKNOWN", - "ADE", - "INFOCAMERE", - "IVASS" - ], - "type": "string" - }, - "GeographicTaxonomies": { - "title": "GeographicTaxonomies", + "OnboardedProductResponse": { + "title": "OnboardedProductResponse", "type": "object", "properties": { - "code": { - "type": "string" + "billing": { + "$ref": "#/components/schemas/BillingResponse1" }, - "country": { - "type": "string" + "createdAt": { + "type": "string", + "format": "date-time" }, - "country_abbreviation": { - "type": "string" + "isAggregator": { + "type": "boolean" }, - "desc": { + "productId": { "type": "string" }, - "enabled": { - "type": "boolean" + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DELETED", + "PENDING", + "REJECTED", + "SUSPENDED", + "TOBEVALIDATED" + ] }, - "istat_code": { - "type": "string" + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "BillingResponse1": { + "title": "BillingResponse", + "type": "object", + "properties": { + "publicServices": { + "type": "boolean" }, - "province_abbreviation": { + "recipientCode": { "type": "string" }, - "province_id": { + "taxCodeInvoicing": { "type": "string" }, - "region_id": { + "vatNumber": { "type": "string" } } @@ -1707,135 +1637,210 @@ } } }, - "BillingResponse": { - "title": "BillingResponse", + "RootParentResponse": { + "title": "RootParentResponse", "type": "object", "properties": { - "publicServices": { - "type": "boolean" - }, - "recipientCode": { + "description": { "type": "string" }, - "vatNumber": { + "id": { "type": "string" } } }, - "DelegationResponse": { - "title": "DelegationResponse", + "UserProductResponse": { "type": "object", "properties": { - "brokerId": { + "id": { "type": "string" }, - "brokerName": { + "taxCode": { "type": "string" }, - "brokerTaxCode": { + "name": { "type": "string" }, - "brokerType": { + "surname": { "type": "string" }, - "id": { + "email": { "type": "string" }, - "institutionId": { + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OnboardedProductResponse1" + } + } + } + }, + "OnboardedProductResponse1": { + "type": "object", + "properties": { + "productId": { "type": "string" }, - "institutionName": { + "tokenId": { "type": "string" }, - "institutionRootName": { + "status": { + "$ref": "#/components/schemas/OnboardedProductState" + }, + "productRole": { "type": "string" }, - "institutionType": { - "type": "string", - "enum": [ - "GSP", - "PA", - "PG", - "PSP", - "PT", - "SCP", - "SA", - "AS", - "REC", - "CON" - ] + "role": { + "description": "Available values: MANAGER, DELEGATE, SUB_DELEGATE, OPERATOR, ADMIN_EA", + "type": "string" }, - "productId": { + "env": { + "$ref": "#/components/schemas/Env" + }, + "createdAt": { + "$ref": "#/components/schemas/LocalDateTime" + }, + "updatedAt": { + "$ref": "#/components/schemas/LocalDateTime" + } + } + }, + "OnboardedProductState": { + "enum": [ + "ACTIVE", + "PENDING", + "TOBEVALIDATED", + "SUSPENDED", + "DELETED", + "REJECTED" + ], + "type": "string" + }, + "Env": { + "enum": [ + "ROOT", + "DEV", + "COLL", + "PROD" + ], + "type": "string" + }, + "LocalDateTime": { + "format": "date-time", + "type": "string", + "example": "2022-03-10T12:15:50" + }, + "Problem1": { + "type": "object", + "properties": { + "detail": { "type": "string" }, - "taxCode": { + "instance": { + "type": "string" + }, + "invalidParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvalidParam1" + } + }, + "status": { + "format": "int32", + "type": "integer" + }, + "title": { "type": "string" }, "type": { - "type": "string", - "enum": [ - "AOO", - "PT" - ] + "type": "string" } } }, - "UserInfoResponse": { - "title": "UserInfoResponse", + "InvalidParam1": { "type": "object", "properties": { - "email": { + "name": { "type": "string" }, + "reason": { + "type": "string" + } + } + }, + "UserResponse": { + "required": [ + "id", + "name", + "surname" + ], + "type": "object", + "properties": { "id": { + "minLength": 1, "type": "string" }, - "name": { + "taxCode": { "type": "string" }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OnboardedProduct" - } + "name": { + "pattern": "\\S", + "type": "string" }, "surname": { + "pattern": "\\S", "type": "string" }, - "taxCode": { + "email": { "type": "string" + }, + "workContacts": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "OnboardedProduct": { - "title": "OnboardedProduct", + "NotificationCountResult": { + "title": "NotificationCountResult", "type": "object", "properties": { - "contract": { + "notificationCount": { + "type": "integer", + "format": "int32" + }, + "productId": { "type": "string" + } + } + }, + "RelationshipResult": { + "title": "RelationshipResult", + "type": "object", + "properties": { + "billing": { + "$ref": "#/components/schemas/BillingResponse" }, "createdAt": { "type": "string", "format": "date-time" }, - "env": { - "type": "string", - "enum": [ - "COLL", - "DEV", - "PROD", - "ROOT" - ] - }, - "productId": { + "from": { "type": "string" }, - "productRole": { + "id": { "type": "string" }, - "relationshipId": { + "institutionUpdate": { + "$ref": "#/components/schemas/InstitutionUpdateResponse" + }, + "pricingPlan": { "type": "string" }, + "product": { + "$ref": "#/components/schemas/ProductInfo" + }, "role": { "type": "string", "enum": [ @@ -1845,7 +1850,7 @@ "SUB_DELEGATE" ] }, - "status": { + "state": { "type": "string", "enum": [ "ACTIVE", @@ -1856,6 +1861,9 @@ "TOBEVALIDATED" ] }, + "to": { + "type": "string" + }, "tokenId": { "type": "string" }, @@ -1865,8 +1873,23 @@ } } }, - "InstitutionUpdate": { - "title": "InstitutionUpdate", + "BillingResponse": { + "title": "BillingResponse", + "type": "object", + "properties": { + "publicServices": { + "type": "boolean" + }, + "recipientCode": { + "type": "string" + }, + "vatNumber": { + "type": "string" + } + } + }, + "InstitutionUpdateResponse": { + "title": "InstitutionUpdateResponse", "type": "object", "properties": { "address": { @@ -1876,7 +1899,7 @@ "type": "string" }, "dataProtectionOfficer": { - "$ref": "#/components/schemas/DataProtectionOfficer" + "$ref": "#/components/schemas/DpoDataResource" }, "description": { "type": "string" @@ -1896,20 +1919,20 @@ "institutionType": { "type": "string", "enum": [ + "AS", + "CON", "GSP", "PA", "PG", "PSP", "PT", - "SA", - "SCP", - "AS", "REC", - "CON" + "SA", + "SCP" ] }, "paymentServiceProvider": { - "$ref": "#/components/schemas/PaymentServiceProvider" + "$ref": "#/components/schemas/PspDataResource" }, "rea": { "type": "string" @@ -1931,69 +1954,70 @@ } } }, - "LegalsResponse": { - "title": "LegalsResponse", + "DpoDataResource": { + "title": "DpoDataResource", "type": "object", "properties": { - "env": { + "address": { "type": "string", - "enum": [ - "COLL", - "DEV", - "PROD", - "ROOT" - ] - }, - "partyId": { - "type": "string" + "description": "DPO's address" }, - "relationshipId": { - "type": "string" + "email": { + "type": "string", + "description": "DPO's email" }, - "role": { + "pec": { "type": "string", - "enum": [ - "DELEGATE", - "MANAGER", - "OPERATOR", - "SUB_DELEGATE" - ] + "description": "DPO's PEC" } } }, - "DataProtectionOfficer": { - "title": "DataProtectionOfficer", + "PspDataResource": { + "title": "PspDataResource", "type": "object", "properties": { - "address": { - "type": "string" + "abiCode": { + "type": "string", + "description": "PSP's ABI code" }, - "email": { - "type": "string" + "businessRegisterNumber": { + "type": "string", + "description": "PSP's Business Register number" }, - "pec": { - "type": "string" + "legalRegisterName": { + "type": "string", + "description": "PSP's legal register name" + }, + "legalRegisterNumber": { + "type": "string", + "description": "PSP's legal register number" + }, + "vatNumberGroup": { + "type": "boolean", + "description": "PSP's Vat Number group", + "example": false } } }, - "PaymentServiceProvider": { - "title": "PaymentServiceProvider", + "ProductInfo": { + "title": "ProductInfo", "type": "object", "properties": { - "abiCode": { - "type": "string" + "createdAt": { + "type": "string", + "format": "date-time" }, - "businessRegisterNumber": { + "id": { "type": "string" }, - "legalRegisterName": { + "productRole": { "type": "string" }, - "legalRegisterNumber": { + "role": { "type": "string" }, - "vatNumberGroup": { - "type": "boolean" + "status": { + "type": "string" } } }, @@ -2066,116 +2090,6 @@ } } }, - "RelationshipResult": { - "title": "RelationshipResult", - "type": "object", - "properties": { - "billing": { - "$ref": "#/components/schemas/BillingResponse" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "from": { - "type": "string" - }, - "id": { - "type": "string" - }, - "institutionUpdate": { - "$ref": "#/components/schemas/InstitutionUpdate" - }, - "pricingPlan": { - "type": "string" - }, - "product": { - "$ref": "#/components/schemas/ProductInfo" - }, - "role": { - "type": "string", - "enum": [ - "DELEGATE", - "MANAGER", - "OPERATOR", - "SUB_DELEGATE" - ] - }, - "state": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" - ] - }, - "to": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "OnboardedProductResponse": { - "title": "OnboardedProductResponse", - "type": "object", - "properties": { - "billing": { - "$ref": "#/components/schemas/BillingResponse" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "productId": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" - ] - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "UserResponse": { - "title": "UserResponse", - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "surname": { - "type": "string" - }, - "taxCode": { - "type": "string" - } - } - }, "TokensResource": { "title": "TokensResource", "type": "object", @@ -2246,36 +2160,598 @@ } } }, - "LegalsResource": { - "title": "LegalsResource", + "InstitutionUpdate": { + "title": "InstitutionUpdate", "type": "object", "properties": { - "env": { + "address": { + "type": "string" + }, + "businessRegisterPlace": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "county": { + "type": "string" + }, + "dataProtectionOfficer": { + "$ref": "#/components/schemas/DataProtectionOfficer" + }, + "description": { + "type": "string" + }, + "digitalAddress": { + "type": "string" + }, + "geographicTaxonomies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicTaxonomy" + } + }, + "imported": { + "type": "boolean" + }, + "institutionType": { "type": "string", "enum": [ - "COLL", - "DEV", - "PROD", - "ROOT" + "AS", + "CON", + "GSP", + "PA", + "PG", + "PSP", + "PT", + "REC", + "SA", + "SCP" ] }, - "partyId": { + "paymentServiceProvider": { + "$ref": "#/components/schemas/PaymentServiceProvider" + }, + "rea": { + "type": "string" + }, + "shareCapital": { + "type": "string" + }, + "supportEmail": { + "type": "string" + }, + "supportPhone": { + "type": "string" + }, + "taxCode": { + "type": "string" + }, + "zipCode": { + "type": "string" + } + } + }, + "DataProtectionOfficer": { + "title": "DataProtectionOfficer", + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "email": { + "type": "string" + }, + "pec": { + "type": "string" + } + } + }, + "GeographicTaxonomy": { + "title": "GeographicTaxonomy", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + }, + "PaymentServiceProvider": { + "title": "PaymentServiceProvider", + "type": "object", + "properties": { + "abiCode": { + "type": "string" + }, + "businessRegisterNumber": { + "type": "string" + }, + "legalRegisterName": { + "type": "string" + }, + "legalRegisterNumber": { + "type": "string" + }, + "vatNumberGroup": { + "type": "boolean" + } + } + }, + "LegalsResource": { + "title": "LegalsResource", + "type": "object", + "properties": { + "env": { + "type": "string", + "enum": [ + "COLL", + "DEV", + "PROD", + "ROOT" + ] + }, + "partyId": { + "type": "string" + }, + "relationshipId": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "DELEGATE", + "MANAGER", + "OPERATOR", + "SUB_DELEGATE" + ] + } + } + }, + "UserInfoResource": { + "title": "UserInfoResource", + "type": "object", + "properties": { + "onboardedInstitutions": { + "type": "array", + "description": "Object that includes all info about onboarded institutions linked to a user", + "items": { + "$ref": "#/components/schemas/OnboardedInstitutionResource" + } + }, + "user": { + "description": "Object that includes all info about a user", + "$ref": "#/components/schemas/UserResource" + } + } + }, + "OnboardedInstitutionResource": { + "title": "OnboardedInstitutionResource", + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Institution's address" + }, + "description": { + "type": "string", + "description": "Institution's description" + }, + "digitalAddress": { + "type": "string", + "description": "Institution's digital address" + }, + "id": { + "type": "string", + "description": "Institution's Id" + }, + "institutionType": { + "type": "string", + "description": "Institution's type", + "enum": [ + "AS", + "CON", + "GSP", + "PA", + "PG", + "PSP", + "PT", + "REC", + "SA", + "SCP" + ] + }, + "productInfo": { + "description": "Products' info of onboardings", + "$ref": "#/components/schemas/ProductInfo" + }, + "state": { + "type": "string", + "description": "Onboarding's state" + }, + "taxCode": { + "type": "string", + "description": "Institution's tax code" + }, + "userEmail": { + "type": "string", + "description": "User's email linked to the institution" + }, + "zipCode": { + "type": "string", + "description": "Institution's zip code" + } + } + }, + "UserResource": { + "title": "UserResource", + "required": [ + "id", + "name", + "surname" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User's institutional email" + }, + "fiscalCode": { + "type": "string", + "description": "User's fiscal code" + }, + "id": { + "type": "string", + "description": "User's unique identifier", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "User's name" + }, + "role": { + "type": "string", + "description": "User's role", + "enum": [ + "DELEGATE", + "MANAGER", + "OPERATOR", + "SUB_DELEGATE" + ] + }, + "roles": { + "type": "array", + "description": "User's roles in product", + "items": { + "type": "string" + } + }, + "surname": { + "type": "string", + "description": "User's surname" + } + } + }, + "SearchUserDto": { + "title": "SearchUserDto", + "required": [ + "fiscalCode" + ], + "type": "object", + "properties": { + "fiscalCode": { + "type": "string", + "description": "User's fiscal code" + }, + "statuses": { + "type": "array", + "description": "User's statuses", + "items": { + "type": "string", + "enum": [ + "ACTIVE", + "DELETED", + "PENDING", + "REJECTED", + "SUSPENDED", + "TOBEVALIDATED" + ] + } + } + } + }, + "OnboardingResponse1": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "productId": { + "type": "string" + }, + "workflowType": { + "type": "string" + }, + "institution": { + "$ref": "#/components/schemas/InstitutionResponse1" + }, + "pricingPlan": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserOnboardingResponse" + } + }, + "billing": { + "$ref": "#/components/schemas/BillingResponse2" + }, + "status": { + "type": "string" + }, + "additionalInformations": { + "$ref": "#/components/schemas/AdditionalInformationsDto" + }, + "userRequestUid": { + "type": "string" + }, + "isAggregator": { + "type": "boolean" + } + } + }, + "InstitutionResponse1": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "institutionType": { + "$ref": "#/components/schemas/InstitutionType" + }, + "taxCode": { + "type": "string" + }, + "taxCodeInvoicing": { + "type": "string" + }, + "subunitCode": { + "type": "string" + }, + "subunitType": { + "$ref": "#/components/schemas/InstitutionPaSubunitType" + }, + "origin": { + "$ref": "#/components/schemas/Origin" + }, + "originId": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "county": { + "type": "string" + }, + "description": { + "type": "string" + }, + "digitalAddress": { + "type": "string" + }, + "address": { + "type": "string" + }, + "zipCode": { + "type": "string" + }, + "parentDescription": { + "type": "string" + }, + "geographicTaxonomies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicTaxonomyDto1" + } + }, + "rea": { + "type": "string" + }, + "shareCapital": { + "type": "string" + }, + "businessRegisterPlace": { + "type": "string" + }, + "supportEmail": { + "type": "string" + }, + "supportPhone": { + "type": "string" + }, + "paymentServiceProvider": { + "$ref": "#/components/schemas/PaymentServiceProviderRequest1" + }, + "dataProtectionOfficer": { + "$ref": "#/components/schemas/DataProtectionOfficerRequest1" + } + } + }, + "InstitutionType": { + "enum": [ + "PA", + "PG", + "GSP", + "SA", + "PT", + "SCP", + "PSP", + "AS", + "REC", + "CON" + ], + "type": "string" + }, + "InstitutionPaSubunitType": { + "enum": [ + "AOO", + "UO", + "EC" + ], + "type": "string" + }, + "Origin": { + "enum": [ + "MOCK", + "IPA", + "SELC", + "ANAC", + "UNKNOWN", + "ADE", + "INFOCAMERE", + "IVASS" + ], + "type": "string" + }, + "GeographicTaxonomyDto1": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + }, + "PaymentServiceProviderRequest1": { + "type": "object", + "properties": { + "abiCode": { + "type": "string" + }, + "businessRegisterNumber": { + "type": "string" + }, + "legalRegisterNumber": { + "type": "string" + }, + "legalRegisterName": { + "type": "string" + }, + "vatNumberGroup": { + "type": "boolean" + } + } + }, + "DataProtectionOfficerRequest1": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "email": { + "type": "string" + }, + "pec": { + "type": "string" + } + } + }, + "UserOnboardingResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/PartyRole" + }, + "productRole": { + "type": "string" + }, + "userMailUuid": { + "type": "string" + } + } + }, + "PartyRole": { + "enum": [ + "MANAGER", + "DELEGATE", + "SUB_DELEGATE", + "OPERATOR", + "ADMIN_EA" + ], + "type": "string" + }, + "BillingResponse2": { + "type": "object", + "properties": { + "vatNumber": { + "type": "string" + }, + "recipientCode": { + "type": "string" + }, + "publicServices": { + "type": "boolean" + } + } + }, + "AdditionalInformationsDto": { + "type": "object", + "properties": { + "belongRegulatedMarket": { + "type": "boolean" + }, + "regulatedMarketNote": { + "type": "string" + }, + "ipa": { + "type": "boolean" + }, + "ipaCode": { + "type": "string" + }, + "establishedByRegulatoryProvision": { + "type": "boolean" + }, + "establishedByRegulatoryProvisionNote": { "type": "string" }, - "relationshipId": { + "agentOfPublicService": { + "type": "boolean" + }, + "agentOfPublicServiceNote": { "type": "string" }, - "role": { - "type": "string", - "enum": [ - "DELEGATE", - "MANAGER", - "OPERATOR", - "SUB_DELEGATE" - ] + "otherNote": { + "type": "string" } } }, + "OnboardingStatus": { + "enum": [ + "REQUEST", + "TOBEVALIDATED", + "PENDING", + "COMPLETED", + "FAILED", + "REJECTED", + "DELETED" + ], + "type": "string" + }, "OnboardingDefaultRequest": { "required": [ "productId", @@ -2295,6 +2771,15 @@ "$ref": "#/components/schemas/UserRequest" } }, + "aggregates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AggregateInstitutionRequest" + } + }, + "isAggregator": { + "type": "boolean" + }, "pricingPlan": { "type": "string" }, @@ -2305,44 +2790,80 @@ "$ref": "#/components/schemas/InstitutionBaseRequest" }, "billing": { - "$ref": "#/components/schemas/BillingRequest" + "$ref": "#/components/schemas/BillingRequest1" }, "additionalInformations": { "$ref": "#/components/schemas/AdditionalInformationsDto" } } }, - "BillingRequest": { + "UserRequest": { "type": "object", "properties": { - "vatNumber": { + "taxCode": { "type": "string" }, - "recipientCode": { + "name": { "type": "string" }, - "publicServices": { - "type": "boolean" + "surname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/PartyRole" } } }, - "UserRequest": { + "AggregateInstitutionRequest": { + "required": [ + "taxCode", + "description" + ], "type": "object", "properties": { "taxCode": { "type": "string" }, - "name": { + "description": { "type": "string" }, - "surname": { + "subunitCode": { "type": "string" }, - "email": { + "subunitType": { "type": "string" }, - "role": { - "$ref": "#/components/schemas/PartyRole" + "geographicTaxonomies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicTaxonomy1" + } + }, + "address": { + "type": "string" + }, + "zipCode": { + "type": "string" + }, + "originId": { + "type": "string" + }, + "origin": { + "$ref": "#/components/schemas/Origin" + } + } + }, + "GeographicTaxonomy1": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "desc": { + "type": "string" } } }, @@ -2396,7 +2917,7 @@ "geographicTaxonomies": { "type": "array", "items": { - "$ref": "#/components/schemas/GeographicTaxonomyDto" + "$ref": "#/components/schemas/GeographicTaxonomyDto1" } }, "rea": { @@ -2419,142 +2940,126 @@ } } }, - "GeographicTaxonomyDto": { + "BillingRequest1": { "type": "object", "properties": { - "code": { + "vatNumber": { "type": "string" }, - "desc": { + "recipientCode": { "type": "string" + }, + "publicServices": { + "type": "boolean" } } }, - "OnboardingResponse": { + "PageOfUserGroupResource": { + "title": "PageOfUserGroupResource", + "required": [ + "content", + "number", + "size", + "totalElements", + "totalPages" + ], "type": "object", "properties": { - "id": { - "type": "string" - }, - "productId": { - "type": "string" - }, - "workflowType": { - "type": "string" - }, - "institution": { - "$ref": "#/components/schemas/InstitutionResponse" - }, - "pricingPlan": { - "type": "string" - }, - "users": { + "content": { "type": "array", + "description": "The page content", "items": { - "$ref": "#/components/schemas/UserOnboardingResponse" + "$ref": "#/components/schemas/UserGroupResource" } }, - "billing": { - "$ref": "#/components/schemas/BillingResponse" + "number": { + "type": "integer", + "description": "The number of the current page", + "format": "int32" }, - "status": { - "type": "string" + "size": { + "type": "integer", + "description": "The size of the page", + "format": "int32" }, - "additionalInformations": { - "$ref": "#/components/schemas/AdditionalInformationsDto" + "totalElements": { + "type": "integer", + "description": "The total amount of elements", + "format": "int64" }, - "userRequestUid": { - "type": "string" + "totalPages": { + "type": "integer", + "description": "The number of total pages", + "format": "int32" } } }, - "InstitutionPaSubunitType": { - "enum": [ - "AOO", - "UO" + "UserGroupResource": { + "title": "UserGroupResource", + "required": [ + "description", + "id", + "institutionId", + "name", + "productId", + "status" ], - "type": "string" - }, - "UserOnboardingResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "role": { - "$ref": "#/components/schemas/PartyRole" - }, - "productRole": { - "type": "string" - }, - "userMailUuid": { - "type": "string" - } - } - }, - "AdditionalInformationsDto": { "type": "object", "properties": { - "belongRegulatedMarket": { - "type": "boolean" + "createdAt": { + "type": "string", + "description": "Date on which the group was created", + "format": "date-time" }, - "regulatedMarketNote": { - "type": "string" + "createdBy": { + "type": "string", + "description": "User by which the group was created" }, - "ipa": { - "type": "boolean" + "description": { + "type": "string", + "description": "Users group's description" }, - "ipaCode": { - "type": "string" + "id": { + "type": "string", + "description": "Users group's unique identifier" }, - "establishedByRegulatoryProvision": { - "type": "boolean" + "institutionId": { + "type": "string", + "description": "Users group's institutionId" }, - "establishedByRegulatoryProvisionNote": { - "type": "string" + "members": { + "type": "array", + "description": "List of all the members of the group", + "items": { + "type": "string", + "format": "uuid" + } }, - "agentOfPublicService": { - "type": "boolean" + "modifiedAt": { + "type": "string", + "description": "Date on which the group was modified", + "format": "date-time" }, - "agentOfPublicServiceNote": { - "type": "string" + "modifiedBy": { + "type": "string", + "description": "User by which the group was modified" }, - "otherNote": { - "type": "string" - } - } - }, - "PartyRole": { - "enum": [ - "MANAGER", - "DELEGATE", - "SUB_DELEGATE", - "OPERATOR" - ], - "type": "string" - }, - "OnboardingStatus": { - "enum": [ - "REQUEST", - "TOBEVALIDATED", - "PENDING", - "COMPLETED", - "FAILED", - "REJECTED", - "DELETED" - ], - "type": "string" - }, - "NotificationCountResult": { - "title": "NotificationCountResult", - "type": "object", - "properties": { - "notificationCount": { - "type": "integer", - "format": "int32" + "name": { + "type": "string", + "description": "Users group's name" }, "productId": { - "type": "string" + "type": "string", + "description": "Users group's productId" + }, + "status": { + "type": "string", + "description": "Users group's status", + "enum": [ + "ACTIVE", + "DELETED", + "SUSPENDED" + ] } } } diff --git a/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json b/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json index c4be3e3f..eb410f98 100644 --- a/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json +++ b/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "title": "selc-external-api", + "title": "Support PNPG API service", "description": "This service acts as an orchestrator for information coming from different services and as a proxy", "version": "1.0.0" }, @@ -12,35 +12,76 @@ ], "tags": [ { - "name": "institutions", - "description": "Institution Controller" + "name": "Institution", + "description": "Institution V 2 Controller" + }, + { + "name": "User", + "description": "User V 2 Controller" + }, + { + "name": "UserGroup", + "description": "User group endpoint CRUD operations" } ], "paths": { - "/users": { - "post": { + "/institutions": { + "get": { "tags": [ - "users" + "Institution" ], - "summary": "getUserInfo", - "description": "Service to retrieve user info including institutions and products linked to him", - "operationId": "getUserInfoUsingPOST", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchUserDto" - } + "summary": "Gets institutions filtering by taxCode and/or subunitCode", + "description": "Gets institutions filtering by taxCode and/or subunitCode", + "operationId": "getInstitutionsUsingGET", + "parameters": [ + { + "name": "taxCode", + "in": "query", + "description": "Institution's tax code", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "subunitCode", + "in": "query", + "description": "Institution's subunit code", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "origin", + "in": "query", + "description": "origin", + "required": false, + "style": "form", + "schema": { + "type": "string" + } + }, + { + "name": "originId", + "in": "query", + "description": "originId", + "required": false, + "style": "form", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserInfoResource" + "$ref": "#/components/schemas/InstitutionsResponse" } } } @@ -55,18 +96,8 @@ } } }, - "401": { - "description": "Unauthorized", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } - }, - "500": { - "description": "Internal Server Error", + "404": { + "description": "Not Found", "content": { "application/problem+json": { "schema": { @@ -88,18 +119,15 @@ "/institutions/{institutionId}/users": { "get": { "tags": [ - "institutions" + "Institution" ], - "summary": "Get users given institutionId", - "description": "Retrieve institution's users", - "operationId": "getUsersByInstitution", + "summary": "The API retrieves user's info including details of roles on products", + "operationId": "getInstitutionUsersUsingGET", "parameters": [ { "name": "institutionId", "in": "path", - "description": "Institution's unique identifier", "required": true, - "style": "simple", "schema": { "type": "string" } @@ -113,7 +141,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/UserInfoResponse" + "$ref": "#/components/schemas/UserProductResponse" } } } @@ -124,7 +152,27 @@ "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "401": { + "description": "Not Authorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" } } } @@ -134,7 +182,7 @@ "content": { "application/problem+json": { "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/Problem1" } } } @@ -149,33 +197,30 @@ ] } }, - "/institutions": { - "get": { + "/national-registries/legal-tax/verification": { + "post": { "tags": [ - "institutions" + "NationalRegistry" ], - "summary": "Gets institution by taxCode", - "description": "Gets institutions filtering by taxCode", - "operationId": "getInstitutionByTaxCode", - "parameters": [ - { - "name": "taxCode", - "in": "query", - "description": "Institution's tax code", - "required": false, - "style": "form", - "schema": { - "type": "string" + "summary": "verifyLegal", + "description": "Verify if given taxId is legal of given institution identified with vatNumber", + "operationId": "verifyLegalByPOST", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyRequestDto" + } } } - ], + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstitutionsResponse" + "$ref": "#/components/schemas/LegalVerificationResource" } } } @@ -190,6 +235,26 @@ } } }, + "401": { + "description": "Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -199,6 +264,84 @@ } } } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [ + "global" + ] + } + ] + } + }, + "/users": { + "post": { + "tags": [ + "User" + ], + "summary": "getUserInfo", + "description": "Service to retrieve user info including institutions and products linked to him, this service retrives 100 institutions at most", + "operationId": "V2getUserInfoUsingGET", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchUserDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfoResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + } } }, "security": [ @@ -222,7 +365,7 @@ { "name": "institutionId", "in": "query", - "description": "Institution's unique identifier", + "description": "Users group's institutionId", "required": false, "style": "form", "schema": { @@ -365,103 +508,274 @@ } ] } - }, - "/national-registries/legal-tax/verification": { - "post": { - "tags": [ - "national-registry" - ], - "summary": "Perform operations on national registry", - "description": "verify if given taxId is legal of given institution identified with vatNumber", - "operationId": "verifyLegalByPOST", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerifyRequestDto" - } + } + }, + "components": { + "schemas": { + "InstitutionsResponse": { + "title": "InstitutionsResponse", + "type": "object", + "properties": { + "institutions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstitutionResponse" } } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LegalVerificationResource" - } - } - } + } + }, + "InstitutionResponse": { + "title": "InstitutionResponse", + "type": "object", + "properties": { + "address": { + "type": "string" }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } + "aooParentCode": { + "type": "string" }, - "401": { - "description": "Unauthorized", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttributesResponse" } }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } + "businessRegisterPlace": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "county": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "dataProtectionOfficer": { + "$ref": "#/components/schemas/DataProtectionOfficerResponse" + }, + "delegation": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "digitalAddress": { + "type": "string" + }, + "externalId": { + "type": "string" + }, + "geographicTaxonomies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoTaxonomies" } }, - "500": { - "description": "Internal Server Error", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } + "id": { + "type": "string" + }, + "imported": { + "type": "boolean" + }, + "institutionType": { + "type": "string", + "enum": [ + "AS", + "CON", + "GSP", + "PA", + "PG", + "PSP", + "PT", + "REC", + "SA", + "SCP" + ] + }, + "istatCode": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "onboarding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OnboardedProductResponse" } + }, + "origin": { + "type": "string" + }, + "originId": { + "type": "string" + }, + "paymentServiceProvider": { + "$ref": "#/components/schemas/PaymentServiceProviderResponse" + }, + "rea": { + "type": "string" + }, + "rootParent": { + "$ref": "#/components/schemas/RootParentResponse" + }, + "shareCapital": { + "type": "string" + }, + "subunitCode": { + "type": "string" + }, + "subunitType": { + "type": "string" + }, + "supportEmail": { + "type": "string" + }, + "supportPhone": { + "type": "string" + }, + "taxCode": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "zipCode": { + "type": "string" } - }, - "security": [ - { - "bearerAuth": [ - "global" - ] + } + }, + "AttributesResponse": { + "title": "AttributesResponse", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "origin": { + "type": "string" } - ] - } - } - }, - "components": { - "schemas": { - "InvalidParam": { - "title": "InvalidParam", - "required": [ - "name", - "reason" - ], + } + }, + "DataProtectionOfficerResponse": { + "title": "DataProtectionOfficerResponse", "type": "object", "properties": { - "name": { + "address": { + "type": "string" + }, + "email": { + "type": "string" + }, + "pec": { + "type": "string" + } + } + }, + "GeoTaxonomies": { + "title": "GeoTaxonomies", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "desc": { + "type": "string" + } + } + }, + "OnboardedProductResponse": { + "title": "OnboardedProductResponse", + "type": "object", + "properties": { + "billing": { + "$ref": "#/components/schemas/BillingResponse1" + }, + "createdAt": { "type": "string", - "description": "Invalid parameter name." + "format": "date-time" }, - "reason": { + "isAggregator": { + "type": "boolean" + }, + "productId": { + "type": "string" + }, + "status": { "type": "string", - "description": "Invalid parameter reason." + "enum": [ + "ACTIVE", + "DELETED", + "PENDING", + "REJECTED", + "SUSPENDED", + "TOBEVALIDATED" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "BillingResponse1": { + "title": "BillingResponse", + "type": "object", + "properties": { + "publicServices": { + "type": "boolean" + }, + "recipientCode": { + "type": "string" + }, + "taxCodeInvoicing": { + "type": "string" + }, + "vatNumber": { + "type": "string" + } + } + }, + "PaymentServiceProviderResponse": { + "title": "PaymentServiceProviderResponse", + "type": "object", + "properties": { + "abiCode": { + "type": "string" + }, + "businessRegisterNumber": { + "type": "string" + }, + "legalRegisterName": { + "type": "string" + }, + "legalRegisterNumber": { + "type": "string" + }, + "vatNumberGroup": { + "type": "boolean" + } + } + }, + "RootParentResponse": { + "title": "RootParentResponse", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" } } }, @@ -505,161 +819,139 @@ }, "description": "A \"problem detail\" as a way to carry machine-readable details of errors (https://datatracker.ietf.org/doc/html/rfc7807)" }, - "SearchUserDto": { - "title": "SearchUserDto", + "InvalidParam": { + "title": "InvalidParam", "required": [ - "fiscalCode" + "name", + "reason" ], "type": "object", "properties": { - "fiscalCode": { + "name": { "type": "string", - "description": "User's fiscal code" - }, - "statuses": { - "type": "array", - "description": "User's statuses", - "items": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" - ] - } - } - } - }, - "UserInfoResource": { - "title": "UserInfoResource", - "type": "object", - "properties": { - "onboardedInstitutions": { - "type": "array", - "description": "Object that includes all info about onboarded institutions linked to a user", - "items": { - "$ref": "#/components/schemas/OnboardedInstitutionResource" - } + "description": "Invalid parameter name." }, - "user": { - "description": "Object that includes all info about a user", - "$ref": "#/components/schemas/UserResource" + "reason": { + "type": "string", + "description": "Invalid parameter reason." } } }, - "UserResource": { - "title": "UserResource", + "UserProductResponse": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "User's institutional email" - }, "id": { - "type": "string", - "description": "User's unique identifier", - "format": "uuid" + "type": "string" + }, + "taxCode": { + "type": "string" }, "name": { - "type": "string", - "description": "User's name" + "type": "string" }, - "roles": { + "surname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "products": { "type": "array", - "description": "User's roles in product", "items": { - "type": "string" + "$ref": "#/components/schemas/OnboardedProductResponse1" } - }, - "surname": { - "type": "string", - "description": "User's surname" - }, - "fiscalCode": { - "type": "string", - "description": "User's fiscal code" } } }, - "OnboardedInstitutionResource": { - "title": "OnboardedInstitutionResource", + "OnboardedProductResponse1": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "Institution's address" - }, - "description": { - "type": "string", - "description": "Institution's description" - }, - "digitalAddress": { - "type": "string", - "description": "Institution's digital address" + "productId": { + "type": "string" }, - "id": { - "type": "string", - "description": "Institution's Id" + "tokenId": { + "type": "string" }, - "institutionType": { - "type": "string", - "description": "Institution's type", - "enum": [ - "GSP", - "PA", - "PG", - "PSP", - "PT", - "SCP", - "SA", - "AS", - "REC", - "CON" - ] + "status": { + "$ref": "#/components/schemas/OnboardedProductState" }, - "productInfo": { - "description": "Products' info of onboardings", - "$ref": "#/components/schemas/ProductInfo" + "productRole": { + "type": "string" }, - "state": { - "type": "string", - "description": "Onboarding's state" + "role": { + "description": "Available values: MANAGER, DELEGATE, SUB_DELEGATE, OPERATOR, ADMIN_EA", + "type": "string" }, - "taxCode": { - "type": "string", - "description": "Institution's tax code" + "env": { + "$ref": "#/components/schemas/Env" }, - "userEmail": { - "type": "string", - "description": "User's email linked to the institution" + "createdAt": { + "$ref": "#/components/schemas/LocalDateTime" }, - "zipCode": { - "type": "string", - "description": "Institution's zip code" + "updatedAt": { + "$ref": "#/components/schemas/LocalDateTime" } } }, - "ProductInfo": { - "title": "ProductInfo", + "OnboardedProductState": { + "enum": [ + "ACTIVE", + "PENDING", + "TOBEVALIDATED", + "SUSPENDED", + "DELETED", + "REJECTED" + ], + "type": "string" + }, + "Env": { + "enum": [ + "ROOT", + "DEV", + "COLL", + "PROD" + ], + "type": "string" + }, + "LocalDateTime": { + "format": "date-time", + "type": "string", + "example": "2022-03-10T12:15:50" + }, + "Problem1": { "type": "object", "properties": { - "createdAt": { - "type": "string", - "format": "date-time" + "detail": { + "type": "string" }, - "id": { + "instance": { "type": "string" }, - "productRole": { + "invalidParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvalidParam1" + } + }, + "status": { + "format": "int32", + "type": "integer" + }, + "title": { "type": "string" }, - "role": { + "type": { + "type": "string" + } + } + }, + "InvalidParam1": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "status": { + "reason": { "type": "string" } } @@ -695,387 +987,286 @@ } } }, - "PageOfUserGroupResource": { - "title": "PageOfUserGroupResource", + "UserInfoResource": { + "title": "UserInfoResource", "type": "object", "properties": { - "content": { + "onboardedInstitutions": { "type": "array", - "description": "The page content", + "description": "Object that includes all info about onboarded institutions linked to a user", "items": { - "$ref": "#/components/schemas/UserGroupResource" + "$ref": "#/components/schemas/OnboardedInstitutionResource" } }, - "number": { - "type": "integer", - "description": "The number of the current page", - "format": "int32" - }, - "size": { - "type": "integer", - "description": "The size of the page", - "format": "int32" - }, - "totalElements": { - "type": "integer", - "description": "The total amount of elements", - "format": "int64" - }, - "totalPages": { - "type": "integer", - "description": "The number of total pages", - "format": "int32" - } - } - }, - "UserGroupResource": { - "title": "UserGroupResource", - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Users group's description" - }, - "id": { - "type": "string", - "description": "Users group's unique identifier" - }, - "institutionId": { - "type": "string", - "description": "Users group's institutionId" - }, - "name": { - "type": "string", - "description": "Users group's name" - }, - "productId": { - "type": "string", - "description": "Users group's productId" - }, - "status": { - "type": "string", - "description": "Users group's status", - "enum": [ - "ACTIVE", - "DELETED", - "SUSPENDED" - ] - } - } - }, - "InstitutionsResponse": { - "title": "InstitutionsResponse", - "type": "object", - "properties": { - "institutions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstitutionResponse" - } + "user": { + "description": "Object that includes all info about a user", + "$ref": "#/components/schemas/UserResource" } } }, - "InstitutionResponse": { - "title": "InstitutionResponse", + "OnboardedInstitutionResource": { + "title": "OnboardedInstitutionResource", "type": "object", "properties": { "address": { - "type": "string" - }, - "aooParentCode": { - "type": "string" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttributesResponse" - } - }, - "businessRegisterPlace": { - "type": "string" - }, - "createdAt": { "type": "string", - "format": "date-time" - }, - "dataProtectionOfficer": { - "$ref": "#/components/schemas/DataProtectionOfficerResponse" + "description": "Institution's address" }, "description": { - "type": "string" + "type": "string", + "description": "Institution's description" }, "digitalAddress": { - "type": "string" - }, - "externalId": { - "type": "string" - }, - "geographicTaxonomies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoTaxonomies" - } + "type": "string", + "description": "Institution's digital address" }, "id": { - "type": "string" - }, - "imported": { - "type": "boolean" + "type": "string", + "description": "Institution's Id" }, "institutionType": { "type": "string", + "description": "Institution's type", "enum": [ + "AS", + "CON", "GSP", "PA", "PG", "PSP", "PT", - "SCP", - "SA", - "AS", "REC", - "CON" + "SA", + "SCP" ] }, - "origin": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "parentDescription": { - "type": "string" - }, - "paymentServiceProvider": { - "$ref": "#/components/schemas/PaymentServiceProviderResponse" - }, - "rea": { - "type": "string" - }, - "shareCapital": { - "type": "string" - }, - "subunitCode": { - "type": "string" - }, - "subunitType": { - "type": "string" - }, - "supportEmail": { - "type": "string" + "productInfo": { + "description": "Products' info of onboardings", + "$ref": "#/components/schemas/ProductInfo" }, - "supportPhone": { - "type": "string" + "state": { + "type": "string", + "description": "Onboarding's state" }, "taxCode": { - "type": "string" + "type": "string", + "description": "Institution's tax code" }, - "updatedAt": { + "userEmail": { "type": "string", - "format": "date-time" + "description": "User's email linked to the institution" }, "zipCode": { - "type": "string" - }, - "onboarding": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OnboardedProductResponse" - } + "type": "string", + "description": "Institution's zip code" } } }, - "OnboardedProductResponse": { - "title": "OnboardedProductResponse", + "ProductInfo": { + "title": "ProductInfo", "type": "object", "properties": { - "billing": { - "$ref": "#/components/schemas/BillingResponse" - }, "createdAt": { "type": "string", "format": "date-time" }, - "productId": { + "id": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "ACTIVE", - "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" - ] - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "AttributesResponse": { - "title": "AttributesResponse", - "type": "object", - "properties": { - "code": { + "productRole": { "type": "string" }, - "description": { + "role": { "type": "string" }, - "origin": { + "status": { "type": "string" } } }, - "DataProtectionOfficerResponse": { - "title": "DataProtectionOfficerResponse", + "UserResource": { + "title": "UserResource", + "required": [ + "id", + "name", + "surname" + ], "type": "object", "properties": { - "address": { - "type": "string" - }, "email": { - "type": "string" + "type": "string", + "description": "User's institutional email" }, - "pec": { - "type": "string" + "fiscalCode": { + "type": "string", + "description": "User's fiscal code" + }, + "id": { + "type": "string", + "description": "User's unique identifier", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "User's name" + }, + "role": { + "type": "string", + "description": "User's role", + "enum": [ + "DELEGATE", + "MANAGER", + "OPERATOR", + "SUB_DELEGATE" + ] + }, + "roles": { + "type": "array", + "description": "User's roles in product", + "items": { + "type": "string" + } + }, + "surname": { + "type": "string", + "description": "User's surname" } } }, - "GeoTaxonomies": { - "title": "GeoTaxonomies", + "SearchUserDto": { + "title": "SearchUserDto", + "required": [ + "fiscalCode" + ], "type": "object", "properties": { - "code": { - "type": "string" + "fiscalCode": { + "type": "string", + "description": "User's fiscal code" }, - "desc": { - "type": "string" + "statuses": { + "type": "array", + "description": "User's statuses", + "items": { + "type": "string", + "enum": [ + "ACTIVE", + "DELETED", + "PENDING", + "REJECTED", + "SUSPENDED", + "TOBEVALIDATED" + ] + } } } }, - "PaymentServiceProviderResponse": { - "title": "PaymentServiceProviderResponse", + "PageOfUserGroupResource": { + "title": "PageOfUserGroupResource", + "required": [ + "content", + "number", + "size", + "totalElements", + "totalPages" + ], "type": "object", "properties": { - "abiCode": { - "type": "string" + "content": { + "type": "array", + "description": "The page content", + "items": { + "$ref": "#/components/schemas/UserGroupResource" + } }, - "businessRegisterNumber": { - "type": "string" + "number": { + "type": "integer", + "description": "The number of the current page", + "format": "int32" }, - "legalRegisterName": { - "type": "string" + "size": { + "type": "integer", + "description": "The size of the page", + "format": "int32" }, - "legalRegisterNumber": { - "type": "string" + "totalElements": { + "type": "integer", + "description": "The total amount of elements", + "format": "int64" }, - "vatNumberGroup": { - "type": "boolean" + "totalPages": { + "type": "integer", + "description": "The number of total pages", + "format": "int32" } } }, - "BillingResponse": { - "title": "BillingResponse", + "UserGroupResource": { + "title": "UserGroupResource", + "required": [ + "description", + "id", + "institutionId", + "name", + "productId", + "status" + ], "type": "object", "properties": { - "publicServices": { - "type": "boolean" + "createdAt": { + "type": "string", + "description": "Date on which the group was created", + "format": "date-time" }, - "recipientCode": { - "type": "string" + "createdBy": { + "type": "string", + "description": "User by which the group was created" }, - "vatNumber": { - "type": "string" - } - } - }, - "UserInfoResponse": { - "title": "UserInfoResponse", - "type": "object", - "properties": { - "email": { - "type": "string" + "description": { + "type": "string", + "description": "Users group's description" }, "id": { - "type": "string" + "type": "string", + "description": "Users group's unique identifier" }, - "name": { - "type": "string" + "institutionId": { + "type": "string", + "description": "Users group's institutionId" }, - "products": { + "members": { "type": "array", + "description": "List of all the members of the group", "items": { - "$ref": "#/components/schemas/OnboardedProduct" + "type": "string", + "format": "uuid" } }, - "surname": { - "type": "string" - }, - "taxCode": { - "type": "string" - } - } - }, - "OnboardedProduct": { - "title": "OnboardedProduct", - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "createdAt": { + "modifiedAt": { "type": "string", + "description": "Date on which the group was modified", "format": "date-time" }, - "env": { + "modifiedBy": { "type": "string", - "enum": [ - "COLL", - "DEV", - "PROD", - "ROOT" - ] + "description": "User by which the group was modified" }, - "productId": { - "type": "string" - }, - "productRole": { - "type": "string" - }, - "relationshipId": { - "type": "string" + "name": { + "type": "string", + "description": "Users group's name" }, - "role": { + "productId": { "type": "string", - "enum": [ - "DELEGATE", - "MANAGER", - "OPERATOR", - "SUB_DELEGATE" - ] + "description": "Users group's productId" }, "status": { "type": "string", + "description": "Users group's status", "enum": [ "ACTIVE", "DELETED", - "PENDING", - "REJECTED", - "SUSPENDED", - "TOBEVALIDATED" + "SUSPENDED" ] - }, - "tokenId": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time" } } }