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-563: consumerServiceV2 in client-readmodel-writer #566

Merged
merged 1,139 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1139 commits
Select commit Hold shift + click to select a range
7eddf2d
Merge branch 'IMN-516_remove-expected-approval-date' into IMN-539_aut…
taglioni-r May 20, 2024
ea30de3
Remove empty files
taglioni-r May 20, 2024
05021e8
Remove empty file
taglioni-r May 20, 2024
4cfd1b5
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 20, 2024
496bd4e
Add ClientId
taglioni-r May 20, 2024
00b27da
Update comments
taglioni-r May 20, 2024
da22281
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 20, 2024
23bcf3c
Merge branch 'IMN-452_retrieveRiskAnalysisConfigurationByVersion' int…
taglioni-r May 20, 2024
4fcd015
Fix id mapping
taglioni-r May 20, 2024
cbe0032
Merge branch 'IMN-447_clone-purpose' into IMN-452_retrieveRiskAnalysi…
AsterITA May 20, 2024
c676fec
Merge branch 'IMN-452_retrieveRiskAnalysisConfigurationByVersion' int…
taglioni-r May 20, 2024
389d1b8
Merge branch 'IMN-409_notifier-seeder-purpose' into IMN-516_remove-ex…
taglioni-r May 20, 2024
568c847
Merge branch 'IMN-516_remove-expected-approval-date' into IMN-539_aut…
taglioni-r May 20, 2024
730e5b3
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 20, 2024
c29cc1d
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 20, 2024
312f438
Fix
taglioni-r May 20, 2024
c22c800
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 20, 2024
bfaedd9
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 20, 2024
0f15b62
Fix
taglioni-r May 20, 2024
c93d277
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 20, 2024
f9e4906
Fix image
taglioni-r May 20, 2024
f9c011c
Add topic config
taglioni-r May 21, 2024
02b0387
Export converters
taglioni-r May 21, 2024
c19a0c3
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 21, 2024
2c4ea8a
Fix api spec
taglioni-r May 21, 2024
8011390
Fix model
taglioni-r May 21, 2024
72d11b0
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 21, 2024
c902f57
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 21, 2024
2e4e437
Update events definition
taglioni-r May 21, 2024
fa34b9f
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 21, 2024
c59e4b7
Remove comments
taglioni-r May 21, 2024
1993059
Refactor
taglioni-r May 21, 2024
2a2b311
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 21, 2024
31bb12c
Fix
taglioni-r May 21, 2024
ac57cee
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 22, 2024
54d9b3f
Export models
taglioni-r May 22, 2024
a9781c9
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 22, 2024
42999cd
Implement notifier
taglioni-r May 22, 2024
ef29a3a
Adapt notifier to authorization events
taglioni-r May 22, 2024
c23f52e
Add sql table
taglioni-r May 22, 2024
03181a4
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 22, 2024
27519ec
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 22, 2024
e9eb383
Add placeholder name for authorization table
taglioni-r May 22, 2024
6edec50
Rename schema
taglioni-r May 22, 2024
5d443ca
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 22, 2024
60b87fa
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 22, 2024
990eb3c
Draft test
taglioni-r May 23, 2024
bf35fcd
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 23, 2024
7c2272e
Update test
taglioni-r May 23, 2024
bc09d7e
Merge branch 'IMN-570_notifier-seeder-authorization' of https://githu…
taglioni-r May 23, 2024
e28137e
Fix test
taglioni-r May 23, 2024
4cdfedb
Update test
taglioni-r May 23, 2024
a938d1a
Update test
taglioni-r May 23, 2024
e447223
Update test
taglioni-r May 23, 2024
acbc33e
Update test
taglioni-r May 23, 2024
4bd8149
Draft
taglioni-r May 23, 2024
fe78f05
Revert
taglioni-r May 23, 2024
d797483
Renaming
taglioni-r May 23, 2024
0b05fe8
Draft
taglioni-r May 23, 2024
4584e1c
Draft
taglioni-r May 23, 2024
95f7afc
Draft
taglioni-r May 23, 2024
ccad7b4
Draft
taglioni-r May 23, 2024
d2b24d8
Revert
taglioni-r May 23, 2024
ce67c25
Draft
taglioni-r May 23, 2024
f774eac
Draft
taglioni-r May 23, 2024
c115986
Update date in model
taglioni-r May 23, 2024
bf73493
Update date in models
taglioni-r May 23, 2024
06456a6
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 23, 2024
0b9e6cf
Fix spacing
taglioni-r May 23, 2024
74eb05a
Add script
taglioni-r May 23, 2024
edf9a52
Add topic
taglioni-r May 23, 2024
9af693f
Add scaffold
taglioni-r May 23, 2024
f4598f5
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 23, 2024
c9fb37a
Fix dockerfile
taglioni-r May 23, 2024
7d57346
Merge branch 'IMN-559_scaffold-key-readmodel-writer' of https://githu…
taglioni-r May 23, 2024
e8cc61b
Add script
taglioni-r May 23, 2024
a3d1db4
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 23, 2024
7087e4f
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 23, 2024
dc446b1
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 23, 2024
e73c05d
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 23, 2024
fdb372e
Fix
taglioni-r May 23, 2024
b94bbbf
Renaming
taglioni-r May 23, 2024
f30487b
Merge branch 'IMN-559_scaffold-key-readmodel-writer' of https://githu…
taglioni-r May 23, 2024
f2bc827
Add scaffold
taglioni-r May 23, 2024
354982b
Minor change
taglioni-r May 23, 2024
59fbb46
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 23, 2024
9162a4b
Remove comments
taglioni-r May 23, 2024
2c7a8e9
Remove some events
taglioni-r May 23, 2024
de6c558
Remove events
taglioni-r May 23, 2024
dc1e1c0
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-561_auth-v2…
taglioni-r May 23, 2024
ebb0c4e
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 23, 2024
5da9dd9
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 23, 2024
59bd886
Fix
taglioni-r May 23, 2024
dc6807d
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 23, 2024
775c1ac
Fix
taglioni-r May 23, 2024
24e7fb2
Refactor
taglioni-r May 24, 2024
ff846d7
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 24, 2024
295c9eb
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 24, 2024
e153287
Add mocks
taglioni-r May 24, 2024
7213f0d
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r May 24, 2024
b01d7e4
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 24, 2024
c253f49
Use mock from commons-test
taglioni-r May 24, 2024
7118442
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 24, 2024
93ed29f
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 24, 2024
07b5347
Add latest changes in start script
taglioni-r May 24, 2024
283b60b
Add latest changes in start script
taglioni-r May 24, 2024
8ff9154
Add latest changes in start script
taglioni-r May 24, 2024
34d1408
Refactor
taglioni-r May 27, 2024
2bbdc8e
implemented clientConsumerServicev2
AsterITA May 27, 2024
a708a2a
Fix
taglioni-r May 28, 2024
bf601c7
implemented tests
AsterITA May 28, 2024
946ab6f
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r May 30, 2024
fddaf2a
Fix import
taglioni-r May 30, 2024
d4982c1
Renaming
taglioni-r May 30, 2024
31e370b
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 30, 2024
809066f
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r May 30, 2024
84592f1
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 30, 2024
5fd31a8
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 30, 2024
7473054
Adjust test setup
taglioni-r May 30, 2024
a950b87
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 30, 2024
2992e6a
Adjust test setup
taglioni-r May 30, 2024
dc4be79
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r May 30, 2024
7ef6c1f
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r May 30, 2024
754d266
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r May 30, 2024
4e0f848
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r May 30, 2024
9fa1401
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 30, 2024
6d88a2d
Fix test
taglioni-r May 30, 2024
ce86c22
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA May 31, 2024
987686d
Adjust test title
taglioni-r May 31, 2024
186571d
Remove comment
taglioni-r May 31, 2024
7071c1c
Remove comment
taglioni-r May 31, 2024
a6efa11
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 31, 2024
8daa6d1
Update pnpm-lock file
taglioni-r May 31, 2024
92dcedd
Update model
taglioni-r May 31, 2024
5ba662a
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r May 31, 2024
83036a8
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r May 31, 2024
c414da6
Fix converter
taglioni-r May 31, 2024
32de84f
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r May 31, 2024
697f962
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r May 31, 2024
881aa2e
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r May 31, 2024
2f4e5f9
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r May 31, 2024
91dcb7a
Update pnpm-lock file
taglioni-r May 31, 2024
3254807
Fix
taglioni-r Jun 3, 2024
f173b35
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 3, 2024
817165f
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 3, 2024
07c786c
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 3, 2024
d1fd9ce
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 3, 2024
055d423
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 4, 2024
4a8d5cf
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 4, 2024
9ca9926
Add check
taglioni-r Jun 4, 2024
71c8bda
Merge branch 'IMN-569_auth-models-and-v1-events' of https://github.co…
taglioni-r Jun 4, 2024
dfedcf4
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 10, 2024
cb5ad32
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 10, 2024
923e06e
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 10, 2024
dcc167a
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 10, 2024
13c6fbf
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 10, 2024
368778f
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 10, 2024
f83233f
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 10, 2024
2fc60c0
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 10, 2024
7aef803
Fix
taglioni-r Jun 10, 2024
b7614d7
Revert "Fix"
taglioni-r Jun 10, 2024
c0fb1e9
Fix
taglioni-r Jun 10, 2024
6484126
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 10, 2024
a749478
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 10, 2024
99dfeb7
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 10, 2024
3d37c5b
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 10, 2024
2687f2e
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 10, 2024
f59285e
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 11, 2024
60eea4e
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 11, 2024
e1b8bbc
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 11, 2024
87b44c8
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA Jun 11, 2024
96af158
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 11, 2024
2a77ffc
Update pnpm-lock file
taglioni-r Jun 11, 2024
774e5a7
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 11, 2024
e32eedc
Adjust query
taglioni-r Jun 11, 2024
f077fa0
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 11, 2024
5ff849d
Refactor
taglioni-r Jun 11, 2024
6165219
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 11, 2024
c103c73
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 11, 2024
b7c329d
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 11, 2024
4adbeb7
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 11, 2024
05392c0
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA Jun 12, 2024
067bc08
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 12, 2024
555e7ad
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 12, 2024
5a73bff
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 12, 2024
52dcbac
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 12, 2024
36174a6
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 12, 2024
fd8f1c2
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 12, 2024
fb0cb99
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 12, 2024
f17dbf9
Merge branch 'main' into IMN-539_auth-process-scaffold
taglioni-r Jun 13, 2024
b34f50f
Remove unused schemas in api spec
taglioni-r Jun 13, 2024
56f709d
Merge branch 'IMN-539_auth-process-scaffold' into IMN-569_auth-models…
taglioni-r Jun 13, 2024
b033e20
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 13, 2024
e8a201d
Remove fields from model
taglioni-r Jun 13, 2024
0d9f76d
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 13, 2024
59d873b
Fix
taglioni-r Jun 13, 2024
a7d1dc0
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 13, 2024
01bb1e0
Fix model
taglioni-r Jun 13, 2024
e0b6321
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA Jun 13, 2024
ea05bea
Fix
taglioni-r Jun 13, 2024
c2fa6e2
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 13, 2024
ea73fc1
Fix
taglioni-r Jun 13, 2024
56b9f05
Merge branch 'IMN-570_notifier-seeder-authorization' of https://githu…
taglioni-r Jun 13, 2024
3980dc0
Fix
taglioni-r Jun 13, 2024
b6ca891
Revert "Fix"
taglioni-r Jun 13, 2024
e6f0664
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 13, 2024
17f5df2
Update userId
taglioni-r Jun 13, 2024
32717a8
Remove eslint-disable
taglioni-r Jun 13, 2024
e20091d
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA Jun 14, 2024
d6f1b41
removed unused eslint-disable
AsterITA Jun 14, 2024
4bd4727
Fix lint
taglioni-r Jun 14, 2024
09829bb
Add comment
taglioni-r Jun 14, 2024
1d075b2
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 14, 2024
1cf60b4
Merge branch 'main' into IMN-569_auth-models-and-v1-events
taglioni-r Jun 17, 2024
adbcf2f
Fix test util
taglioni-r Jun 17, 2024
ccbf748
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 17, 2024
78ea963
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 17, 2024
53b9232
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 17, 2024
f39d0d1
Merge branch 'main' into IMN-569_auth-models-and-v1-events
taglioni-r Jun 17, 2024
b5dbc12
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 17, 2024
b4c04e0
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 17, 2024
916c7d7
Remove comment
taglioni-r Jun 17, 2024
a5496bf
Merge branch 'IMN-569_auth-models-and-v1-events' into IMN-577_add-aut…
taglioni-r Jun 17, 2024
269f5f5
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 17, 2024
b493773
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 17, 2024
1b302e7
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 17, 2024
8f02d89
Renaming
taglioni-r Jun 17, 2024
3f25e17
Merge branch 'IMN-559_scaffold-key-readmodel-writer' of https://githu…
taglioni-r Jun 17, 2024
38b7c72
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 17, 2024
4422777
Merge branch 'main' into IMN-577_add-authorization-mocks
taglioni-r Jun 17, 2024
2c9fae0
Fix
taglioni-r Jun 17, 2024
615da6d
Renaming
taglioni-r Jun 17, 2024
8808d06
Merge branch 'main' into IMN-577_add-authorization-mocks
taglioni-r Jun 17, 2024
42a0f33
Merge branch 'main' into IMN-577_add-authorization-mocks
taglioni-r Jun 17, 2024
2e45223
Merge branch 'main' into IMN-577_add-authorization-mocks
taglioni-r Jun 17, 2024
25243f7
Merge branch 'IMN-577_add-authorization-mocks' into IMN-561_auth-v2-e…
taglioni-r Jun 17, 2024
e3919c6
Merge branch 'IMN-561_auth-v2-events' into IMN-570_notifier-seeder-au…
taglioni-r Jun 17, 2024
8351db4
Merge branch 'IMN-570_notifier-seeder-authorization' into IMN-559_sca…
taglioni-r Jun 17, 2024
77ac11c
Merge branch 'IMN-559_scaffold-key-readmodel-writer' into IMN-560_sca…
taglioni-r Jun 17, 2024
2f0f194
Merge branch 'IMN-560_scaffold-client-readmodel-writer' into IMN-563_…
AsterITA Jun 17, 2024
af46f7e
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 18, 2024
d78e231
fix addOneClient
AsterITA Jun 18, 2024
bd30acc
removed test scaffold
AsterITA Jun 18, 2024
0fded3c
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 18, 2024
c8190b2
added no floating promises
AsterITA Jun 18, 2024
4f830ef
fixed describe import
AsterITA Jun 18, 2024
61b1e62
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 18, 2024
b0a4774
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 19, 2024
3ce7e83
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 20, 2024
7116af1
Merge branch 'main' into IMN-563_v2_client_readmodel_writer
AsterITA Jun 21, 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
9 changes: 7 additions & 2 deletions packages/authorization-updater/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import {
writeInReadmodel,
} from "pagopa-interop-commons-test";
import { inject, afterEach } from "vitest";
import { Client, EService, toReadModelEService } from "pagopa-interop-models";
import {
Client,
EService,
toReadModelClient,
toReadModelEService,
} from "pagopa-interop-models";
import { readModelServiceBuilder } from "../src/readModelService.js";

