ClientRepresentation.d.ts

12 views
Skip to first unread message

Francis Augusto Medeiros

unread,
Jul 2, 2025, 11:02:44 AMJul 2
to keyclo...@googlegroups.com
Hi,

I am about to submit a PR so that the maintainers can assess it, but there’s only one last bit that is a bit confusing to me. 

Is the ClientRepresentation.d.ts of the Keycloak-Admin-Client dynamically generated after building?

I added a Boolean to my ClientModel and other classes and I guess it ended there, but not a few Map’s and Set’s. So I’m not sure how to get things to get there automatically. Or should I hard code?


__
Francis Augusto Medeiros-Logeay
fra...@francisaugusto.com
Mobile: +47 45 17 14 91
Oslo, Norway
Sent from a mobile device / Enviado a partir de dispositivo móvel

Jon Koops

unread,
Jul 3, 2025, 9:48:33 AMJul 3
to Francis Augusto Medeiros, keyclo...@googlegroups.com
Yes, it is compiled, you can find the source file in js/libs/keycloak-admin-client/src/defs/clientRepresentation.ts. However, if you added fields to this representation that are exclusive to your Keycloak instance, we will not accept it as a contribution. Only fields that are part of every Keycloak installation should be in the type definition, if you have custom types, you should cast it to that instead.

--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/keycloak-dev/D7B7CF70-A640-4000-8737-899E67783051%40gmail.com.

Francis Augusto Medeiros

unread,
Jul 3, 2025, 11:23:03 AMJul 3
to Jon Koops, keyclo...@googlegroups.com
Actually in my PR I extend the ClientRepresentation a bit, so I’ll add two new fields there. 

__
Oslo, Norway
Sent from a mobile device / Enviado a partir de dispositivo móvel

On 3 Jul 2025, at 15:48, Jon Koops <jko...@redhat.com> wrote:



Francis Augusto Medeiros-Logeay

unread,
Jul 3, 2025, 11:32:56 AMJul 3
to Jon Koops, keyclo...@googlegroups.com
What I was wondering was if ClientRepresentation.d.ts would automatically incorporate new fields if they are added to the Java code (ClientModel, ModelToRepresentation, RepresentationToModel, etc.). Or if, by extending the model in Java, the fields needed to be manually added to the ClientRepresentation.d.ts.

Best,
Francis

Jon Koops

unread,
Jul 3, 2025, 12:15:16 PMJul 3
to Francis Augusto Medeiros-Logeay, keyclo...@googlegroups.com
No, these fields are not added automatically. If you want to add your fields, you will have to extend the type into your own custom type that includes these fields and cast to it.
Reply all
Reply to author
Forward
0 new messages