feat(gateway-clients): add managed gateway client administration and token-bound route ownership
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { IDomain } from './domain.js';
|
||||
import type { IDnsRecord, TDnsRecordType } from './dns-record.js';
|
||||
import type { TGatewayClientType } from './route-management.js';
|
||||
import type { IApiTokenPolicy, TApiTokenScope, TGatewayClientType } from './route-management.js';
|
||||
|
||||
export interface IGatewayCapabilities {
|
||||
routes: {
|
||||
@@ -34,6 +34,33 @@ export interface IGatewayCapabilities {
|
||||
};
|
||||
}
|
||||
|
||||
export interface IGatewayClientContext {
|
||||
role: IApiTokenPolicy['role'];
|
||||
scopes: TApiTokenScope[];
|
||||
gatewayClient?: {
|
||||
type: TGatewayClientType;
|
||||
id: string;
|
||||
};
|
||||
hostnamePatterns: string[];
|
||||
allowedRouteTargets: NonNullable<IApiTokenPolicy['allowedRouteTargets']>;
|
||||
capabilities: NonNullable<IApiTokenPolicy['capabilities']>;
|
||||
}
|
||||
|
||||
export interface IGatewayClient {
|
||||
id: string;
|
||||
type: TGatewayClientType;
|
||||
name: string;
|
||||
description?: string;
|
||||
hostnamePatterns: string[];
|
||||
allowedRouteTargets: NonNullable<IApiTokenPolicy['allowedRouteTargets']>;
|
||||
capabilities: NonNullable<IApiTokenPolicy['capabilities']>;
|
||||
enabled: boolean;
|
||||
tokenCount?: number;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
createdBy: string;
|
||||
}
|
||||
|
||||
export interface IGatewayClientDomain extends IDomain {
|
||||
capabilities: {
|
||||
canCreateSubdomains: boolean;
|
||||
@@ -49,8 +76,8 @@ export interface IGatewayClientDomain extends IDomain {
|
||||
export type IWorkHosterDomain = IGatewayClientDomain;
|
||||
|
||||
export interface IGatewayClientOwnership {
|
||||
gatewayClientType: TGatewayClientType;
|
||||
gatewayClientId: string;
|
||||
gatewayClientType?: TGatewayClientType;
|
||||
gatewayClientId?: string;
|
||||
appId: string;
|
||||
hostname: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user