@lilaquadrat/interfaces 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/cjs/KeycloakAdminOptions.d.ts +26 -0
  3. package/lib/cjs/KeycloakClientRepresentation.d.ts +30 -0
  4. package/lib/cjs/KeycloakClientUrls.d.ts +19 -0
  5. package/lib/cjs/KeycloakFederatedIdentity.d.ts +8 -0
  6. package/lib/cjs/KeycloakRealm.d.ts +5 -0
  7. package/lib/cjs/KeycloakUser.d.ts +10 -0
  8. package/lib/cjs/KeycloakUserRepresentation.d.ts +13 -0
  9. package/lib/cjs/index.d.ts +7 -0
  10. package/lib/esm/KeycloakAdminOptions.d.ts +26 -0
  11. package/lib/esm/KeycloakAdminOptions.js +2 -0
  12. package/lib/esm/KeycloakAdminOptions.js.map +1 -0
  13. package/lib/esm/KeycloakClientRepresentation.d.ts +30 -0
  14. package/lib/esm/KeycloakClientRepresentation.js +2 -0
  15. package/lib/esm/KeycloakClientRepresentation.js.map +1 -0
  16. package/lib/esm/KeycloakClientUrls.d.ts +19 -0
  17. package/lib/esm/KeycloakClientUrls.js +2 -0
  18. package/lib/esm/KeycloakClientUrls.js.map +1 -0
  19. package/lib/esm/KeycloakFederatedIdentity.d.ts +8 -0
  20. package/lib/esm/KeycloakFederatedIdentity.js +2 -0
  21. package/lib/esm/KeycloakFederatedIdentity.js.map +1 -0
  22. package/lib/esm/KeycloakRealm.d.ts +5 -0
  23. package/lib/esm/KeycloakRealm.js +2 -0
  24. package/lib/esm/KeycloakRealm.js.map +1 -0
  25. package/lib/esm/KeycloakUser.d.ts +10 -0
  26. package/lib/esm/KeycloakUser.js +2 -0
  27. package/lib/esm/KeycloakUser.js.map +1 -0
  28. package/lib/esm/KeycloakUserRepresentation.d.ts +13 -0
  29. package/lib/esm/KeycloakUserRepresentation.js +2 -0
  30. package/lib/esm/KeycloakUserRepresentation.js.map +1 -0
  31. package/lib/esm/index.d.ts +7 -0
  32. package/package.json +1 -1
  33. package/src/KeycloakAdminOptions.ts +33 -0
  34. package/src/KeycloakClientRepresentation.ts +47 -0
  35. package/src/KeycloakClientUrls.ts +23 -0
  36. package/src/KeycloakFederatedIdentity.ts +12 -0
  37. package/src/KeycloakRealm.ts +5 -0
  38. package/src/KeycloakUser.ts +16 -0
  39. package/src/KeycloakUserRepresentation.ts +22 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.2.0](https://github.com/lilaquadrat/interfaces/compare/v2.1.0...v2.2.0) (2026-11-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * **keycloak:** add admin client, client urls and realm types ([d393285](https://github.com/lilaquadrat/interfaces/commit/d393285b5e2913c4560e39160c1c23594999d00f))
11
+
5
12
  ## [2.1.0](https://github.com/lilaquadrat/interfaces/compare/v2.0.0...v2.1.0) (2026-11-11)
6
13
 
7
14
 
@@ -0,0 +1,26 @@
1
+ /**
2
+ * credentials and realm of a keycloak admin client. the admin api is realm scoped and the
3
+ * credentials belong to a service account inside that realm, so one instance serves one realm.
4
+ */
5
+ export interface KeycloakAdminOptions {
6
+ /**
7
+ * issuer of the realm the client administers, e.g. `https://auth.lilaquadrat.dev/realms/studio`.
8
+ */
9
+ issuer: string;
10
+ /**
11
+ * confidential client with a service account in the target realm.
12
+ */
13
+ clientId?: string;
14
+ clientSecret?: string;
15
+ /**
16
+ * path to a projected kubernetes service account token used as the client assertion for
17
+ * federated client authentication. re-read on every authentication because the kubelet
18
+ * rotates the file.
19
+ */
20
+ tokenFile?: string;
21
+ /**
22
+ * master realm password grant. acceptable for a local rehearsal only.
23
+ */
24
+ adminUser?: string;
25
+ adminPassword?: string;
26
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * a keycloak client as the admin api reads and writes it.
3
+ */
4
+ export interface KeycloakClientRepresentation {
5
+ /**
6
+ * internal keycloak id. assigned by keycloak, absent on create.
7
+ */
8
+ id?: string;
9
+ /**
10
+ * the client id the browser logs in with, e.g. `company-project`.
11
+ */
12
+ clientId?: string;
13
+ name?: string;
14
+ description?: string;
15
+ enabled?: boolean;
16
+ /**
17
+ * public clients have no secret and are used from the browser.
18
+ */
19
+ publicClient?: boolean;
20
+ standardFlowEnabled?: boolean;
21
+ implicitFlowEnabled?: boolean;
22
+ directAccessGrantsEnabled?: boolean;
23
+ serviceAccountsEnabled?: boolean;
24
+ protocol?: string;
25
+ rootUrl?: string;
26
+ baseUrl?: string;
27
+ redirectUris?: string[];
28
+ webOrigins?: string[];
29
+ attributes?: Record<string, string>;
30
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * the urls a keycloak client allows. every field is optional: a field that is passed is
3
+ * replaced, an omitted field keeps its current value.
4
+ */
5
+ export interface KeycloakClientUrls {
6
+ /**
7
+ * valid redirect uris the browser may return to after login.
8
+ */
9
+ redirectUris?: string[];
10
+ /**
11
+ * origins allowed to call the token endpoint from a browser.
12
+ */
13
+ webOrigins?: string[];
14
+ /**
15
+ * uris the browser may return to after logout. stored in the client attribute
16
+ * `post.logout.redirect.uris`, not in an array of its own.
17
+ */
18
+ logoutUris?: string[];
19
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * a link between a keycloak user and an account at an identity provider.
3
+ */
4
+ export interface KeycloakFederatedIdentity {
5
+ identityProvider: string;
6
+ userId: string;
7
+ userName: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * the keycloak realms studio writes to. staff and machine clients live in `studio`, end users of
3
+ * customer projects in `customers`.
4
+ */
5
+ export type KeycloakRealm = 'studio' | 'customers';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * a user as the keycloak admin api returns it from a lookup or a list.
3
+ */
4
+ export interface KeycloakUser {
5
+ id: string;
6
+ username?: string;
7
+ email?: string;
8
+ enabled?: boolean;
9
+ emailVerified?: boolean;
10
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * the writable fields of a keycloak user.
3
+ */
4
+ export interface KeycloakUserRepresentation {
5
+ username?: string;
6
+ email?: string;
7
+ emailVerified?: boolean;
8
+ enabled?: boolean;
9
+ firstName?: string;
10
+ lastName?: string;
11
+ requiredActions?: string[];
12
+ attributes?: Record<string, string[]>;
13
+ }
@@ -150,6 +150,13 @@ export * from './InvoiceReferences';
150
150
  export * from './InvoiceTaxBreakdown';
151
151
  export * from './InvoiceTotals';
152
152
  export * from './InvoiceWithXml';
153
+ export * from './KeycloakAdminOptions';
154
+ export * from './KeycloakClientRepresentation';
155
+ export * from './KeycloakClientUrls';
156
+ export * from './KeycloakFederatedIdentity';
157
+ export * from './KeycloakRealm';
158
+ export * from './KeycloakUser';
159
+ export * from './KeycloakUserRepresentation';
153
160
  export * from './License';
154
161
  export * from './LimiterBreach';
155
162
  export * from './LimiterPluginOptions';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * credentials and realm of a keycloak admin client. the admin api is realm scoped and the
3
+ * credentials belong to a service account inside that realm, so one instance serves one realm.
4
+ */
5
+ export interface KeycloakAdminOptions {
6
+ /**
7
+ * issuer of the realm the client administers, e.g. `https://auth.lilaquadrat.dev/realms/studio`.
8
+ */
9
+ issuer: string;
10
+ /**
11
+ * confidential client with a service account in the target realm.
12
+ */
13
+ clientId?: string;
14
+ clientSecret?: string;
15
+ /**
16
+ * path to a projected kubernetes service account token used as the client assertion for
17
+ * federated client authentication. re-read on every authentication because the kubelet
18
+ * rotates the file.
19
+ */
20
+ tokenFile?: string;
21
+ /**
22
+ * master realm password grant. acceptable for a local rehearsal only.
23
+ */
24
+ adminUser?: string;
25
+ adminPassword?: string;
26
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakAdminOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakAdminOptions.js","sourceRoot":"","sources":["../../src/KeycloakAdminOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * a keycloak client as the admin api reads and writes it.
3
+ */
4
+ export interface KeycloakClientRepresentation {
5
+ /**
6
+ * internal keycloak id. assigned by keycloak, absent on create.
7
+ */
8
+ id?: string;
9
+ /**
10
+ * the client id the browser logs in with, e.g. `company-project`.
11
+ */
12
+ clientId?: string;
13
+ name?: string;
14
+ description?: string;
15
+ enabled?: boolean;
16
+ /**
17
+ * public clients have no secret and are used from the browser.
18
+ */
19
+ publicClient?: boolean;
20
+ standardFlowEnabled?: boolean;
21
+ implicitFlowEnabled?: boolean;
22
+ directAccessGrantsEnabled?: boolean;
23
+ serviceAccountsEnabled?: boolean;
24
+ protocol?: string;
25
+ rootUrl?: string;
26
+ baseUrl?: string;
27
+ redirectUris?: string[];
28
+ webOrigins?: string[];
29
+ attributes?: Record<string, string>;
30
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakClientRepresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakClientRepresentation.js","sourceRoot":"","sources":["../../src/KeycloakClientRepresentation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * the urls a keycloak client allows. every field is optional: a field that is passed is
3
+ * replaced, an omitted field keeps its current value.
4
+ */
5
+ export interface KeycloakClientUrls {
6
+ /**
7
+ * valid redirect uris the browser may return to after login.
8
+ */
9
+ redirectUris?: string[];
10
+ /**
11
+ * origins allowed to call the token endpoint from a browser.
12
+ */
13
+ webOrigins?: string[];
14
+ /**
15
+ * uris the browser may return to after logout. stored in the client attribute
16
+ * `post.logout.redirect.uris`, not in an array of its own.
17
+ */
18
+ logoutUris?: string[];
19
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakClientUrls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakClientUrls.js","sourceRoot":"","sources":["../../src/KeycloakClientUrls.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * a link between a keycloak user and an account at an identity provider.
3
+ */
4
+ export interface KeycloakFederatedIdentity {
5
+ identityProvider: string;
6
+ userId: string;
7
+ userName: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakFederatedIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakFederatedIdentity.js","sourceRoot":"","sources":["../../src/KeycloakFederatedIdentity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * the keycloak realms studio writes to. staff and machine clients live in `studio`, end users of
3
+ * customer projects in `customers`.
4
+ */
5
+ export type KeycloakRealm = 'studio' | 'customers';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakRealm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakRealm.js","sourceRoot":"","sources":["../../src/KeycloakRealm.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * a user as the keycloak admin api returns it from a lookup or a list.
3
+ */
4
+ export interface KeycloakUser {
5
+ id: string;
6
+ username?: string;
7
+ email?: string;
8
+ enabled?: boolean;
9
+ emailVerified?: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakUser.js","sourceRoot":"","sources":["../../src/KeycloakUser.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * the writable fields of a keycloak user.
3
+ */
4
+ export interface KeycloakUserRepresentation {
5
+ username?: string;
6
+ email?: string;
7
+ emailVerified?: boolean;
8
+ enabled?: boolean;
9
+ firstName?: string;
10
+ lastName?: string;
11
+ requiredActions?: string[];
12
+ attributes?: Record<string, string[]>;
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=KeycloakUserRepresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeycloakUserRepresentation.js","sourceRoot":"","sources":["../../src/KeycloakUserRepresentation.ts"],"names":[],"mappings":""}
@@ -150,6 +150,13 @@ export * from './InvoiceReferences';
150
150
  export * from './InvoiceTaxBreakdown';
151
151
  export * from './InvoiceTotals';
152
152
  export * from './InvoiceWithXml';
153
+ export * from './KeycloakAdminOptions';
154
+ export * from './KeycloakClientRepresentation';
155
+ export * from './KeycloakClientUrls';
156
+ export * from './KeycloakFederatedIdentity';
157
+ export * from './KeycloakRealm';
158
+ export * from './KeycloakUser';
159
+ export * from './KeycloakUserRepresentation';
153
160
  export * from './License';
154
161
  export * from './LimiterBreach';
155
162
  export * from './LimiterPluginOptions';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
@@ -0,0 +1,33 @@
1
+ /**
2
+ * credentials and realm of a keycloak admin client. the admin api is realm scoped and the
3
+ * credentials belong to a service account inside that realm, so one instance serves one realm.
4
+ */
5
+ export interface KeycloakAdminOptions {
6
+
7
+ /**
8
+ * issuer of the realm the client administers, e.g. `https://auth.lilaquadrat.dev/realms/studio`.
9
+ */
10
+ issuer: string
11
+
12
+ /**
13
+ * confidential client with a service account in the target realm.
14
+ */
15
+ clientId?: string
16
+
17
+ clientSecret?: string
18
+
19
+ /**
20
+ * path to a projected kubernetes service account token used as the client assertion for
21
+ * federated client authentication. re-read on every authentication because the kubelet
22
+ * rotates the file.
23
+ */
24
+ tokenFile?: string
25
+
26
+ /**
27
+ * master realm password grant. acceptable for a local rehearsal only.
28
+ */
29
+ adminUser?: string
30
+
31
+ adminPassword?: string
32
+
33
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * a keycloak client as the admin api reads and writes it.
3
+ */
4
+ export interface KeycloakClientRepresentation {
5
+
6
+ /**
7
+ * internal keycloak id. assigned by keycloak, absent on create.
8
+ */
9
+ id?: string
10
+
11
+ /**
12
+ * the client id the browser logs in with, e.g. `company-project`.
13
+ */
14
+ clientId?: string
15
+
16
+ name?: string
17
+
18
+ description?: string
19
+
20
+ enabled?: boolean
21
+
22
+ /**
23
+ * public clients have no secret and are used from the browser.
24
+ */
25
+ publicClient?: boolean
26
+
27
+ standardFlowEnabled?: boolean
28
+
29
+ implicitFlowEnabled?: boolean
30
+
31
+ directAccessGrantsEnabled?: boolean
32
+
33
+ serviceAccountsEnabled?: boolean
34
+
35
+ protocol?: string
36
+
37
+ rootUrl?: string
38
+
39
+ baseUrl?: string
40
+
41
+ redirectUris?: string[]
42
+
43
+ webOrigins?: string[]
44
+
45
+ attributes?: Record<string, string>
46
+
47
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * the urls a keycloak client allows. every field is optional: a field that is passed is
3
+ * replaced, an omitted field keeps its current value.
4
+ */
5
+ export interface KeycloakClientUrls {
6
+
7
+ /**
8
+ * valid redirect uris the browser may return to after login.
9
+ */
10
+ redirectUris?: string[]
11
+
12
+ /**
13
+ * origins allowed to call the token endpoint from a browser.
14
+ */
15
+ webOrigins?: string[]
16
+
17
+ /**
18
+ * uris the browser may return to after logout. stored in the client attribute
19
+ * `post.logout.redirect.uris`, not in an array of its own.
20
+ */
21
+ logoutUris?: string[]
22
+
23
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * a link between a keycloak user and an account at an identity provider.
3
+ */
4
+ export interface KeycloakFederatedIdentity {
5
+
6
+ identityProvider: string
7
+
8
+ userId: string
9
+
10
+ userName: string
11
+
12
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * the keycloak realms studio writes to. staff and machine clients live in `studio`, end users of
3
+ * customer projects in `customers`.
4
+ */
5
+ export type KeycloakRealm = 'studio' | 'customers';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * a user as the keycloak admin api returns it from a lookup or a list.
3
+ */
4
+ export interface KeycloakUser {
5
+
6
+ id: string
7
+
8
+ username?: string
9
+
10
+ email?: string
11
+
12
+ enabled?: boolean
13
+
14
+ emailVerified?: boolean
15
+
16
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * the writable fields of a keycloak user.
3
+ */
4
+ export interface KeycloakUserRepresentation {
5
+
6
+ username?: string
7
+
8
+ email?: string
9
+
10
+ emailVerified?: boolean
11
+
12
+ enabled?: boolean
13
+
14
+ firstName?: string
15
+
16
+ lastName?: string
17
+
18
+ requiredActions?: string[]
19
+
20
+ attributes?: Record<string, string[]>
21
+
22
+ }