export const { cleanup, readModelRepository } = setupTestContainersVitest(
Expand All @@ -22,5 +27,5 @@ export const addOneEService = async (eservice: EService): Promise<void> => {
};

export const addOneClient = async (client: Client): Promise<void> => {
await writeInReadmodel(client, clients);
await writeInReadmodel(toReadModelClient(client), clients);
};
39 changes: 34 additions & 5 deletions packages/client-readmodel-writer/src/clientConsumerServiceV2.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,51 @@
import { ClientCollection } from "pagopa-interop-commons";
import { AuthorizationEventEnvelopeV2 } from "pagopa-interop-models";
import {
AuthorizationEventEnvelopeV2,
fromClientV2,
toReadModelClient,
} from "pagopa-interop-models";
import { match } from "ts-pattern";

export async function handleMessageV2(
message: AuthorizationEventEnvelopeV2,
_clients: ClientCollection
clients: ClientCollection
): Promise<void> {
match(message)
const client = message.data.client;

await match(message)
.with(
{ type: "ClientAdded" },
{ type: "ClientDeleted" },
{ type: "ClientKeyAdded" },
{ type: "ClientKeyDeleted" },
{ type: "ClientUserAdded" },
{ type: "ClientUserDeleted" },
{ type: "ClientPurposeAdded" },
{ type: "ClientPurposeRemoved" },
() => Promise.resolve
async (message) => {
await clients.updateOne(
{
"data.id": message.stream_id,
"metadata.version": { $lt: message.version },
},
{
$set: {
data: client
? toReadModelClient(fromClientV2(client))
: undefined,
metadata: {
version: message.version,
},
},
},
{ upsert: true }
);
}
)
.with({ type: "ClientDeleted" }, async (message) => {
await clients.deleteOne({
"data.id": message.stream_id,
"metadata.version": { $lt: message.version },
});
})
.exhaustive();
}

This file was deleted.

253 changes: 253 additions & 0 deletions packages/client-readmodel-writer/test/consumerServiceV2.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
import {
getMockClient,
getMockKey,
writeInReadmodel,
} from "pagopa-interop-commons-test/index.js";
import {
AuthorizationEventEnvelopeV2,
Client,
ClientAddedV2,
ClientKeyAddedV2,
ClientKeyDeletedV2,
ClientPurposeAddedV2,
ClientPurposeRemovedV2,
ClientUserAddedV2,
ClientUserDeletedV2,
Key,
PurposeId,
UserId,
generateId,
toClientV2,
toReadModelClient,
} from "pagopa-interop-models";
import { describe, expect, it } from "vitest";
import { handleMessageV2 } from "../src/clientConsumerServiceV2.js";
import { clients } from "./utils.js";

describe("Events V2", async () => {
const mockClient = getMockClient();
const mockMessage: AuthorizationEventEnvelopeV2 = {
event_version: 2,
stream_id: mockClient.id,
version: 1,
sequence_num: 1,
log_date: new Date(),
type: "ClientAdded",
data: {},
};

it("ClientAdded", async () => {
const payload: ClientAddedV2 = {
client: toClientV2(mockClient),
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientAdded",
data: payload,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": mockClient.id,
});

expect(retrievedClient?.data).toEqual(toReadModelClient(mockClient));

expect(retrievedClient?.metadata).toEqual({
version: 1,
});
});

it("ClientKeyAdded", async () => {
await writeInReadmodel(toReadModelClient(mockClient), clients, 1);

const key: Key = getMockKey();
const updatedClient: Client = {
...mockClient,
keys: [key],
};
const payload: ClientKeyAddedV2 = {
client: toClientV2(updatedClient),
kid: key.kid,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientKeyAdded",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": mockClient.id,
});

expect(retrievedClient?.data).toEqual(toReadModelClient(updatedClient));
expect(retrievedClient?.metadata).toEqual({
version: 2,
});
});

it("ClientKeyDeleted", async () => {
const key: Key = getMockKey();
const client: Client = {
...mockClient,
keys: [key],
};
await writeInReadmodel(toReadModelClient(client), clients, 1);

const updatedClient = mockClient;

const payload: ClientKeyDeletedV2 = {
client: toClientV2(updatedClient),
kid: key.kid,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientKeyDeleted",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": client.id,
});

expect(retrievedClient?.data.keys).toHaveLength(0);
});

