import { KeycloakAdminClient } from '../client'; import ClientRepresentation from '../defs/clientRepresentation'; import ClientScopeRepresentation from '../defs/clientScopeRepresentation'; import CredentialRepresentation from '../defs/credentialRepresentation'; import MappingsRepresentation from '../defs/mappingsRepresentation'; import PolicyRepresentation from '../defs/policyRepresentation'; import ResourceRepresentation from '../defs/resourceRepresentation'; import ProtocolMapperRepresentation from '../defs/protocolMapperRepresentation'; import RoleRepresentation from '../defs/roleRepresentation'; import UserRepresentation from '../defs/userRepresentation'; import UserSessionRepresentation from '../defs/userSessionRepresentation'; import ResourceEvaluation from '../defs/resourceEvaluation'; import GlobalRequestResult from '../defs/globalRequestResult'; import Resource from './resource'; import CertificateRepresentation from '../defs/certificateRepresentation'; import KeyStoreConfig from '../defs/keystoreConfig'; import ResourceServerRepresentation from '../defs/resourceServerRepresentation'; export interface ClientQuery { first?: number; max?: number; clientId?: string; viewableOnly?: boolean; search?: boolean; } export interface PolicyQuery { id?: string; name?: string; type?: string; resource?: string; scope?: string; permission?: string; owner?: string; fields?: string; first?: number; max?: number; } export declare class Clients extends Resource<{ realm?: string; }> { find: (payload?: (ClientQuery & { realm?: string | undefined; }) | undefined) => Promise; create: (payload?: (ClientRepresentation & { realm?: string | undefined; }) | undefined) => Promise<{ id: string; }>; findOne: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; update: (query: { id: string; } & { realm?: string | undefined; }, payload: ClientRepresentation) => Promise; del: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; createRole: (payload?: (RoleRepresentation & { realm?: string | undefined; }) | undefined) => Promise<{ roleName: string; }>; listRoles: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; findRole: (payload?: ({ id: string; roleName: string; } & { realm?: string | undefined; }) | undefined) => Promise; updateRole: (query: { id: string; roleName: string; } & { realm?: string | undefined; }, payload: RoleRepresentation) => Promise; delRole: (payload?: ({ id: string; roleName: string; } & { realm?: string | undefined; }) | undefined) => Promise; findUsersWithRole: (payload?: ({ id: string; roleName: string; first?: number | undefined; max?: number | undefined; } & { realm?: string | undefined; }) | undefined) => Promise; getServiceAccountUser: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; generateNewClientSecret: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; generateRegistrationAccessToken: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ registrationAccessToken: string; }>; getClientSecret: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; listDefaultClientScopes: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; addDefaultClientScope: (payload?: ({ id: string; clientScopeId: string; } & { realm?: string | undefined; }) | undefined) => Promise; delDefaultClientScope: (payload?: ({ id: string; clientScopeId: string; } & { realm?: string | undefined; }) | undefined) => Promise; listOptionalClientScopes: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; addOptionalClientScope: (payload?: ({ id: string; clientScopeId: string; } & { realm?: string | undefined; }) | undefined) => Promise; delOptionalClientScope: (payload?: ({ id: string; clientScopeId: string; } & { realm?: string | undefined; }) | undefined) => Promise; addMultipleProtocolMappers: (query: { id: string; } & { realm?: string | undefined; }, payload: ProtocolMapperRepresentation[]) => Promise; addProtocolMapper: (query: { id: string; } & { realm?: string | undefined; }, payload: ProtocolMapperRepresentation) => Promise; listProtocolMappers: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; findProtocolMapperById: (payload?: ({ id: string; mapperId: string; } & { realm?: string | undefined; }) | undefined) => Promise; findProtocolMappersByProtocol: (payload?: ({ id: string; protocol: string; } & { realm?: string | undefined; }) | undefined) => Promise; updateProtocolMapper: (query: { id: string; mapperId: string; } & { realm?: string | undefined; }, payload: ProtocolMapperRepresentation) => Promise; delProtocolMapper: (payload?: ({ id: string; mapperId: string; } & { realm?: string | undefined; }) | undefined) => Promise; listScopeMappings: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; addClientScopeMappings: (query: { id: string; client: string; } & { realm?: string | undefined; }, payload: RoleRepresentation[]) => Promise; listClientScopeMappings: (payload?: ({ id: string; client: string; } & { realm?: string | undefined; }) | undefined) => Promise; listAvailableClientScopeMappings: (payload?: ({ id: string; client: string; } & { realm?: string | undefined; }) | undefined) => Promise; listCompositeClientScopeMappings: (payload?: ({ id: string; client: string; } & { realm?: string | undefined; }) | undefined) => Promise; delClientScopeMappings: (query: { id: string; client: string; } & { realm?: string | undefined; }, payload: RoleRepresentation[]) => Promise; evaluatePermission: (payload?: ({ id: string; roleContainer: string; type: 'granted' | 'not-granted'; scope: string; } & { realm?: string | undefined; }) | undefined) => Promise; evaluateListProtocolMapper: (payload?: ({ id: string; scope: string; } & { realm?: string | undefined; }) | undefined) => Promise; evaluateGenerateAccessToken: (payload?: ({ id: string; scope: string; userId: string; } & { realm?: string | undefined; }) | undefined) => Promise; addRealmScopeMappings: (query: { id: string; } & { realm?: string | undefined; }, payload: RoleRepresentation[]) => Promise; listRealmScopeMappings: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; listAvailableRealmScopeMappings: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; listCompositeRealmScopeMappings: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; delRealmScopeMappings: (query: { id: string; } & { realm?: string | undefined; }, payload: RoleRepresentation[]) => Promise; listSessions: (payload?: ({ id: string; first?: number | undefined; max?: number | undefined; } & { realm?: string | undefined; }) | undefined) => Promise; listOfflineSessions: (payload?: ({ id: string; first?: number | undefined; max?: number | undefined; } & { realm?: string | undefined; }) | undefined) => Promise; getSessionCount: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ count: number; }>; getResourceServer: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; updateResourceServer: (query: { id: string; } & { realm?: string | undefined; }, payload: ResourceServerRepresentation) => Promise; listResources: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; createResource: (query: { id: string; } & { realm?: string | undefined; }, payload: ResourceRepresentation) => Promise; getResource: (payload?: ({ id: string; resourceId: string; } & { realm?: string | undefined; }) | undefined) => Promise; updateResource: (query: { id: string; resourceId: string; } & { realm?: string | undefined; }, payload: ResourceRepresentation) => Promise; delResource: (payload?: ({ id: string; resourceId: string; } & { realm?: string | undefined; }) | undefined) => Promise; evaluateResource: (query: { id: string; } & { realm?: string | undefined; }, payload: ResourceEvaluation) => Promise; listPolicies: (payload?: (PolicyQuery & { realm?: string | undefined; }) | undefined) => Promise; findPolicyByName: (payload?: ({ id: string; name: string; } & { realm?: string | undefined; }) | undefined) => Promise; updatePolicy: (query: { id: string; type: string; policyId: string; } & { realm?: string | undefined; }, payload: PolicyRepresentation) => Promise; createPolicy: (query: { id: string; type: string; } & { realm?: string | undefined; }, payload: PolicyRepresentation) => Promise; findOnePolicy: (payload?: ({ id: string; type: string; policyId: string; } & { realm?: string | undefined; }) | undefined) => Promise; delPolicy: (payload?: ({ id: string; policyId: string; } & { realm?: string | undefined; }) | undefined) => Promise; createOrUpdatePolicy(payload: { id: string; policyName: string; policy: PolicyRepresentation; }): Promise; listAllScopes: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ id: string; name: string; }[]>; listPermissionsByResource: (payload?: ({ id: string; resourceId: string; } & { realm?: string | undefined; }) | undefined) => Promise; listScopesByResource: (payload?: ({ id: string; resourceName: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ id: string; name: string; }[]>; createAuthorizationScope: (query: { id: string; } & { realm?: string | undefined; }, payload: { name: string; displayName?: string | undefined; iconUri?: string | undefined; }) => Promise; updateAuthorizationScope: (query: { id: string; clientScopeId: string; } & { realm?: string | undefined; }, payload: { name: string; displayName?: string | undefined; iconUri?: string | undefined; }) => Promise; getScope: (query: { id: string; clientScopeId: string; } & { realm?: string | undefined; }, payload: any) => Promise; deleteAuthorizationScope: (payload?: ({ id: string; clientScopeId: string; } & { realm?: string | undefined; }) | undefined) => Promise; findPermissions: (payload?: ({ id: string; name: string; } & { realm?: string | undefined; }) | undefined) => Promise; createPermission: (query: { id: string; type: string; } & { realm?: string | undefined; }, payload: PolicyRepresentation) => Promise; updatePermission: (query: { id: string; type: string; permissionId: string; } & { realm?: string | undefined; }, payload: PolicyRepresentation) => Promise; delPermission: (payload?: ({ id: string; type: string; permissionId: string; } & { realm?: string | undefined; }) | undefined) => Promise; findOnePermission: (payload?: ({ id: string; type: string; permissionId: string; } & { realm?: string | undefined; }) | undefined) => Promise; getAssociatedScopes: (payload?: ({ id: string; permissionId: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ id: string; name: string; }[]>; getAssociatedPolicies: (payload?: ({ id: string; permissionId: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ id: string; name: string; }[]>; getAssociatedResources: (payload?: ({ id: string; permissionId: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ _id: string; name: string; }[]>; getOfflineSessionCount: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise<{ count: number; }>; getInstallationProviders: (payload?: ({ id: string; providerId: string; } & { realm?: string | undefined; }) | undefined) => Promise; pushRevocation: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; addClusterNode: (payload?: ({ id: string; node: string; } & { realm?: string | undefined; }) | undefined) => Promise; deleteClusterNode: (payload?: ({ id: string; node: string; } & { realm?: string | undefined; }) | undefined) => Promise; testNodesAvailable: (payload?: ({ id: string; } & { realm?: string | undefined; }) | undefined) => Promise; getKeyInfo: (payload?: ({ id: string; attr: string; } & { realm?: string | undefined; }) | undefined) => Promise; generateKey: (payload?: ({ id: string; attr: string; } & { realm?: string | undefined; }) | undefined) => Promise; downloadKey: (query: { id: string; attr: string; } & { realm?: string | undefined; }, payload: KeyStoreConfig) => Promise; generateAndDownloadKey: (query: { id: string; attr: string; } & { realm?: string | undefined; }, payload: KeyStoreConfig) => Promise; uploadKey: (query: { id: string; attr: string; } & { realm?: string | undefined; }, payload: any) => Promise; uploadCertificate: (query: { id: string; attr: string; } & { realm?: string | undefined; }, payload: any) => Promise; constructor(client: KeycloakAdminClient); findProtocolMapperByName(payload: { realm?: string; id: string; name: string; }): Promise; }