@mintlify/cli 4.0.1189 → 4.0.1191
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/__test__/workflows/client.test.ts +126 -0
- package/bin/cli.js +2 -0
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/workflows/client.js +34 -0
- package/bin/workflows/index.js +267 -0
- package/bin/workflows/types.js +11 -0
- package/package.json +7 -7
- package/src/cli.tsx +2 -0
- package/src/workflows/client.ts +39 -0
- package/src/workflows/index.tsx +286 -0
- package/src/workflows/types.ts +68 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export const WORKFLOW_TYPES = [
|
|
2
|
+
'changelog',
|
|
3
|
+
'source-code-agent',
|
|
4
|
+
'translations',
|
|
5
|
+
'writing-style',
|
|
6
|
+
'typo-check',
|
|
7
|
+
'broken-link-detection',
|
|
8
|
+
'seo-metadata-audit',
|
|
9
|
+
'assistant-docs-updates',
|
|
10
|
+
'contextual-feedback-docs-updates',
|
|
11
|
+
] as const;
|
|
12
|
+
export type WorkflowType = (typeof WORKFLOW_TYPES)[number];
|
|
13
|
+
|
|
14
|
+
export type WorkflowCronTrigger = { cron: string };
|
|
15
|
+
export type WorkflowPushTrigger = { push: { repo: string; branch?: string }[] };
|
|
16
|
+
export type WorkflowComposioTrigger = {
|
|
17
|
+
composio: {
|
|
18
|
+
toolkit: string;
|
|
19
|
+
triggerSlug: string;
|
|
20
|
+
composioTriggerId?: string;
|
|
21
|
+
triggerConfig?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type WorkflowTrigger = WorkflowCronTrigger | WorkflowPushTrigger | WorkflowComposioTrigger;
|
|
26
|
+
|
|
27
|
+
export type WorkflowContextItem = {
|
|
28
|
+
repo: string;
|
|
29
|
+
public?: boolean;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type WorkflowNotify = {
|
|
33
|
+
slack?: {
|
|
34
|
+
channels?: string[];
|
|
35
|
+
channel_ids?: string[];
|
|
36
|
+
users?: string[];
|
|
37
|
+
user_ids?: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type WorkflowBody = {
|
|
42
|
+
name: string;
|
|
43
|
+
on: WorkflowTrigger;
|
|
44
|
+
prompt?: string;
|
|
45
|
+
type?: WorkflowType;
|
|
46
|
+
context?: WorkflowContextItem[];
|
|
47
|
+
automerge?: boolean;
|
|
48
|
+
notify?: WorkflowNotify;
|
|
49
|
+
config?: { translations?: { targetLanguages: string[] } };
|
|
50
|
+
tools?: { composio?: { toolkit: string }[] };
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type Workflow = {
|
|
54
|
+
_id: string;
|
|
55
|
+
deploymentId: string;
|
|
56
|
+
subdomain: string;
|
|
57
|
+
name: string;
|
|
58
|
+
prompt?: string;
|
|
59
|
+
type?: WorkflowType;
|
|
60
|
+
trigger: WorkflowTrigger;
|
|
61
|
+
status: 'active' | 'disabled' | 'deleted';
|
|
62
|
+
automerge?: boolean;
|
|
63
|
+
context?: WorkflowContextItem[];
|
|
64
|
+
notify?: WorkflowNotify;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
lastRanAt?: string;
|
|
68
|
+
};
|