Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMN-893 supertest in attribute-registry-process #1161

Open
wants to merge 48 commits into
base: IMN-896_Supertest-tenant
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e367111
WIP
rGregnanin Oct 24, 2024
70d223f
WIP
rGregnanin Oct 24, 2024
0205958
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 24, 2024
907694d
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 24, 2024
35fd29e
getClientById (to review)
rGregnanin Oct 24, 2024
621ddb0
addProducerKeyChainEservice
rGregnanin Oct 24, 2024
5604ad3
createApiClient
rGregnanin Oct 24, 2024
1dd4a80
createConsumerClient
rGregnanin Oct 24, 2024
3dd1df8
createProducerKeyChain
rGregnanin Oct 24, 2024
817c4a1
deleteClient
rGregnanin Oct 24, 2024
6f82ab6
deleteProducerKeyChain
rGregnanin Oct 24, 2024
c236612
getClientKeyById (to review)
rGregnanin Oct 24, 2024
7d83ce6
removeClientKeyById
rGregnanin Oct 24, 2024
02cd57d
removeClientPurpose
rGregnanin Oct 25, 2024
28e7687
removeProducerKeyChainEservice
rGregnanin Oct 25, 2024
f12bbc1
removeProducerKeyChainKeyById
rGregnanin Oct 25, 2024
1d27ca0
removePurposeFromClients
rGregnanin Oct 25, 2024
a9a0ecb
fix getClientById
rGregnanin Oct 25, 2024
e6d111c
fix getClientKeyById
rGregnanin Oct 25, 2024
0670a32
getClientKeys
rGregnanin Oct 25, 2024
aa5f104
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 28, 2024
73e42bb
getClients
rGregnanin Oct 28, 2024
49e6af1
getClientUsers
rGregnanin Oct 28, 2024
8eaa87b
getKeyWithClientByKeyId
rGregnanin Oct 28, 2024
1e79f8f
getProducerKeychainById
rGregnanin Oct 28, 2024
87bea82
getProducerKeychainKeyById
rGregnanin Oct 28, 2024
f8b0ebc
getProducerKeychainKeys2
rGregnanin Oct 28, 2024
a06bb5b
refactor
rGregnanin Oct 28, 2024
e1776d8
getProducerKeychains
rGregnanin Oct 28, 2024
6abbe99
getProducerKeychains3
rGregnanin Oct 28, 2024
8e8b136
getProducerKeychainUsers
rGregnanin Oct 28, 2024
f4bf75e
removeClientUser
rGregnanin Oct 28, 2024
8215f5b
removeProducerKeychainUser
rGregnanin Oct 28, 2024
1a14c8a
various fixes
rGregnanin Oct 28, 2024
aad876c
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 28, 2024
f83f55a
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 28, 2024
9c0cc53
Add selfcareApiClient mock
Carminepo2 Oct 30, 2024
90f3cb5
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 30, 2024
ad241a6
Added missing routes
rGregnanin Oct 30, 2024
e42de8e
fix
rGregnanin Oct 30, 2024
b84e92a
Merge branch 'addSupertest' into IMN-894_SuperTest-authorization
rGregnanin Oct 30, 2024
7d85070
WIP
rGregnanin Nov 1, 2024
d79f9a5
Merge branch 'IMN-894_SuperTest-authorization' into IMN-893_Supertest…
rGregnanin Nov 1, 2024
b582226
Merge branch 'IMN-896_Supertest-tenant' into IMN-893_Supertest-attrib…
rGregnanin Nov 1, 2024
ccd9737
createInternalCertifiedAttribute
rGregnanin Nov 2, 2024
cd02696
implemented supertest
rGregnanin Nov 2, 2024
6a2452c
Merge branch 'IMN-896_Supertest-tenant' into IMN-893_Supertest-attrib…
rGregnanin Nov 19, 2024
d181482
fix test
rGregnanin Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { AttributeKind, Attribute, attributeKind } from "pagopa-interop-models";
import {
AttributeKind,
Attribute,
attributeKind,
unsafeBrandId,
} from "pagopa-interop-models";
import { attributeRegistryApi } from "pagopa-interop-api-clients";
import { match } from "ts-pattern";

Expand Down Expand Up @@ -31,3 +36,15 @@ export const toApiAttribute = (
code: attribute.code,
origin: attribute.origin,
});

export const toAttribute = (
attribute: attributeRegistryApi.Attribute
): Attribute => ({
id: unsafeBrandId(attribute.id),
name: attribute.name,
kind: toAttributeKind(attribute.kind),
description: attribute.description,
creationTime: new Date(attribute.creationTime),
code: attribute.code,
origin: attribute.origin,
});
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ const attributeRouter = (
authorizationMiddleware([INTERNAL_ROLE]),
async (req, res) => {
const ctx = fromAppContext(req.ctx);

try {
const attribute =
await attributeRegistryService.createInternalCertifiedAttribute(
Expand Down
Loading