Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
[SELC-4680] refactor: remove relationships endpoint and business logic (
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf authored May 3, 2024
1 parent 38e283f commit f4f39b7
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 1,113 deletions.
331 changes: 0 additions & 331 deletions app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -770,113 +770,6 @@
} ]
}
},
"/external/institutions/{externalId}/relationships" : {
"get" : {
"tags" : [ "External" ],
"summary" : "returns the relationships related to the institution",
"description" : "returns the relationships related to the institution",
"operationId" : "getUserInstitutionRelationshipsByExternalIdUsingGET",
"parameters" : [ {
"name" : "externalId",
"in" : "path",
"description" : "Institution's unique external identifier",
"required" : true,
"style" : "simple",
"schema" : {
"type" : "string"
}
}, {
"name" : "personId",
"in" : "query",
"description" : "personId",
"required" : false,
"style" : "form",
"schema" : {
"type" : "string"
}
}, {
"name" : "roles",
"in" : "query",
"description" : "roles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "DELEGATE", "MANAGER", "OPERATOR", "SUB_DELEGATE" ]
}
}, {
"name" : "states",
"in" : "query",
"description" : "states",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "ACTIVE", "DELETED", "PENDING", "REJECTED", "SUSPENDED", "TOBEVALIDATED" ]
}
}, {
"name" : "products",
"in" : "query",
"description" : "products",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "productRoles",
"in" : "query",
"description" : "productRoles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/RelationshipResult"
}
}
}
}
},
"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" : [ {
"bearerAuth" : [ "global" ]
} ]
}
},
"/institutions" : {
"get" : {
"tags" : [ "Institution", "external-v2", "support" ],
Expand Down Expand Up @@ -1992,113 +1885,6 @@
} ]
}
},
"/institutions/{id}/relationships" : {
"get" : {
"tags" : [ "Institution" ],
"summary" : "returns the relationships related to the institution",
"description" : "returns the relationships related to the institution",
"operationId" : "getUserInstitutionRelationshipsUsingGET",
"parameters" : [ {
"name" : "id",
"in" : "path",
"description" : "The internal identifier of the institution",
"required" : true,
"style" : "simple",
"schema" : {
"type" : "string"
}
}, {
"name" : "personId",
"in" : "query",
"description" : "personId",
"required" : false,
"style" : "form",
"schema" : {
"type" : "string"
}
}, {
"name" : "roles",
"in" : "query",
"description" : "roles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "DELEGATE", "MANAGER", "OPERATOR", "SUB_DELEGATE" ]
}
}, {
"name" : "states",
"in" : "query",
"description" : "states",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "ACTIVE", "DELETED", "PENDING", "REJECTED", "SUSPENDED", "TOBEVALIDATED" ]
}
}, {
"name" : "products",
"in" : "query",
"description" : "products",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "productRoles",
"in" : "query",
"description" : "productRoles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/RelationshipResult"
}
}
}
}
},
"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" : [ {
"bearerAuth" : [ "global" ]
} ]
}
},
"/institutions/{institutionId}/createdAt" : {
"put" : {
"tags" : [ "Institution" ],
Expand Down Expand Up @@ -2410,111 +2196,6 @@
} ]
}
},
"/relationships" : {
"get" : {
"tags" : [ "Management" ],
"summary" : "Return a list of relationships",
"description" : "Return a list of relationships",
"operationId" : "getInstitutionRelationshipsUsingGET",
"parameters" : [ {
"name" : "from",
"in" : "query",
"description" : "from",
"required" : false,
"style" : "form",
"schema" : {
"type" : "string"
}
}, {
"name" : "to",
"in" : "query",
"description" : "to",
"required" : false,
"style" : "form",
"schema" : {
"type" : "string"
}
}, {
"name" : "roles",
"in" : "query",
"description" : "roles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "DELEGATE", "MANAGER", "OPERATOR", "SUB_DELEGATE" ]
}
}, {
"name" : "states",
"in" : "query",
"description" : "states",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "ACTIVE", "DELETED", "PENDING", "REJECTED", "SUSPENDED", "TOBEVALIDATED" ]
}
}, {
"name" : "products",
"in" : "query",
"description" : "products",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "productRoles",
"in" : "query",
"description" : "productRoles",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"204" : {
"description" : "No Content",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/RelationshipsManagement"
}
}
}
},
"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"
}
}
}
}
},
"deprecated" : true,
"security" : [ {
"bearerAuth" : [ "global" ]
} ]
}
},
"/onboarding" : {
"head" : {
"tags" : [ "Onboarding" ],
Expand Down Expand Up @@ -5998,18 +5679,6 @@
}
}
},
"RelationshipsManagement" : {
"title" : "RelationshipsManagement",
"type" : "object",
"properties" : {
"items" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/RelationshipResult"
}
}
}
},
"RootParent" : {
"title" : "RootParent",
"type" : "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package it.pagopa.selfcare.mscore.core;

import it.pagopa.selfcare.commons.base.security.PartyRole;
import it.pagopa.selfcare.mscore.model.institution.Onboarding;
import it.pagopa.selfcare.mscore.model.user.ProductManagerInfo;
import it.pagopa.selfcare.mscore.model.user.RelationshipInfo;
import it.pagopa.selfcare.mscore.constant.RelationshipState;
import it.pagopa.selfcare.mscore.model.institution.GeographicTaxonomies;
import it.pagopa.selfcare.mscore.model.institution.Institution;
import it.pagopa.selfcare.mscore.model.institution.Onboarding;
import it.pagopa.selfcare.mscore.model.user.ProductManagerInfo;

import java.util.List;

Expand All @@ -20,12 +18,6 @@ public interface ExternalService {

List<GeographicTaxonomies> retrieveInstitutionGeoTaxonomiesByExternalId(String externalId);

List<RelationshipInfo> getUserInstitutionRelationships(String externalId, String userId, String personId,
List<PartyRole> roles,
List<RelationshipState> states,
List<String> products,
List<String> productRoles);

List<Onboarding> retrieveInstitutionProductsByExternalId(String externalId, List<RelationshipState> states);

List<Institution> retrieveInstitutionByIds(List<String> ids);
Expand Down
Loading

0 comments on commit f4f39b7

Please sign in to comment.