feat: rename san to subjectAltNames, workflow to workflowId, nodeId to workflowNodeId, output to workflowOutputId, log to logs, succeed to succeeded
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { type WorkflowModel } from "./workflow";
|
||||
|
||||
export interface CertificateModel extends BaseModel {
|
||||
san: string;
|
||||
source: string;
|
||||
subjectAltNames: string;
|
||||
certificate: string;
|
||||
privateKey: string;
|
||||
issuerCertificate: string;
|
||||
certUrl: string;
|
||||
certStableUrl: string;
|
||||
output: string;
|
||||
effectAt: ISO8601String;
|
||||
expireAt: ISO8601String;
|
||||
workflow: string;
|
||||
nodeId: string;
|
||||
workflowId: string;
|
||||
expand: {
|
||||
workflow?: WorkflowModel;
|
||||
workflowId?: WorkflowModel; // TODO: ugly, maybe to use an alias?
|
||||
};
|
||||
}
|
||||
|
||||
export const CERTIFICATE_SOURCES = Object.freeze({
|
||||
WORKFLOW: "workflow",
|
||||
UPLOAD: "upload",
|
||||
} as const);
|
||||
|
||||
export type CertificateSourceType = (typeof CERTIFICATE_SOURCES)[keyof typeof CERTIFICATE_SOURCES];
|
||||
|
||||
@@ -400,9 +400,10 @@ export const isAllNodesValidated = (node: WorkflowNode): boolean => {
|
||||
*/
|
||||
export const getExecuteMethod = (node: WorkflowNode): { trigger: string; triggerCron: string } => {
|
||||
if (node.type === WorkflowNodeType.Start) {
|
||||
const config = node.config as WorkflowNodeConfigAsStart;
|
||||
return {
|
||||
trigger: (node.config?.trigger as string) ?? "",
|
||||
triggerCron: (node.config?.triggerCron as string) ?? "",
|
||||
trigger: config.trigger ?? "",
|
||||
triggerCron: config.triggerCron ?? "",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
export interface WorkflowRunModel extends BaseModel {
|
||||
workflow: string;
|
||||
log: WorkflowRunLog[];
|
||||
workflowId: string;
|
||||
logs: WorkflowRunLog[];
|
||||
error: string;
|
||||
succeed: boolean;
|
||||
succeeded: boolean;
|
||||
}
|
||||
|
||||
export type WorkflowRunLog = {
|
||||
nodeId: string;
|
||||
nodeName: string;
|
||||
error: string;
|
||||
outputs: WorkflowRunLogOutput[];
|
||||
error: string;
|
||||
};
|
||||
|
||||
export type WorkflowRunLogOutput = {
|
||||
|
||||
Reference in New Issue
Block a user