2026-04-02 15:44:36 +00:00
|
|
|
import * as plugins from '../plugins.js';
|
|
|
|
|
import type * as authInterfaces from '../data/auth.js';
|
2026-04-05 00:37:37 +00:00
|
|
|
import type { ISourceProfile, IRouteSecurity } from '../data/route-management.js';
|
2026-04-02 15:44:36 +00:00
|
|
|
|
|
|
|
|
// ============================================================================
|
2026-04-05 00:37:37 +00:00
|
|
|
// Source Profile Endpoints (source-side: who can access)
|
2026-04-02 15:44:36 +00:00
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Get all source profiles.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_GetSourceProfiles extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_GetSourceProfiles
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'getSourceProfiles';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
};
|
|
|
|
|
response: {
|
2026-04-05 00:37:37 +00:00
|
|
|
profiles: ISourceProfile[];
|
2026-04-02 15:44:36 +00:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Get a single source profile by ID.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_GetSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_GetSourceProfile
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'getSourceProfile';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
id: string;
|
|
|
|
|
};
|
|
|
|
|
response: {
|
2026-04-05 00:37:37 +00:00
|
|
|
profile: ISourceProfile | null;
|
2026-04-02 15:44:36 +00:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Create a new source profile.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_CreateSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_CreateSourceProfile
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'createSourceProfile';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
name: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
security: IRouteSecurity;
|
|
|
|
|
extendsProfiles?: string[];
|
|
|
|
|
};
|
|
|
|
|
response: {
|
|
|
|
|
success: boolean;
|
|
|
|
|
id?: string;
|
|
|
|
|
message?: string;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Update a source profile.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_UpdateSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_UpdateSourceProfile
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'updateSourceProfile';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
id: string;
|
|
|
|
|
name?: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
security?: IRouteSecurity;
|
|
|
|
|
extendsProfiles?: string[];
|
|
|
|
|
};
|
|
|
|
|
response: {
|
|
|
|
|
success: boolean;
|
|
|
|
|
affectedRouteCount?: number;
|
|
|
|
|
message?: string;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Delete a source profile.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_DeleteSourceProfile extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_DeleteSourceProfile
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'deleteSourceProfile';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
id: string;
|
|
|
|
|
force?: boolean;
|
|
|
|
|
};
|
|
|
|
|
response: {
|
|
|
|
|
success: boolean;
|
|
|
|
|
message?: string;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-05 00:37:37 +00:00
|
|
|
* Get which routes reference a source profile.
|
2026-04-02 15:44:36 +00:00
|
|
|
*/
|
2026-04-05 00:37:37 +00:00
|
|
|
export interface IReq_GetSourceProfileUsage extends plugins.typedrequestInterfaces.implementsTR<
|
2026-04-02 15:44:36 +00:00
|
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
2026-04-05 00:37:37 +00:00
|
|
|
IReq_GetSourceProfileUsage
|
2026-04-02 15:44:36 +00:00
|
|
|
> {
|
2026-04-05 00:37:37 +00:00
|
|
|
method: 'getSourceProfileUsage';
|
2026-04-02 15:44:36 +00:00
|
|
|
request: {
|
|
|
|
|
identity?: authInterfaces.IIdentity;
|
|
|
|
|
apiToken?: string;
|
|
|
|
|
id: string;
|
|
|
|
|
};
|
|
|
|
|
response: {
|
|
|
|
|
routes: Array<{ id: string; name: string }>;
|
|
|
|
|
};
|
|
|
|
|
}
|