skedyul 1.7.26 → 1.7.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/.build-stamp +1 -1
- package/dist/cli/api/apps.d.ts +123 -0
- package/dist/cli/api/context.d.ts +30 -0
- package/dist/cli/api/crm.d.ts +56 -0
- package/dist/cli/api/index.d.ts +11 -0
- package/dist/cli/api/index.js +802 -0
- package/dist/cli/api/workflows.d.ts +134 -0
- package/dist/cli/index.js +1174 -1312
- package/dist/config/app-config.d.ts +3 -2
- package/dist/config/schema-loader.d.ts +10 -1
- package/dist/config/types/app-event.d.ts +13 -0
- package/dist/config/types/entity.d.ts +11 -2
- package/dist/config/types/model.d.ts +9 -9
- package/dist/core/client.d.ts +11 -10
- package/dist/esm/index.mjs +40 -17
- package/dist/index.d.ts +2 -1
- package/dist/index.js +42 -17
- package/dist/schemas/crm-schema.d.ts +49 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas.d.ts +24 -2
- package/package.json +8 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { type CliContext } from './context';
|
|
2
|
+
export interface WorkflowVersion {
|
|
3
|
+
id: string;
|
|
4
|
+
version: number | null;
|
|
5
|
+
versionLabel: string | null;
|
|
6
|
+
contentHash: string | null;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
isTriggerVersion?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkflowRecord {
|
|
11
|
+
id: string;
|
|
12
|
+
handle: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
triggerVersionId: string | null;
|
|
18
|
+
triggerVersion: number | null;
|
|
19
|
+
triggerVersionLabel: string | null;
|
|
20
|
+
versions?: WorkflowVersion[];
|
|
21
|
+
}
|
|
22
|
+
export interface WorkflowFieldError {
|
|
23
|
+
code: string;
|
|
24
|
+
message: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DeployWorkflowResult {
|
|
27
|
+
success: boolean;
|
|
28
|
+
workflow: WorkflowRecord | null;
|
|
29
|
+
version: WorkflowVersion | null;
|
|
30
|
+
isNew: boolean;
|
|
31
|
+
reusedVersion: boolean;
|
|
32
|
+
pendingBuild: boolean;
|
|
33
|
+
message?: string;
|
|
34
|
+
errors?: Record<string, WorkflowFieldError>;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ValidateWorkflowResult {
|
|
38
|
+
success: boolean;
|
|
39
|
+
valid: boolean;
|
|
40
|
+
handle?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
errors?: Record<string, WorkflowFieldError>;
|
|
43
|
+
error?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface WorkflowInputField {
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
required: boolean;
|
|
49
|
+
description?: string;
|
|
50
|
+
label?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface WorkflowSchema {
|
|
53
|
+
handle: string;
|
|
54
|
+
name: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
version: number;
|
|
57
|
+
versionId: string;
|
|
58
|
+
inputs: WorkflowInputField[];
|
|
59
|
+
error?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface RunWorkflowResult {
|
|
62
|
+
success: boolean;
|
|
63
|
+
workflowRunId: string;
|
|
64
|
+
status: string;
|
|
65
|
+
workflowId: string;
|
|
66
|
+
workflowVersionId: string;
|
|
67
|
+
version: number;
|
|
68
|
+
error?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface WorkflowRunStep {
|
|
71
|
+
id: string;
|
|
72
|
+
handle: string;
|
|
73
|
+
name: string;
|
|
74
|
+
status: string;
|
|
75
|
+
startedAt: string | null;
|
|
76
|
+
completedAt: string | null;
|
|
77
|
+
}
|
|
78
|
+
export interface WorkflowRunStatus {
|
|
79
|
+
success: boolean;
|
|
80
|
+
workflowRunId: string;
|
|
81
|
+
status: string;
|
|
82
|
+
startedAt: string | null;
|
|
83
|
+
completedAt: string | null;
|
|
84
|
+
failedAt: string | null;
|
|
85
|
+
cancelledAt: string | null;
|
|
86
|
+
steps: WorkflowRunStep[];
|
|
87
|
+
error?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface PublishWorkflowResult {
|
|
90
|
+
success: boolean;
|
|
91
|
+
workflowId: string;
|
|
92
|
+
workflowVersionId: string;
|
|
93
|
+
version: number;
|
|
94
|
+
}
|
|
95
|
+
export interface PullWorkflowResult {
|
|
96
|
+
success: boolean;
|
|
97
|
+
yaml: string;
|
|
98
|
+
version: number;
|
|
99
|
+
handle: string;
|
|
100
|
+
}
|
|
101
|
+
/** Local Zod/YAML check used by CLI before any server call. */
|
|
102
|
+
export declare function validateWorkflowContent(yamlContent: string): {
|
|
103
|
+
content: string;
|
|
104
|
+
};
|
|
105
|
+
export declare function listWorkflows(ctx: CliContext, workplace: string): Promise<WorkflowRecord[]>;
|
|
106
|
+
export declare function getWorkflow(ctx: CliContext, workplace: string, handle: string): Promise<WorkflowRecord>;
|
|
107
|
+
export declare function listWorkflowVersions(ctx: CliContext, workplace: string, handle: string): Promise<WorkflowVersion[]>;
|
|
108
|
+
export declare function validateWorkflow(ctx: CliContext, workplace: string, yamlContent: string): Promise<ValidateWorkflowResult>;
|
|
109
|
+
export interface DeployWorkflowOptions {
|
|
110
|
+
publish?: boolean;
|
|
111
|
+
versionLabel?: string;
|
|
112
|
+
}
|
|
113
|
+
export declare function deployWorkflow(ctx: CliContext, workplace: string, yamlContent: string, options?: DeployWorkflowOptions): Promise<DeployWorkflowResult>;
|
|
114
|
+
export declare function publishWorkflow(ctx: CliContext, workplace: string, handle: string, version: number): Promise<PublishWorkflowResult>;
|
|
115
|
+
export declare function pullWorkflow(ctx: CliContext, workplace: string, handle: string, version?: number): Promise<PullWorkflowResult>;
|
|
116
|
+
export declare function getWorkflowSchema(ctx: CliContext, workplace: string, handle: string, version?: number): Promise<WorkflowSchema>;
|
|
117
|
+
export declare function runWorkflow(ctx: CliContext, workplace: string, handle: string, options?: {
|
|
118
|
+
version?: number;
|
|
119
|
+
inputs?: Record<string, string>;
|
|
120
|
+
}): Promise<RunWorkflowResult>;
|
|
121
|
+
export declare function getWorkflowRun(ctx: CliContext, workplace: string, workflowRunId: string): Promise<WorkflowRunStatus>;
|
|
122
|
+
export declare const workflows: {
|
|
123
|
+
list: typeof listWorkflows;
|
|
124
|
+
get: typeof getWorkflow;
|
|
125
|
+
versions: typeof listWorkflowVersions;
|
|
126
|
+
validate: typeof validateWorkflow;
|
|
127
|
+
validateLocal: typeof validateWorkflowContent;
|
|
128
|
+
deploy: typeof deployWorkflow;
|
|
129
|
+
publish: typeof publishWorkflow;
|
|
130
|
+
pull: typeof pullWorkflow;
|
|
131
|
+
schema: typeof getWorkflowSchema;
|
|
132
|
+
run: typeof runWorkflow;
|
|
133
|
+
getRun: typeof getWorkflowRun;
|
|
134
|
+
};
|