import { ClsService } from "nestjs-cls"; import { OAuthClientService } from "../services/oauth.client.service"; import { OAuthClientCreateDto, OAuthClientUpdateDto } from "../dtos/oauth.client.dto"; /** * OAuth Client Management Controller * * CRUD operations for OAuth clients. * All endpoints require user authentication. * * Note: JSON:API serialization will be added by OAuthClientSerialiser * once the serializers module is complete. */ export declare class OAuthManagementController { private readonly clientService; private readonly cls; constructor(clientService: OAuthClientService, cls: ClsService); /** * List User's OAuth Clients * * GET /oauth/clients */ list(): Promise<{ data: { type: string; id: string; attributes: { name: string; description: string; redirectUris: string[]; allowedScopes: string[]; allowedGrantTypes: string[]; isConfidential: boolean; isActive: boolean; accessTokenLifetime: number; refreshTokenLifetime: number; }; }[]; }>; /** * Create OAuth Client * * POST /oauth/clients * * Returns the client with client_secret (shown only once). */ create(body: OAuthClientCreateDto): Promise<{ data: { type: string; id: string; attributes: { name: string; description: string; redirectUris: string[]; allowedScopes: string[]; allowedGrantTypes: string[]; isConfidential: boolean; isActive: boolean; accessTokenLifetime: number; refreshTokenLifetime: number; clientSecret: string; }; }; }>; /** * Get OAuth Client * * GET /oauth/clients/:clientId */ get(clientId: string): Promise<{ data: { type: string; id: string; attributes: { name: string; description: string; redirectUris: string[]; allowedScopes: string[]; allowedGrantTypes: string[]; isConfidential: boolean; isActive: boolean; accessTokenLifetime: number; refreshTokenLifetime: number; }; }; }>; /** * Update OAuth Client * * PATCH /oauth/clients/:clientId */ update(clientId: string, body: OAuthClientUpdateDto): Promise<{ data: { type: string; id: string; attributes: { name: string; description: string; redirectUris: string[]; allowedScopes: string[]; allowedGrantTypes: string[]; isConfidential: boolean; isActive: boolean; accessTokenLifetime: number; refreshTokenLifetime: number; }; }; }>; /** * Delete OAuth Client * * DELETE /oauth/clients/:clientId */ delete(clientId: string): Promise; /** * Regenerate Client Secret * * POST /oauth/clients/:clientId/regenerate-secret * * Returns new clientSecret (shown only once). */ regenerateSecret(clientId: string): Promise<{ data: { type: string; id: string; attributes: { name: string; description: string; redirectUris: string[]; allowedScopes: string[]; allowedGrantTypes: string[]; isConfidential: boolean; isActive: boolean; accessTokenLifetime: number; refreshTokenLifetime: number; clientSecret: string; }; }; }>; } //# sourceMappingURL=oauth.management.controller.d.ts.map