it("ClientUserAdded", async () => {
await writeInReadmodel(toReadModelClient(mockClient), clients, 1);

const userId: UserId = generateId<UserId>();
const updatedClient: Client = {
...mockClient,
users: [userId],
};

const payload: ClientUserAddedV2 = {
client: toClientV2(updatedClient),
userId,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientUserAdded",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": updatedClient.id,
});

expect(retrievedClient?.data).toEqual(toReadModelClient(updatedClient));
expect(retrievedClient?.metadata).toEqual({
version: 2,
});
});

it("ClientUserDeleted", async () => {
const userId: UserId = generateId<UserId>();
const client: Client = {
...mockClient,
users: [userId],
};
await writeInReadmodel(toReadModelClient(client), clients, 1);

const updatedClient = mockClient;

const payload: ClientUserDeletedV2 = {
client: toClientV2(updatedClient),
userId,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientUserDeleted",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": client.id,
});

expect(retrievedClient?.data.users).toHaveLength(0);
});

it("ClientPurposeAdded", async () => {
await writeInReadmodel(toReadModelClient(mockClient), clients, 1);

const purposeId: PurposeId = generateId<PurposeId>();
const updatedClient: Client = {
...mockClient,
purposes: [purposeId],
};

const payload: ClientPurposeAddedV2 = {
client: toClientV2(updatedClient),
purposeId,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientPurposeAdded",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": updatedClient.id,
});

expect(retrievedClient?.data).toEqual(toReadModelClient(updatedClient));
expect(retrievedClient?.metadata).toEqual({
version: 2,
});
});

