Files
dcrouter/ts_interfaces/requests/workhoster.ts
T

257 lines
6.7 KiB
TypeScript
Raw Normal View History

2026-04-29 15:18:14 +00:00
import * as plugins from '../plugins.js';
import type * as authInterfaces from '../data/auth.js';
import type {
IGatewayClientDnsRecord,
IGatewayClientContext,
IGatewayClient,
IGatewayClientDomain,
IGatewayClientOwnership,
IGatewayClientRouteSyncResult,
2026-04-29 15:18:14 +00:00
IGatewayCapabilities,
2026-04-29 16:29:38 +00:00
IWorkAppMailIdentity,
IWorkAppMailIdentitySyncResult,
IWorkAppMailInboundRoute,
IWorkAppMailOwnership,
2026-04-29 15:18:14 +00:00
IWorkAppRouteOwnership,
IWorkAppRouteSyncResult,
IWorkHosterDomain,
} from '../data/workhoster.js';
import type { IDcRouterRouteConfig } from '../data/remoteingress.js';
export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetGatewayCapabilities
> {
method: 'getGatewayCapabilities';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
};
response: {
capabilities: IGatewayCapabilities;
};
}
export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetGatewayClientContext
> {
method: 'getGatewayClientContext';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
};
response: {
context: IGatewayClientContext;
capabilities: IGatewayCapabilities;
};
}
export interface IReq_ListGatewayClients extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_ListGatewayClients
> {
method: 'listGatewayClients';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
};
response: {
gatewayClients: IGatewayClient[];
};
}
export interface IReq_CreateGatewayClient extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_CreateGatewayClient
> {
method: 'createGatewayClient';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
id?: string;
type: IGatewayClient['type'];
name: string;
description?: string;
hostnamePatterns?: string[];
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
capabilities?: IGatewayClient['capabilities'];
};
response: {
success: boolean;
gatewayClient?: IGatewayClient;
message?: string;
};
}
export interface IReq_UpdateGatewayClient extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_UpdateGatewayClient
> {
method: 'updateGatewayClient';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
id: string;
name?: string;
description?: string;
hostnamePatterns?: string[];
allowedRouteTargets?: IGatewayClient['allowedRouteTargets'];
capabilities?: IGatewayClient['capabilities'];
enabled?: boolean;
};
response: {
success: boolean;
gatewayClient?: IGatewayClient;
message?: string;
};
}
export interface IReq_DeleteGatewayClient extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_DeleteGatewayClient
> {
method: 'deleteGatewayClient';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
id: string;
};
response: {
success: boolean;
message?: string;
};
}
export interface IReq_CreateGatewayClientToken extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_CreateGatewayClientToken
> {
method: 'createGatewayClientToken';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
gatewayClientId: string;
name?: string;
expiresInDays?: number | null;
};
response: {
success: boolean;
tokenId?: string;
tokenValue?: string;
message?: string;
};
}
2026-04-29 15:18:14 +00:00
export interface IReq_GetWorkHosterDomains extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetWorkHosterDomains
> {
method: 'getWorkHosterDomains';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
};
response: {
domains: IWorkHosterDomain[];
};
}
export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetGatewayClientDomains
> {
method: 'getGatewayClientDomains';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
gatewayClientId?: string;
};
response: {
domains: IGatewayClientDomain[];
};
}
export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetGatewayClientDnsRecords
> {
method: 'getGatewayClientDnsRecords';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
gatewayClientId?: string;
};
response: {
records: IGatewayClientDnsRecord[];
};
}
2026-04-29 15:18:14 +00:00
export interface IReq_SyncWorkAppRoute extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_SyncWorkAppRoute
> {
method: 'syncWorkAppRoute';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
ownership: IWorkAppRouteOwnership;
route?: IDcRouterRouteConfig;
enabled?: boolean;
delete?: boolean;
};
response: IWorkAppRouteSyncResult;
}
export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_SyncGatewayClientRoute
> {
method: 'syncGatewayClientRoute';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
ownership: IGatewayClientOwnership;
route?: IDcRouterRouteConfig;
enabled?: boolean;
delete?: boolean;
};
response: IGatewayClientRouteSyncResult;
2026-04-29 15:18:14 +00:00
}
2026-04-29 16:29:38 +00:00
export interface IReq_GetWorkAppMailIdentities extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_GetWorkAppMailIdentities
> {
method: 'getWorkAppMailIdentities';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
ownership?: Partial<IWorkAppMailOwnership>;
};
response: {
identities: IWorkAppMailIdentity[];
};
}
export interface IReq_SyncWorkAppMailIdentity extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_SyncWorkAppMailIdentity
> {
method: 'syncWorkAppMailIdentity';
request: {
identity?: authInterfaces.IIdentity;
apiToken?: string;
ownership: IWorkAppMailOwnership;
localPart: string;
domain: string;
displayName?: string;
inbound?: IWorkAppMailInboundRoute;
enabled?: boolean;
smtpEnabled?: boolean;
resetSmtpPassword?: boolean;
delete?: boolean;
};
response: IWorkAppMailIdentitySyncResult;
}