diff --git a/src/defs/componentExportRepresentation.ts b/src/defs/componentExportRepresentation.ts new file mode 100644 index 00000000..9c2d1b4a --- /dev/null +++ b/src/defs/componentExportRepresentation.ts @@ -0,0 +1,12 @@ +/** + * https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_componentexportrepresentation + */ + +export default interface ComponentExportRepresentation { + id?: string; + name?: string; + providerId?: string; + subType?: string; + subComponents?: {[index: string]: ComponentExportRepresentation}; + config?: {[index: string]: string}; +} diff --git a/src/defs/realmRepresentation.ts b/src/defs/realmRepresentation.ts index a4615339..0fe6a7ab 100644 --- a/src/defs/realmRepresentation.ts +++ b/src/defs/realmRepresentation.ts @@ -1,5 +1,5 @@ import ClientRepresentation from './clientRepresentation'; -import MultivaluedHashMap from './multivaluedHashMap'; +import ComponentExportRepresentation from './componentExportRepresentation'; import UserRepresentation from './userRepresentation'; import GroupRepresentation from './groupRepresentation'; import IdentityProviderRepresentation from './identityProviderRepresentation'; @@ -35,7 +35,7 @@ export default interface RealmRepresentation { // ClientScopeRepresentation clientScopes?: any[]; clients?: ClientRepresentation[]; - components?: MultivaluedHashMap; + components?: {[index: string]: ComponentExportRepresentation}; defaultDefaultClientScopes?: string[]; defaultGroups?: string[]; defaultLocale?: string; diff --git a/src/resources/realms.ts b/src/resources/realms.ts index 67c47df3..c01fadf6 100644 --- a/src/resources/realms.ts +++ b/src/resources/realms.ts @@ -82,7 +82,7 @@ export class Realms extends Resource { public removeSession = this.makeRequest<{realm: string, sessionId: string}, void>({ method: 'DELETE', path: '/{realm}/sessions/{session}', - urlParamKeys: ['realm','session'], + urlParamKeys: ['realm', 'session'], catchNotFound: true, });