it("ClientPurposeRemoved", async () => {
const purposeId: PurposeId = generateId<PurposeId>();
const client: Client = {
...mockClient,
purposes: [purposeId],
};
await writeInReadmodel(toReadModelClient(client), clients, 1);

const updatedClient = mockClient;

const payload: ClientPurposeRemovedV2 = {
client: toClientV2(updatedClient),
purposeId,
};

const message: AuthorizationEventEnvelopeV2 = {
...mockMessage,
type: "ClientPurposeRemoved",
data: payload,
version: 2,
};

await handleMessageV2(message, clients);

const retrievedClient = await clients.findOne({
"data.id": client.id,
});

expect(retrievedClient?.data.purposes).toHaveLength(0);
});
});
8 changes: 4 additions & 4 deletions packages/commons/src/repositories/ReadModelRepository.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
AgreementReadModel,
AttributeReadmodel,
Client,
ClientReadModel,
EServiceReadModel,
Key,
KeyReadModel,
PurposeReadModel,
Tenant,
genericInternalError,
Expand Down Expand Up @@ -36,8 +36,8 @@ export type AgreementCollection = GenericCollection<AgreementReadModel>;
export type TenantCollection = GenericCollection<Tenant>;
export type AttributeCollection = GenericCollection<AttributeReadmodel>;
export type PurposeCollection = GenericCollection<PurposeReadModel>;
export type ClientCollection = GenericCollection<Client>;
export type KeyCollection = GenericCollection<Key>;
export type ClientCollection = GenericCollection<ClientReadModel>;
export type KeyCollection = GenericCollection<KeyReadModel>;

export type Collections =
| EServiceCollection
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {
ClientReadModel,
KeyReadModel,
} from "../read-models/authorizationReadModel.js";
import { Client } from "./client.js";
import { Key } from "./key.js";

export const toReadModelKey = (key: Key): KeyReadModel => ({
...key,
createdAt: key.createdAt.toISOString(),
});

export const toReadModelClient = (client: Client): ClientReadModel => ({
...client,
createdAt: client.createdAt.toISOString(),
keys: client.keys.map(toReadModelKey),
});
Loading
Loading