mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
refactor: trim approval infra exports
This commit is contained in:
@@ -3,7 +3,7 @@ import { withOperatorApprovalsGatewayClient } from "../gateway/operator-approval
|
||||
import { isApprovalNotFoundError } from "./approval-errors.js";
|
||||
import type { ExecApprovalDecision } from "./exec-approvals.js";
|
||||
|
||||
export type ResolveApprovalOverGatewayParams = {
|
||||
type ResolveApprovalOverGatewayParams = {
|
||||
cfg: OpenClawConfig;
|
||||
approvalId: string;
|
||||
decision: ExecApprovalDecision;
|
||||
|
||||
@@ -305,7 +305,7 @@ export function createChannelApprovalNativeRuntimeAdapter<
|
||||
};
|
||||
}
|
||||
|
||||
export type ChannelApprovalHandlerRuntimeSpec<TRequest extends ApprovalRequest> = {
|
||||
type ChannelApprovalHandlerRuntimeSpec<TRequest extends ApprovalRequest> = {
|
||||
label: string;
|
||||
clientDisplayName: string;
|
||||
cfg: OpenClawConfig;
|
||||
@@ -321,7 +321,7 @@ export type ChannelApprovalHandlerRuntimeSpec<TRequest extends ApprovalRequest>
|
||||
nowMs?: () => number;
|
||||
};
|
||||
|
||||
export type ChannelApprovalHandlerContentSpec<
|
||||
type ChannelApprovalHandlerContentSpec<
|
||||
TPendingContent,
|
||||
TRequest extends ApprovalRequest = ApprovalRequest,
|
||||
> = {
|
||||
@@ -332,14 +332,14 @@ export type ChannelApprovalHandlerContentSpec<
|
||||
}) => TPendingContent | Promise<TPendingContent>;
|
||||
};
|
||||
|
||||
export type ChannelApprovalHandlerTransportSpec<
|
||||
type ChannelApprovalHandlerTransportSpec<
|
||||
TPendingEntry,
|
||||
TPreparedTarget,
|
||||
TPendingContent,
|
||||
TRequest extends ApprovalRequest = ApprovalRequest,
|
||||
> = ChannelNativeApprovalTransportSpec<TPendingEntry, TPreparedTarget, TPendingContent, TRequest>;
|
||||
|
||||
export type ChannelApprovalHandlerLifecycleSpec<
|
||||
type ChannelApprovalHandlerLifecycleSpec<
|
||||
TPendingEntry,
|
||||
TPreparedTarget,
|
||||
TPendingContent,
|
||||
|
||||
@@ -28,7 +28,7 @@ type ApprovalResolved = ExecApprovalResolved | PluginApprovalResolved;
|
||||
|
||||
export type { PreparedChannelNativeApprovalTarget } from "./approval-native-runtime-types.js";
|
||||
|
||||
export type ChannelNativeApprovalPlanDeliveryResult<TPendingEntry> = {
|
||||
type ChannelNativeApprovalPlanDeliveryResult<TPendingEntry> = {
|
||||
entries: TPendingEntry[];
|
||||
deliveryPlan: ChannelApprovalNativeDeliveryPlan;
|
||||
deliveredTargets: ChannelApprovalNativePlannedTarget[];
|
||||
|
||||
@@ -10,14 +10,14 @@ import { normalizeMessageChannel } from "../utils/message-channel.js";
|
||||
import type { ExecApprovalRequest } from "./exec-approvals.js";
|
||||
import type { PluginApprovalRequest } from "./plugin-approvals.js";
|
||||
|
||||
export type ApprovalRequestLike = ExecApprovalRequest | PluginApprovalRequest;
|
||||
type ApprovalRequestLike = ExecApprovalRequest | PluginApprovalRequest;
|
||||
|
||||
type ApprovalRequestSessionBinding = {
|
||||
channel?: string;
|
||||
accountId?: string;
|
||||
};
|
||||
|
||||
export type PersistedApprovalRequestSessionEntry = {
|
||||
type PersistedApprovalRequestSessionEntry = {
|
||||
sessionKey: string;
|
||||
entry: SessionEntry;
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ export type ApprovalMetadataView = {
|
||||
value: string;
|
||||
};
|
||||
|
||||
export type ApprovalViewBase = {
|
||||
type ApprovalViewBase = {
|
||||
approvalId: string;
|
||||
approvalKind: ChannelApprovalKind;
|
||||
phase: ApprovalPhase;
|
||||
|
||||
Reference in New Issue
Block a user