import * as plugins from '../plugins.js'; import type * as authInterfaces from '../data/auth.js'; import type { ITargetProfile, ITargetProfileTarget } from '../data/target-profile.js'; // ============================================================================ // Target Profile Endpoints (target-side: what can be accessed) // ============================================================================ /** * Get all target profiles. */ export interface IReq_GetTargetProfiles extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_GetTargetProfiles > { method: 'getTargetProfiles'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; }; response: { profiles: ITargetProfile[]; }; } /** * Get a single target profile by ID. */ export interface IReq_GetTargetProfile extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_GetTargetProfile > { method: 'getTargetProfile'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; id: string; }; response: { profile: ITargetProfile | null; }; } /** * Create a new target profile. */ export interface IReq_CreateTargetProfile extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateTargetProfile > { method: 'createTargetProfile'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; name: string; description?: string; domains?: string[]; targets?: ITargetProfileTarget[]; routeRefs?: string[]; }; response: { success: boolean; id?: string; message?: string; }; } /** * Update a target profile. */ export interface IReq_UpdateTargetProfile extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_UpdateTargetProfile > { method: 'updateTargetProfile'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; id: string; name?: string; description?: string; domains?: string[]; targets?: ITargetProfileTarget[]; routeRefs?: string[]; }; response: { success: boolean; message?: string; }; } /** * Delete a target profile. */ export interface IReq_DeleteTargetProfile extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_DeleteTargetProfile > { method: 'deleteTargetProfile'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; id: string; force?: boolean; }; response: { success: boolean; message?: string; }; } /** * Get which VPN clients reference a target profile. */ export interface IReq_GetTargetProfileUsage extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_GetTargetProfileUsage > { method: 'getTargetProfileUsage'; request: { identity?: authInterfaces.IIdentity; apiToken?: string; id: string; }; response: { clients: Array<{ clientId: string; description?: string }>; }; }