Rename planner and document rewrite: rewrite_documents moves qualified names of the renamed flow in every flow (ports, inputs, outputs) and dashboard binding (one key table, WIDGET_BINDINGS, shared with the WidgetDef accessors, legacy pages included), published and draft, as plain JSON with both variants above either version; plan_rename reports documents, counts, fingerprint, warnings and refusals; superuser plan routes for flows and dashboards; key residue classifies state as the mapper does; duplicate retargets inputs and outputs too; queue reports its Redis version and other consumers
This commit is contained in:
@@ -123,6 +123,22 @@ export const AIStatusSchema = {
|
||||
title: 'AIStatus'
|
||||
} as const;
|
||||
|
||||
export const AlertCountsSchema = {
|
||||
properties: {
|
||||
channels: {
|
||||
type: 'integer',
|
||||
title: 'Channels'
|
||||
},
|
||||
ledger_rows: {
|
||||
type: 'integer',
|
||||
title: 'Ledger Rows'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['channels', 'ledger_rows'],
|
||||
title: 'AlertCounts'
|
||||
} as const;
|
||||
|
||||
export const AlertsConfigSchema = {
|
||||
properties: {
|
||||
enabled: {
|
||||
@@ -2183,6 +2199,30 @@ export const HealthSummarySchema = {
|
||||
title: 'HealthSummary'
|
||||
} as const;
|
||||
|
||||
export const HistoryCountsSchema = {
|
||||
properties: {
|
||||
runs: {
|
||||
type: 'integer',
|
||||
title: 'Runs'
|
||||
},
|
||||
metric_rows: {
|
||||
type: 'integer',
|
||||
title: 'Metric Rows'
|
||||
},
|
||||
artifact_rows: {
|
||||
type: 'integer',
|
||||
title: 'Artifact Rows'
|
||||
},
|
||||
output_rows: {
|
||||
type: 'integer',
|
||||
title: 'Output Rows'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['runs', 'metric_rows', 'artifact_rows', 'output_rows'],
|
||||
title: 'HistoryCounts'
|
||||
} as const;
|
||||
|
||||
export const HistoryPointSchema = {
|
||||
properties: {
|
||||
ts: {
|
||||
@@ -3647,6 +3687,54 @@ export const PlacementSchema = {
|
||||
description: "Where a widget sits in its section's grid, in grid units."
|
||||
} as const;
|
||||
|
||||
export const PlannedDocumentSchema = {
|
||||
properties: {
|
||||
kind: {
|
||||
type: 'string',
|
||||
enum: ['flow', 'dashboard'],
|
||||
title: 'Kind'
|
||||
},
|
||||
id: {
|
||||
type: 'string',
|
||||
title: 'Id'
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
title: 'Name'
|
||||
},
|
||||
published_version: {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
],
|
||||
title: 'Published Version'
|
||||
},
|
||||
draft_version: {
|
||||
anyOf: [
|
||||
{
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
],
|
||||
title: 'Draft Version'
|
||||
},
|
||||
fields: {
|
||||
type: 'integer',
|
||||
title: 'Fields'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['kind', 'id', 'name', 'published_version', 'draft_version', 'fields'],
|
||||
title: 'PlannedDocument',
|
||||
description: 'A document a rename rewrites, and the versions it was planned against.'
|
||||
} as const;
|
||||
|
||||
export const PortalMemberSchema = {
|
||||
properties: {
|
||||
user_id: {
|
||||
@@ -3797,6 +3885,157 @@ export const RemoteUserBodySchema = {
|
||||
title: 'RemoteUserBody'
|
||||
} as const;
|
||||
|
||||
export const RenamePlanSchema = {
|
||||
properties: {
|
||||
kind: {
|
||||
type: 'string',
|
||||
enum: ['flow', 'dashboard'],
|
||||
title: 'Kind'
|
||||
},
|
||||
id: {
|
||||
type: 'string',
|
||||
title: 'Id'
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
title: 'Name'
|
||||
},
|
||||
new_name: {
|
||||
type: 'string',
|
||||
title: 'New Name'
|
||||
},
|
||||
version: {
|
||||
type: 'integer',
|
||||
title: 'Version'
|
||||
},
|
||||
fingerprint: {
|
||||
type: 'string',
|
||||
title: 'Fingerprint',
|
||||
default: ''
|
||||
},
|
||||
allowed: {
|
||||
type: 'boolean',
|
||||
title: 'Allowed',
|
||||
default: false
|
||||
},
|
||||
refusals: {
|
||||
items: {
|
||||
'$ref': '#/components/schemas/RenameRefusal'
|
||||
},
|
||||
type: 'array',
|
||||
title: 'Refusals',
|
||||
default: []
|
||||
},
|
||||
documents: {
|
||||
items: {
|
||||
'$ref': '#/components/schemas/PlannedDocument'
|
||||
},
|
||||
type: 'array',
|
||||
title: 'Documents',
|
||||
default: []
|
||||
},
|
||||
alerts: {
|
||||
anyOf: [
|
||||
{
|
||||
'$ref': '#/components/schemas/AlertCounts'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
]
|
||||
},
|
||||
history: {
|
||||
anyOf: [
|
||||
{
|
||||
'$ref': '#/components/schemas/HistoryCounts'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
]
|
||||
},
|
||||
runtime: {
|
||||
anyOf: [
|
||||
{
|
||||
'$ref': '#/components/schemas/RuntimeCounts'
|
||||
},
|
||||
{
|
||||
type: 'null'
|
||||
}
|
||||
]
|
||||
},
|
||||
warnings: {
|
||||
items: {
|
||||
'$ref': '#/components/schemas/RenameWarning'
|
||||
},
|
||||
type: 'array',
|
||||
title: 'Warnings',
|
||||
default: []
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['kind', 'id', 'name', 'new_name', 'version'],
|
||||
title: 'RenamePlan',
|
||||
description: `What renaming a flow's or dashboard's key would change, and whether it
|
||||
may. Read-only; the rename request repeats \`\`version\`\` and
|
||||
\`\`fingerprint\`\`, and is refused when either moved since.`
|
||||
} as const;
|
||||
|
||||
export const RenamePlanRequestSchema = {
|
||||
properties: {
|
||||
new_name: {
|
||||
type: 'string',
|
||||
title: 'New Name'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['new_name'],
|
||||
title: 'RenamePlanRequest',
|
||||
description: 'The key a flow or dashboard would be renamed to.'
|
||||
} as const;
|
||||
|
||||
export const RenameRefusalSchema = {
|
||||
properties: {
|
||||
code: {
|
||||
type: 'string',
|
||||
title: 'Code'
|
||||
},
|
||||
detail: {
|
||||
type: 'string',
|
||||
title: 'Detail'
|
||||
},
|
||||
ids: {
|
||||
items: {
|
||||
type: 'string'
|
||||
},
|
||||
type: 'array',
|
||||
title: 'Ids',
|
||||
default: []
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['code', 'detail'],
|
||||
title: 'RenameRefusal',
|
||||
description: 'Why a rename cannot go ahead, with the ids of what is in the way.'
|
||||
} as const;
|
||||
|
||||
export const RenameWarningSchema = {
|
||||
properties: {
|
||||
code: {
|
||||
type: 'string',
|
||||
title: 'Code'
|
||||
},
|
||||
detail: {
|
||||
type: 'string',
|
||||
title: 'Detail'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['code', 'detail'],
|
||||
title: 'RenameWarning',
|
||||
description: 'Something a rename changes, or leaves, that its caller should know.'
|
||||
} as const;
|
||||
|
||||
export const ResourceLevelSchema = {
|
||||
properties: {
|
||||
total: {
|
||||
@@ -4260,6 +4499,38 @@ export const RunRequestSchema = {
|
||||
title: 'RunRequest'
|
||||
} as const;
|
||||
|
||||
export const RuntimeCountsSchema = {
|
||||
properties: {
|
||||
durable: {
|
||||
type: 'boolean',
|
||||
title: 'Durable'
|
||||
},
|
||||
state_keys: {
|
||||
type: 'integer',
|
||||
title: 'State Keys'
|
||||
},
|
||||
queue_items: {
|
||||
type: 'integer',
|
||||
title: 'Queue Items'
|
||||
},
|
||||
delayed: {
|
||||
type: 'integer',
|
||||
title: 'Delayed'
|
||||
},
|
||||
parked: {
|
||||
type: 'integer',
|
||||
title: 'Parked'
|
||||
},
|
||||
done_markers: {
|
||||
type: 'integer',
|
||||
title: 'Done Markers'
|
||||
}
|
||||
},
|
||||
type: 'object',
|
||||
required: ['durable', 'state_keys', 'queue_items', 'delayed', 'parked', 'done_markers'],
|
||||
title: 'RuntimeCounts'
|
||||
} as const;
|
||||
|
||||
export const SearchEntrySchema = {
|
||||
properties: {
|
||||
category: {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -25,6 +25,11 @@ export type AIStatus = {
|
||||
model: (string | null);
|
||||
};
|
||||
|
||||
export type AlertCounts = {
|
||||
channels: number;
|
||||
ledger_rows: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* The whole alerting setup, as stored and as the API sees it.
|
||||
*/
|
||||
@@ -719,6 +724,13 @@ export type HealthSummary = {
|
||||
version?: string;
|
||||
};
|
||||
|
||||
export type HistoryCounts = {
|
||||
runs: number;
|
||||
metric_rows: number;
|
||||
artifact_rows: number;
|
||||
output_rows: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* One numeric value a message carried, and when.
|
||||
*/
|
||||
@@ -1190,6 +1202,20 @@ export type Placement = {
|
||||
h?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* A document a rename rewrites, and the versions it was planned against.
|
||||
*/
|
||||
export type PlannedDocument = {
|
||||
kind: 'flow' | 'dashboard';
|
||||
id: string;
|
||||
name: string;
|
||||
published_version: (number | null);
|
||||
draft_version: (number | null);
|
||||
fields: number;
|
||||
};
|
||||
|
||||
export type kind2 = 'flow' | 'dashboard';
|
||||
|
||||
export type PortalMember = {
|
||||
user_id: string;
|
||||
email: string;
|
||||
@@ -1232,6 +1258,51 @@ export type RemoteUserBody = {
|
||||
code: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* What renaming a flow's or dashboard's key would change, and whether it
|
||||
* may. Read-only; the rename request repeats ``version`` and
|
||||
* ``fingerprint``, and is refused when either moved since.
|
||||
*/
|
||||
export type RenamePlan = {
|
||||
kind: 'flow' | 'dashboard';
|
||||
id: string;
|
||||
name: string;
|
||||
new_name: string;
|
||||
version: number;
|
||||
fingerprint?: string;
|
||||
allowed?: boolean;
|
||||
refusals?: Array<RenameRefusal>;
|
||||
documents?: Array<PlannedDocument>;
|
||||
alerts?: (AlertCounts | null);
|
||||
history?: (HistoryCounts | null);
|
||||
runtime?: (RuntimeCounts | null);
|
||||
warnings?: Array<RenameWarning>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The key a flow or dashboard would be renamed to.
|
||||
*/
|
||||
export type RenamePlanRequest = {
|
||||
new_name: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Why a rename cannot go ahead, with the ids of what is in the way.
|
||||
*/
|
||||
export type RenameRefusal = {
|
||||
code: string;
|
||||
detail: string;
|
||||
ids?: Array<(string)>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Something a rename changes, or leaves, that its caller should know.
|
||||
*/
|
||||
export type RenameWarning = {
|
||||
code: string;
|
||||
detail: string;
|
||||
};
|
||||
|
||||
export type ResourceLevel = {
|
||||
total: number;
|
||||
free: number;
|
||||
@@ -1373,6 +1444,15 @@ export type RunRequest = {
|
||||
};
|
||||
};
|
||||
|
||||
export type RuntimeCounts = {
|
||||
durable: boolean;
|
||||
state_keys: number;
|
||||
queue_items: number;
|
||||
delayed: number;
|
||||
parked: number;
|
||||
done_markers: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* One thing somebody might be looking for.
|
||||
*
|
||||
@@ -1937,6 +2017,13 @@ export type DashboardsDuplicateDashboardData = {
|
||||
|
||||
export type DashboardsDuplicateDashboardResponse = (DashboardDef_Output);
|
||||
|
||||
export type DashboardsPlanDashboardRenameData = {
|
||||
dashboardId: string;
|
||||
requestBody: RenamePlanRequest;
|
||||
};
|
||||
|
||||
export type DashboardsPlanDashboardRenameResponse = (RenamePlan);
|
||||
|
||||
export type DevicesStartPairingData = {
|
||||
requestBody?: (PairHello | null);
|
||||
};
|
||||
@@ -2095,6 +2182,13 @@ export type FlowsDuplicateFlowData = {
|
||||
|
||||
export type FlowsDuplicateFlowResponse = (FlowDetail);
|
||||
|
||||
export type FlowsPlanFlowRenameData = {
|
||||
flowId: string;
|
||||
requestBody: RenamePlanRequest;
|
||||
};
|
||||
|
||||
export type FlowsPlanFlowRenameResponse = (RenamePlan);
|
||||
|
||||
export type FlowsReadNodeSourceData = {
|
||||
flowId: string;
|
||||
nodeId: string;
|
||||
|
||||
Reference in New Issue
Block a user