@hexabot-ai/types 3.0.0-alpha.0
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/LICENSE.md +120 -0
- package/README.md +172 -0
- package/dist/cjs/analytics/index.js +18 -0
- package/dist/cjs/analytics/integration-health.js +30 -0
- package/dist/cjs/analytics/stats.js +32 -0
- package/dist/cjs/attachment/attachment.js +53 -0
- package/dist/cjs/attachment/index.js +16 -0
- package/dist/cjs/audit/audit-log.js +33 -0
- package/dist/cjs/audit/index.js +11 -0
- package/dist/cjs/channel/channel-metadata.js +15 -0
- package/dist/cjs/channel/index.js +15 -0
- package/dist/cjs/channel/source-full.js +16 -0
- package/dist/cjs/channel/source.js +25 -0
- package/dist/cjs/chat/attachment.js +32 -0
- package/dist/cjs/chat/button.js +70 -0
- package/dist/cjs/chat/index.js +87 -0
- package/dist/cjs/chat/label-group.js +22 -0
- package/dist/cjs/chat/label.js +37 -0
- package/dist/cjs/chat/message-contract.js +183 -0
- package/dist/cjs/chat/message.js +107 -0
- package/dist/cjs/chat/options.js +122 -0
- package/dist/cjs/chat/quick-reply.js +35 -0
- package/dist/cjs/chat/subscriber.js +36 -0
- package/dist/cjs/chat/thread.js +36 -0
- package/dist/cjs/cms/content-type.js +17 -0
- package/dist/cjs/cms/content.js +29 -0
- package/dist/cjs/cms/index.js +21 -0
- package/dist/cjs/cms/menu.js +36 -0
- package/dist/cjs/dummy/dummy.js +18 -0
- package/dist/cjs/dummy/index.js +12 -0
- package/dist/cjs/i18n/index.js +16 -0
- package/dist/cjs/i18n/language.js +19 -0
- package/dist/cjs/i18n/translation.js +17 -0
- package/dist/cjs/index.js +32 -0
- package/dist/cjs/setting/index.js +18 -0
- package/dist/cjs/setting/metadata.js +17 -0
- package/dist/cjs/setting/setting.js +36 -0
- package/dist/cjs/shared/aliases.js +41 -0
- package/dist/cjs/shared/base.js +14 -0
- package/dist/cjs/shared/object.js +19 -0
- package/dist/cjs/shared/preprocess.js +13 -0
- package/dist/cjs/shared/profile.js +33 -0
- package/dist/cjs/user/credential.js +26 -0
- package/dist/cjs/user/domain.js +56 -0
- package/dist/cjs/user/index.js +39 -0
- package/dist/cjs/user/model.js +24 -0
- package/dist/cjs/user/permission.js +32 -0
- package/dist/cjs/user/role.js +24 -0
- package/dist/cjs/user/user-profile-assigned.js +38 -0
- package/dist/cjs/user/user-profile.js +12 -0
- package/dist/cjs/user/user.js +44 -0
- package/dist/cjs/workflow/domain.js +44 -0
- package/dist/cjs/workflow/helpers.js +35 -0
- package/dist/cjs/workflow/index.js +40 -0
- package/dist/cjs/workflow/mcp-server.js +33 -0
- package/dist/cjs/workflow/memory-definition.js +21 -0
- package/dist/cjs/workflow/memory-record.js +44 -0
- package/dist/cjs/workflow/workflow-run.js +100 -0
- package/dist/cjs/workflow/workflow-version.js +39 -0
- package/dist/cjs/workflow/workflow.js +98 -0
- package/dist/esm/analytics/index.js +7 -0
- package/dist/esm/analytics/integration-health.js +27 -0
- package/dist/esm/analytics/stats.js +29 -0
- package/dist/esm/attachment/attachment.js +50 -0
- package/dist/esm/attachment/index.js +6 -0
- package/dist/esm/audit/audit-log.js +30 -0
- package/dist/esm/audit/index.js +6 -0
- package/dist/esm/channel/channel-metadata.js +12 -0
- package/dist/esm/channel/index.js +8 -0
- package/dist/esm/channel/source-full.js +13 -0
- package/dist/esm/channel/source.js +22 -0
- package/dist/esm/chat/attachment.js +29 -0
- package/dist/esm/chat/button.js +67 -0
- package/dist/esm/chat/index.js +15 -0
- package/dist/esm/chat/label-group.js +19 -0
- package/dist/esm/chat/label.js +34 -0
- package/dist/esm/chat/message-contract.js +180 -0
- package/dist/esm/chat/message.js +104 -0
- package/dist/esm/chat/options.js +119 -0
- package/dist/esm/chat/quick-reply.js +32 -0
- package/dist/esm/chat/subscriber.js +33 -0
- package/dist/esm/chat/thread.js +33 -0
- package/dist/esm/cms/content-type.js +14 -0
- package/dist/esm/cms/content.js +26 -0
- package/dist/esm/cms/index.js +8 -0
- package/dist/esm/cms/menu.js +33 -0
- package/dist/esm/dummy/dummy.js +15 -0
- package/dist/esm/dummy/index.js +6 -0
- package/dist/esm/i18n/index.js +7 -0
- package/dist/esm/i18n/language.js +16 -0
- package/dist/esm/i18n/translation.js +14 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/setting/index.js +7 -0
- package/dist/esm/setting/metadata.js +14 -0
- package/dist/esm/setting/setting.js +33 -0
- package/dist/esm/shared/aliases.js +35 -0
- package/dist/esm/shared/base.js +11 -0
- package/dist/esm/shared/object.js +14 -0
- package/dist/esm/shared/preprocess.js +9 -0
- package/dist/esm/shared/profile.js +30 -0
- package/dist/esm/user/credential.js +23 -0
- package/dist/esm/user/domain.js +53 -0
- package/dist/esm/user/index.js +13 -0
- package/dist/esm/user/model.js +21 -0
- package/dist/esm/user/permission.js +29 -0
- package/dist/esm/user/role.js +21 -0
- package/dist/esm/user/user-profile-assigned.js +35 -0
- package/dist/esm/user/user-profile.js +9 -0
- package/dist/esm/user/user.js +41 -0
- package/dist/esm/workflow/domain.js +41 -0
- package/dist/esm/workflow/helpers.js +30 -0
- package/dist/esm/workflow/index.js +12 -0
- package/dist/esm/workflow/mcp-server.js +30 -0
- package/dist/esm/workflow/memory-definition.js +18 -0
- package/dist/esm/workflow/memory-record.js +41 -0
- package/dist/esm/workflow/workflow-run.js +96 -0
- package/dist/esm/workflow/workflow-version.js +36 -0
- package/dist/esm/workflow/workflow.js +94 -0
- package/dist/types/analytics/index.d.ts +3 -0
- package/dist/types/analytics/index.d.ts.map +1 -0
- package/dist/types/analytics/integration-health.d.ts +55 -0
- package/dist/types/analytics/integration-health.d.ts.map +1 -0
- package/dist/types/analytics/stats.d.ts +43 -0
- package/dist/types/analytics/stats.d.ts.map +1 -0
- package/dist/types/attachment/attachment.d.ts +212 -0
- package/dist/types/attachment/attachment.d.ts.map +1 -0
- package/dist/types/attachment/index.d.ts +2 -0
- package/dist/types/attachment/index.d.ts.map +1 -0
- package/dist/types/audit/audit-log.d.ts +58 -0
- package/dist/types/audit/audit-log.d.ts.map +1 -0
- package/dist/types/audit/index.d.ts +2 -0
- package/dist/types/audit/index.d.ts.map +1 -0
- package/dist/types/channel/channel-metadata.d.ts +7 -0
- package/dist/types/channel/channel-metadata.d.ts.map +1 -0
- package/dist/types/channel/index.d.ts +4 -0
- package/dist/types/channel/index.d.ts.map +1 -0
- package/dist/types/channel/source-full.d.ts +58 -0
- package/dist/types/channel/source-full.d.ts.map +1 -0
- package/dist/types/channel/source.d.ts +44 -0
- package/dist/types/channel/source.d.ts.map +1 -0
- package/dist/types/chat/attachment.d.ts +34 -0
- package/dist/types/chat/attachment.d.ts.map +1 -0
- package/dist/types/chat/button.d.ts +31 -0
- package/dist/types/chat/button.d.ts.map +1 -0
- package/dist/types/chat/index.d.ts +11 -0
- package/dist/types/chat/index.d.ts.map +1 -0
- package/dist/types/chat/label-group.d.ts +47 -0
- package/dist/types/chat/label-group.d.ts.map +1 -0
- package/dist/types/chat/label.d.ts +102 -0
- package/dist/types/chat/label.d.ts.map +1 -0
- package/dist/types/chat/message-contract.d.ts +883 -0
- package/dist/types/chat/message-contract.d.ts.map +1 -0
- package/dist/types/chat/message.d.ts +1132 -0
- package/dist/types/chat/message.d.ts.map +1 -0
- package/dist/types/chat/options.d.ts +64 -0
- package/dist/types/chat/options.d.ts.map +1 -0
- package/dist/types/chat/quick-reply.d.ts +32 -0
- package/dist/types/chat/quick-reply.d.ts.map +1 -0
- package/dist/types/chat/subscriber.d.ts +236 -0
- package/dist/types/chat/subscriber.d.ts.map +1 -0
- package/dist/types/chat/thread.d.ts +126 -0
- package/dist/types/chat/thread.d.ts.map +1 -0
- package/dist/types/cms/content-type.d.ts +26 -0
- package/dist/types/cms/content-type.d.ts.map +1 -0
- package/dist/types/cms/content.d.ts +49 -0
- package/dist/types/cms/content.d.ts.map +1 -0
- package/dist/types/cms/index.d.ts +4 -0
- package/dist/types/cms/index.d.ts.map +1 -0
- package/dist/types/cms/menu.d.ts +85 -0
- package/dist/types/cms/menu.d.ts.map +1 -0
- package/dist/types/dummy/dummy.d.ts +26 -0
- package/dist/types/dummy/dummy.d.ts.map +1 -0
- package/dist/types/dummy/index.d.ts +2 -0
- package/dist/types/dummy/index.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +3 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/language.d.ts +32 -0
- package/dist/types/i18n/language.d.ts.map +1 -0
- package/dist/types/i18n/translation.d.ts +26 -0
- package/dist/types/i18n/translation.d.ts.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/setting/index.d.ts +3 -0
- package/dist/types/setting/index.d.ts.map +1 -0
- package/dist/types/setting/metadata.d.ts +26 -0
- package/dist/types/setting/metadata.d.ts.map +1 -0
- package/dist/types/setting/setting.d.ts +41 -0
- package/dist/types/setting/setting.d.ts.map +1 -0
- package/dist/types/shared/aliases.d.ts +4 -0
- package/dist/types/shared/aliases.d.ts.map +1 -0
- package/dist/types/shared/base.d.ts +7 -0
- package/dist/types/shared/base.d.ts.map +1 -0
- package/dist/types/shared/object.d.ts +3 -0
- package/dist/types/shared/object.d.ts.map +1 -0
- package/dist/types/shared/preprocess.d.ts +3 -0
- package/dist/types/shared/preprocess.d.ts.map +1 -0
- package/dist/types/shared/profile.d.ts +40 -0
- package/dist/types/shared/profile.d.ts.map +1 -0
- package/dist/types/user/credential.d.ts +97 -0
- package/dist/types/user/credential.d.ts.map +1 -0
- package/dist/types/user/domain.d.ts +54 -0
- package/dist/types/user/domain.d.ts.map +1 -0
- package/dist/types/user/index.d.ts +9 -0
- package/dist/types/user/index.d.ts.map +1 -0
- package/dist/types/user/model.d.ts +142 -0
- package/dist/types/user/model.d.ts.map +1 -0
- package/dist/types/user/permission.d.ts +90 -0
- package/dist/types/user/permission.d.ts.map +1 -0
- package/dist/types/user/role.d.ts +111 -0
- package/dist/types/user/role.d.ts.map +1 -0
- package/dist/types/user/user-profile-assigned.d.ts +181 -0
- package/dist/types/user/user-profile-assigned.d.ts.map +1 -0
- package/dist/types/user/user-profile.d.ts +32 -0
- package/dist/types/user/user-profile.d.ts.map +1 -0
- package/dist/types/user/user.d.ts +270 -0
- package/dist/types/user/user.d.ts.map +1 -0
- package/dist/types/workflow/domain.d.ts +32 -0
- package/dist/types/workflow/domain.d.ts.map +1 -0
- package/dist/types/workflow/helpers.d.ts +117 -0
- package/dist/types/workflow/helpers.d.ts.map +1 -0
- package/dist/types/workflow/index.d.ts +8 -0
- package/dist/types/workflow/index.d.ts.map +1 -0
- package/dist/types/workflow/mcp-server.d.ts +67 -0
- package/dist/types/workflow/mcp-server.d.ts.map +1 -0
- package/dist/types/workflow/memory-definition.d.ts +35 -0
- package/dist/types/workflow/memory-definition.d.ts.map +1 -0
- package/dist/types/workflow/memory-record.d.ts +284 -0
- package/dist/types/workflow/memory-record.d.ts.map +1 -0
- package/dist/types/workflow/workflow-run.d.ts +375 -0
- package/dist/types/workflow/workflow-run.d.ts.map +1 -0
- package/dist/types/workflow/workflow-version.d.ts +179 -0
- package/dist/types/workflow/workflow-version.d.ts.map +1 -0
- package/dist/types/workflow/workflow.d.ts +366 -0
- package/dist/types/workflow/workflow.d.ts.map +1 -0
- package/package.json +59 -0
- package/src/analytics/index.ts +26 -0
- package/src/analytics/integration-health.ts +44 -0
- package/src/analytics/stats.ts +41 -0
- package/src/attachment/attachment.ts +75 -0
- package/src/attachment/index.ts +19 -0
- package/src/audit/audit-log.ts +42 -0
- package/src/audit/index.ts +12 -0
- package/src/channel/channel-metadata.ts +20 -0
- package/src/channel/index.ts +19 -0
- package/src/channel/source-full.ts +25 -0
- package/src/channel/source.ts +42 -0
- package/src/chat/attachment.ts +44 -0
- package/src/chat/button.ts +90 -0
- package/src/chat/index.ts +173 -0
- package/src/chat/label-group.ts +35 -0
- package/src/chat/label.ts +56 -0
- package/src/chat/message-contract.ts +370 -0
- package/src/chat/message.ts +164 -0
- package/src/chat/options.ts +130 -0
- package/src/chat/quick-reply.ts +41 -0
- package/src/chat/subscriber.ts +73 -0
- package/src/chat/thread.ts +55 -0
- package/src/cms/content-type.ts +26 -0
- package/src/cms/content.ts +48 -0
- package/src/cms/index.ts +33 -0
- package/src/cms/menu.ts +54 -0
- package/src/dummy/dummy.ts +30 -0
- package/src/dummy/index.ts +14 -0
- package/src/i18n/index.ts +23 -0
- package/src/i18n/language.ts +28 -0
- package/src/i18n/translation.ts +26 -0
- package/src/index.test.ts +1271 -0
- package/src/index.ts +27 -0
- package/src/setting/index.ts +25 -0
- package/src/setting/metadata.ts +26 -0
- package/src/setting/setting.ts +46 -0
- package/src/shared/aliases.ts +48 -0
- package/src/shared/base.ts +13 -0
- package/src/shared/object.ts +19 -0
- package/src/shared/preprocess.ts +14 -0
- package/src/shared/profile.ts +49 -0
- package/src/user/credential.ts +45 -0
- package/src/user/domain.ts +94 -0
- package/src/user/index.ts +78 -0
- package/src/user/model.ts +40 -0
- package/src/user/permission.ts +51 -0
- package/src/user/role.ts +43 -0
- package/src/user/user-profile-assigned.ts +70 -0
- package/src/user/user-profile.ts +21 -0
- package/src/user/user.ts +87 -0
- package/src/workflow/domain.ts +47 -0
- package/src/workflow/helpers.ts +40 -0
- package/src/workflow/index.ts +70 -0
- package/src/workflow/mcp-server.ts +64 -0
- package/src/workflow/memory-definition.ts +31 -0
- package/src/workflow/memory-record.ts +71 -0
- package/src/workflow/workflow-run.ts +156 -0
- package/src/workflow/workflow-version.ts +68 -0
- package/src/workflow/workflow.ts +163 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const workflowVersionStubSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
5
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
6
|
+
version: z.ZodCoercedNumber<unknown>;
|
|
7
|
+
definitionYml: z.ZodString;
|
|
8
|
+
checksum: z.ZodString;
|
|
9
|
+
message: z.ZodType<string | null, unknown, z.core.$ZodTypeInternals<string | null, unknown>>;
|
|
10
|
+
action: z.ZodType<import("./domain").WorkflowVersionAction | null, unknown, z.core.$ZodTypeInternals<import("./domain").WorkflowVersionAction | null, unknown>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const workflowVersionSchema: z.ZodType<{
|
|
13
|
+
id: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
version: number;
|
|
17
|
+
definitionYml: string;
|
|
18
|
+
checksum: string;
|
|
19
|
+
message: string | null;
|
|
20
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
21
|
+
parentVersion: string | null;
|
|
22
|
+
workflow: string;
|
|
23
|
+
createdBy: string | null;
|
|
24
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
version: number;
|
|
29
|
+
definitionYml: string;
|
|
30
|
+
checksum: string;
|
|
31
|
+
message: string | null;
|
|
32
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
33
|
+
parentVersion: string | null;
|
|
34
|
+
workflow: string;
|
|
35
|
+
createdBy: string | null;
|
|
36
|
+
}, unknown>>;
|
|
37
|
+
export declare const workflowVersionFullSchema: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
40
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
41
|
+
version: z.ZodCoercedNumber<unknown>;
|
|
42
|
+
definitionYml: z.ZodString;
|
|
43
|
+
checksum: z.ZodString;
|
|
44
|
+
message: z.ZodType<string | null, unknown, z.core.$ZodTypeInternals<string | null, unknown>>;
|
|
45
|
+
action: z.ZodType<import("./domain").WorkflowVersionAction | null, unknown, z.core.$ZodTypeInternals<import("./domain").WorkflowVersionAction | null, unknown>>;
|
|
46
|
+
parentVersion: z.ZodType<{
|
|
47
|
+
id: string;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
version: number;
|
|
51
|
+
definitionYml: string;
|
|
52
|
+
checksum: string;
|
|
53
|
+
message: string | null;
|
|
54
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
55
|
+
parentVersion: string | null;
|
|
56
|
+
workflow: string;
|
|
57
|
+
createdBy: string | null;
|
|
58
|
+
} | null, unknown, z.core.$ZodTypeInternals<{
|
|
59
|
+
id: string;
|
|
60
|
+
createdAt: Date;
|
|
61
|
+
updatedAt: Date;
|
|
62
|
+
version: number;
|
|
63
|
+
definitionYml: string;
|
|
64
|
+
checksum: string;
|
|
65
|
+
message: string | null;
|
|
66
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
67
|
+
parentVersion: string | null;
|
|
68
|
+
workflow: string;
|
|
69
|
+
createdBy: string | null;
|
|
70
|
+
} | null, unknown>>;
|
|
71
|
+
workflow: z.ZodLazy<z.ZodType<{
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
name: string;
|
|
76
|
+
description: string | null;
|
|
77
|
+
type: import("./domain").WorkflowType;
|
|
78
|
+
schedule: string | null;
|
|
79
|
+
inputSchema: any;
|
|
80
|
+
builtin: boolean;
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
zoom: number;
|
|
84
|
+
direction: import("./domain").DirectionType;
|
|
85
|
+
createdBy: string | null;
|
|
86
|
+
runAfterMs: number;
|
|
87
|
+
currentVersion?: string | null | undefined;
|
|
88
|
+
publishedVersion?: string | null | undefined;
|
|
89
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
90
|
+
id: string;
|
|
91
|
+
createdAt: Date;
|
|
92
|
+
updatedAt: Date;
|
|
93
|
+
name: string;
|
|
94
|
+
description: string | null;
|
|
95
|
+
type: import("./domain").WorkflowType;
|
|
96
|
+
schedule: string | null;
|
|
97
|
+
inputSchema: any;
|
|
98
|
+
builtin: boolean;
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
zoom: number;
|
|
102
|
+
direction: import("./domain").DirectionType;
|
|
103
|
+
createdBy: string | null;
|
|
104
|
+
runAfterMs: number;
|
|
105
|
+
currentVersion?: string | null | undefined;
|
|
106
|
+
publishedVersion?: string | null | undefined;
|
|
107
|
+
}, unknown>>>;
|
|
108
|
+
createdBy: z.ZodType<{
|
|
109
|
+
id: string;
|
|
110
|
+
createdAt: Date;
|
|
111
|
+
updatedAt: Date;
|
|
112
|
+
firstName: string;
|
|
113
|
+
lastName: string;
|
|
114
|
+
language: string | null;
|
|
115
|
+
timezone: number;
|
|
116
|
+
locale: string | null;
|
|
117
|
+
gender: string | null;
|
|
118
|
+
country: string | null;
|
|
119
|
+
foreignId: string | null;
|
|
120
|
+
assignedAt: Date | null;
|
|
121
|
+
lastvisit: Date | null;
|
|
122
|
+
retainedFrom: Date | null;
|
|
123
|
+
channel: {
|
|
124
|
+
name: string | null;
|
|
125
|
+
data?: Record<string, any> | null | undefined;
|
|
126
|
+
};
|
|
127
|
+
username: string;
|
|
128
|
+
email: string;
|
|
129
|
+
sendEmail: boolean;
|
|
130
|
+
state: boolean;
|
|
131
|
+
resetCount: number;
|
|
132
|
+
resetToken: string | null;
|
|
133
|
+
labels: string[];
|
|
134
|
+
assignedTo: string | null;
|
|
135
|
+
roles: string[];
|
|
136
|
+
avatar: string | null;
|
|
137
|
+
provider?: {
|
|
138
|
+
strategy: "local";
|
|
139
|
+
sub?: string | undefined;
|
|
140
|
+
} | undefined;
|
|
141
|
+
} | null, unknown, z.core.$ZodTypeInternals<{
|
|
142
|
+
id: string;
|
|
143
|
+
createdAt: Date;
|
|
144
|
+
updatedAt: Date;
|
|
145
|
+
firstName: string;
|
|
146
|
+
lastName: string;
|
|
147
|
+
language: string | null;
|
|
148
|
+
timezone: number;
|
|
149
|
+
locale: string | null;
|
|
150
|
+
gender: string | null;
|
|
151
|
+
country: string | null;
|
|
152
|
+
foreignId: string | null;
|
|
153
|
+
assignedAt: Date | null;
|
|
154
|
+
lastvisit: Date | null;
|
|
155
|
+
retainedFrom: Date | null;
|
|
156
|
+
channel: {
|
|
157
|
+
name: string | null;
|
|
158
|
+
data?: Record<string, any> | null | undefined;
|
|
159
|
+
};
|
|
160
|
+
username: string;
|
|
161
|
+
email: string;
|
|
162
|
+
sendEmail: boolean;
|
|
163
|
+
state: boolean;
|
|
164
|
+
resetCount: number;
|
|
165
|
+
resetToken: string | null;
|
|
166
|
+
labels: string[];
|
|
167
|
+
assignedTo: string | null;
|
|
168
|
+
roles: string[];
|
|
169
|
+
avatar: string | null;
|
|
170
|
+
provider?: {
|
|
171
|
+
strategy: "local";
|
|
172
|
+
sub?: string | undefined;
|
|
173
|
+
} | undefined;
|
|
174
|
+
} | null, unknown>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export type WorkflowVersionStub = z.infer<typeof workflowVersionStubSchema>;
|
|
177
|
+
export type WorkflowVersion = z.infer<typeof workflowVersionSchema>;
|
|
178
|
+
export type WorkflowVersionFull = z.infer<typeof workflowVersionFullSchema>;
|
|
179
|
+
//# sourceMappingURL=workflow-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-version.d.ts","sourceRoot":"","sources":["../../../src/workflow/workflow-version.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,eAAO,MAAM,yBAAyB;;;;;;;;;iBAAkC,CAAC;AAEzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;YAgBjC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYrC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type WorkflowDefinitionParser = (definitionYml: string) => unknown;
|
|
3
|
+
export declare const workflowStubSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
6
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
description: z.ZodType<string | null, unknown, z.core.$ZodTypeInternals<string | null, unknown>>;
|
|
9
|
+
type: z.ZodEnum<typeof import("./domain").WorkflowType>;
|
|
10
|
+
schedule: z.ZodType<string | null, unknown, z.core.$ZodTypeInternals<string | null, unknown>>;
|
|
11
|
+
inputSchema: z.ZodAny;
|
|
12
|
+
builtin: z.ZodCoercedBoolean<unknown>;
|
|
13
|
+
x: z.ZodCoercedNumber<unknown>;
|
|
14
|
+
y: z.ZodCoercedNumber<unknown>;
|
|
15
|
+
zoom: z.ZodCoercedNumber<unknown>;
|
|
16
|
+
direction: z.ZodEnum<typeof import("./domain").DirectionType>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const workflowSchema: z.ZodType<{
|
|
19
|
+
id: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string | null;
|
|
24
|
+
type: import("./domain").WorkflowType;
|
|
25
|
+
schedule: string | null;
|
|
26
|
+
inputSchema: any;
|
|
27
|
+
builtin: boolean;
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
zoom: number;
|
|
31
|
+
direction: import("./domain").DirectionType;
|
|
32
|
+
createdBy: string | null;
|
|
33
|
+
runAfterMs: number;
|
|
34
|
+
currentVersion?: string | null | undefined;
|
|
35
|
+
publishedVersion?: string | null | undefined;
|
|
36
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
37
|
+
id: string;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
name: string;
|
|
41
|
+
description: string | null;
|
|
42
|
+
type: import("./domain").WorkflowType;
|
|
43
|
+
schedule: string | null;
|
|
44
|
+
inputSchema: any;
|
|
45
|
+
builtin: boolean;
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
zoom: number;
|
|
49
|
+
direction: import("./domain").DirectionType;
|
|
50
|
+
createdBy: string | null;
|
|
51
|
+
runAfterMs: number;
|
|
52
|
+
currentVersion?: string | null | undefined;
|
|
53
|
+
publishedVersion?: string | null | undefined;
|
|
54
|
+
}, unknown>>;
|
|
55
|
+
export declare const createWorkflowFullSchema: (options?: {
|
|
56
|
+
parseDefinition?: WorkflowDefinitionParser;
|
|
57
|
+
}) => z.ZodType<{
|
|
58
|
+
id: string;
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
updatedAt: Date;
|
|
61
|
+
name: string;
|
|
62
|
+
description: string | null;
|
|
63
|
+
type: import("./domain").WorkflowType;
|
|
64
|
+
schedule: string | null;
|
|
65
|
+
inputSchema: any;
|
|
66
|
+
builtin: boolean;
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
zoom: number;
|
|
70
|
+
direction: import("./domain").DirectionType;
|
|
71
|
+
currentVersion: {
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
version: number;
|
|
76
|
+
definitionYml: string;
|
|
77
|
+
checksum: string;
|
|
78
|
+
message: string | null;
|
|
79
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
80
|
+
parentVersion: string | null;
|
|
81
|
+
workflow: string;
|
|
82
|
+
createdBy: string | null;
|
|
83
|
+
} | null;
|
|
84
|
+
publishedVersion: {
|
|
85
|
+
id: string;
|
|
86
|
+
createdAt: Date;
|
|
87
|
+
updatedAt: Date;
|
|
88
|
+
version: number;
|
|
89
|
+
definitionYml: string;
|
|
90
|
+
checksum: string;
|
|
91
|
+
message: string | null;
|
|
92
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
93
|
+
parentVersion: string | null;
|
|
94
|
+
workflow: string;
|
|
95
|
+
createdBy: string | null;
|
|
96
|
+
} | null;
|
|
97
|
+
createdBy: {
|
|
98
|
+
id: string;
|
|
99
|
+
createdAt: Date;
|
|
100
|
+
updatedAt: Date;
|
|
101
|
+
firstName: string;
|
|
102
|
+
lastName: string;
|
|
103
|
+
language: string | null;
|
|
104
|
+
timezone: number;
|
|
105
|
+
locale: string | null;
|
|
106
|
+
gender: string | null;
|
|
107
|
+
country: string | null;
|
|
108
|
+
foreignId: string | null;
|
|
109
|
+
assignedAt: Date | null;
|
|
110
|
+
lastvisit: Date | null;
|
|
111
|
+
retainedFrom: Date | null;
|
|
112
|
+
channel: {
|
|
113
|
+
name: string | null;
|
|
114
|
+
data?: Record<string, any> | null | undefined;
|
|
115
|
+
};
|
|
116
|
+
username: string;
|
|
117
|
+
email: string;
|
|
118
|
+
sendEmail: boolean;
|
|
119
|
+
state: boolean;
|
|
120
|
+
resetCount: number;
|
|
121
|
+
resetToken: string | null;
|
|
122
|
+
labels: string[];
|
|
123
|
+
assignedTo: string | null;
|
|
124
|
+
roles: string[];
|
|
125
|
+
avatar: string | null;
|
|
126
|
+
provider?: {
|
|
127
|
+
strategy: "local";
|
|
128
|
+
sub?: string | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
} | null;
|
|
131
|
+
definitionYml?: string | undefined;
|
|
132
|
+
definition?: any;
|
|
133
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
134
|
+
id: string;
|
|
135
|
+
createdAt: Date;
|
|
136
|
+
updatedAt: Date;
|
|
137
|
+
name: string;
|
|
138
|
+
description: string | null;
|
|
139
|
+
type: import("./domain").WorkflowType;
|
|
140
|
+
schedule: string | null;
|
|
141
|
+
inputSchema: any;
|
|
142
|
+
builtin: boolean;
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
zoom: number;
|
|
146
|
+
direction: import("./domain").DirectionType;
|
|
147
|
+
currentVersion: {
|
|
148
|
+
id: string;
|
|
149
|
+
createdAt: Date;
|
|
150
|
+
updatedAt: Date;
|
|
151
|
+
version: number;
|
|
152
|
+
definitionYml: string;
|
|
153
|
+
checksum: string;
|
|
154
|
+
message: string | null;
|
|
155
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
156
|
+
parentVersion: string | null;
|
|
157
|
+
workflow: string;
|
|
158
|
+
createdBy: string | null;
|
|
159
|
+
} | null;
|
|
160
|
+
publishedVersion: {
|
|
161
|
+
id: string;
|
|
162
|
+
createdAt: Date;
|
|
163
|
+
updatedAt: Date;
|
|
164
|
+
version: number;
|
|
165
|
+
definitionYml: string;
|
|
166
|
+
checksum: string;
|
|
167
|
+
message: string | null;
|
|
168
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
169
|
+
parentVersion: string | null;
|
|
170
|
+
workflow: string;
|
|
171
|
+
createdBy: string | null;
|
|
172
|
+
} | null;
|
|
173
|
+
createdBy: {
|
|
174
|
+
id: string;
|
|
175
|
+
createdAt: Date;
|
|
176
|
+
updatedAt: Date;
|
|
177
|
+
firstName: string;
|
|
178
|
+
lastName: string;
|
|
179
|
+
language: string | null;
|
|
180
|
+
timezone: number;
|
|
181
|
+
locale: string | null;
|
|
182
|
+
gender: string | null;
|
|
183
|
+
country: string | null;
|
|
184
|
+
foreignId: string | null;
|
|
185
|
+
assignedAt: Date | null;
|
|
186
|
+
lastvisit: Date | null;
|
|
187
|
+
retainedFrom: Date | null;
|
|
188
|
+
channel: {
|
|
189
|
+
name: string | null;
|
|
190
|
+
data?: Record<string, any> | null | undefined;
|
|
191
|
+
};
|
|
192
|
+
username: string;
|
|
193
|
+
email: string;
|
|
194
|
+
sendEmail: boolean;
|
|
195
|
+
state: boolean;
|
|
196
|
+
resetCount: number;
|
|
197
|
+
resetToken: string | null;
|
|
198
|
+
labels: string[];
|
|
199
|
+
assignedTo: string | null;
|
|
200
|
+
roles: string[];
|
|
201
|
+
avatar: string | null;
|
|
202
|
+
provider?: {
|
|
203
|
+
strategy: "local";
|
|
204
|
+
sub?: string | undefined;
|
|
205
|
+
} | undefined;
|
|
206
|
+
} | null;
|
|
207
|
+
definitionYml?: string | undefined;
|
|
208
|
+
definition?: any;
|
|
209
|
+
}, unknown>>;
|
|
210
|
+
export declare const workflowFullSchema: z.ZodType<{
|
|
211
|
+
id: string;
|
|
212
|
+
createdAt: Date;
|
|
213
|
+
updatedAt: Date;
|
|
214
|
+
name: string;
|
|
215
|
+
description: string | null;
|
|
216
|
+
type: import("./domain").WorkflowType;
|
|
217
|
+
schedule: string | null;
|
|
218
|
+
inputSchema: any;
|
|
219
|
+
builtin: boolean;
|
|
220
|
+
x: number;
|
|
221
|
+
y: number;
|
|
222
|
+
zoom: number;
|
|
223
|
+
direction: import("./domain").DirectionType;
|
|
224
|
+
currentVersion: {
|
|
225
|
+
id: string;
|
|
226
|
+
createdAt: Date;
|
|
227
|
+
updatedAt: Date;
|
|
228
|
+
version: number;
|
|
229
|
+
definitionYml: string;
|
|
230
|
+
checksum: string;
|
|
231
|
+
message: string | null;
|
|
232
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
233
|
+
parentVersion: string | null;
|
|
234
|
+
workflow: string;
|
|
235
|
+
createdBy: string | null;
|
|
236
|
+
} | null;
|
|
237
|
+
publishedVersion: {
|
|
238
|
+
id: string;
|
|
239
|
+
createdAt: Date;
|
|
240
|
+
updatedAt: Date;
|
|
241
|
+
version: number;
|
|
242
|
+
definitionYml: string;
|
|
243
|
+
checksum: string;
|
|
244
|
+
message: string | null;
|
|
245
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
246
|
+
parentVersion: string | null;
|
|
247
|
+
workflow: string;
|
|
248
|
+
createdBy: string | null;
|
|
249
|
+
} | null;
|
|
250
|
+
createdBy: {
|
|
251
|
+
id: string;
|
|
252
|
+
createdAt: Date;
|
|
253
|
+
updatedAt: Date;
|
|
254
|
+
firstName: string;
|
|
255
|
+
lastName: string;
|
|
256
|
+
language: string | null;
|
|
257
|
+
timezone: number;
|
|
258
|
+
locale: string | null;
|
|
259
|
+
gender: string | null;
|
|
260
|
+
country: string | null;
|
|
261
|
+
foreignId: string | null;
|
|
262
|
+
assignedAt: Date | null;
|
|
263
|
+
lastvisit: Date | null;
|
|
264
|
+
retainedFrom: Date | null;
|
|
265
|
+
channel: {
|
|
266
|
+
name: string | null;
|
|
267
|
+
data?: Record<string, any> | null | undefined;
|
|
268
|
+
};
|
|
269
|
+
username: string;
|
|
270
|
+
email: string;
|
|
271
|
+
sendEmail: boolean;
|
|
272
|
+
state: boolean;
|
|
273
|
+
resetCount: number;
|
|
274
|
+
resetToken: string | null;
|
|
275
|
+
labels: string[];
|
|
276
|
+
assignedTo: string | null;
|
|
277
|
+
roles: string[];
|
|
278
|
+
avatar: string | null;
|
|
279
|
+
provider?: {
|
|
280
|
+
strategy: "local";
|
|
281
|
+
sub?: string | undefined;
|
|
282
|
+
} | undefined;
|
|
283
|
+
} | null;
|
|
284
|
+
definitionYml?: string | undefined;
|
|
285
|
+
definition?: any;
|
|
286
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
287
|
+
id: string;
|
|
288
|
+
createdAt: Date;
|
|
289
|
+
updatedAt: Date;
|
|
290
|
+
name: string;
|
|
291
|
+
description: string | null;
|
|
292
|
+
type: import("./domain").WorkflowType;
|
|
293
|
+
schedule: string | null;
|
|
294
|
+
inputSchema: any;
|
|
295
|
+
builtin: boolean;
|
|
296
|
+
x: number;
|
|
297
|
+
y: number;
|
|
298
|
+
zoom: number;
|
|
299
|
+
direction: import("./domain").DirectionType;
|
|
300
|
+
currentVersion: {
|
|
301
|
+
id: string;
|
|
302
|
+
createdAt: Date;
|
|
303
|
+
updatedAt: Date;
|
|
304
|
+
version: number;
|
|
305
|
+
definitionYml: string;
|
|
306
|
+
checksum: string;
|
|
307
|
+
message: string | null;
|
|
308
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
309
|
+
parentVersion: string | null;
|
|
310
|
+
workflow: string;
|
|
311
|
+
createdBy: string | null;
|
|
312
|
+
} | null;
|
|
313
|
+
publishedVersion: {
|
|
314
|
+
id: string;
|
|
315
|
+
createdAt: Date;
|
|
316
|
+
updatedAt: Date;
|
|
317
|
+
version: number;
|
|
318
|
+
definitionYml: string;
|
|
319
|
+
checksum: string;
|
|
320
|
+
message: string | null;
|
|
321
|
+
action: import("./domain").WorkflowVersionAction | null;
|
|
322
|
+
parentVersion: string | null;
|
|
323
|
+
workflow: string;
|
|
324
|
+
createdBy: string | null;
|
|
325
|
+
} | null;
|
|
326
|
+
createdBy: {
|
|
327
|
+
id: string;
|
|
328
|
+
createdAt: Date;
|
|
329
|
+
updatedAt: Date;
|
|
330
|
+
firstName: string;
|
|
331
|
+
lastName: string;
|
|
332
|
+
language: string | null;
|
|
333
|
+
timezone: number;
|
|
334
|
+
locale: string | null;
|
|
335
|
+
gender: string | null;
|
|
336
|
+
country: string | null;
|
|
337
|
+
foreignId: string | null;
|
|
338
|
+
assignedAt: Date | null;
|
|
339
|
+
lastvisit: Date | null;
|
|
340
|
+
retainedFrom: Date | null;
|
|
341
|
+
channel: {
|
|
342
|
+
name: string | null;
|
|
343
|
+
data?: Record<string, any> | null | undefined;
|
|
344
|
+
};
|
|
345
|
+
username: string;
|
|
346
|
+
email: string;
|
|
347
|
+
sendEmail: boolean;
|
|
348
|
+
state: boolean;
|
|
349
|
+
resetCount: number;
|
|
350
|
+
resetToken: string | null;
|
|
351
|
+
labels: string[];
|
|
352
|
+
assignedTo: string | null;
|
|
353
|
+
roles: string[];
|
|
354
|
+
avatar: string | null;
|
|
355
|
+
provider?: {
|
|
356
|
+
strategy: "local";
|
|
357
|
+
sub?: string | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
} | null;
|
|
360
|
+
definitionYml?: string | undefined;
|
|
361
|
+
definition?: any;
|
|
362
|
+
}, unknown>>;
|
|
363
|
+
export type WorkflowStub = z.infer<typeof workflowStubSchema>;
|
|
364
|
+
export type Workflow = z.infer<typeof workflowSchema>;
|
|
365
|
+
export type WorkflowFull = z.infer<typeof workflowFullSchema>;
|
|
366
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/workflow/workflow.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,MAAM,MAAM,wBAAwB,GAAG,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC;AAuG1E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAA2B,CAAC;AAE3D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsB1B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,UAAU;IACjD,eAAe,CAAC,EAAE,wBAAwB,CAAC;CAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAKA,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAA6B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hexabot-ai/types",
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
|
+
"description": "Shared zod schemas and inferred entity types for Hexabot.",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js",
|
|
13
|
+
"default": "./dist/esm/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"zod": "^4.3.6"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/jest": "^30.0.0",
|
|
25
|
+
"@types/node": "^22.7.4",
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
27
|
+
"@typescript-eslint/parser": "^8.46.0",
|
|
28
|
+
"eslint": "^9.37.0",
|
|
29
|
+
"eslint-config-prettier": "^10.1.8",
|
|
30
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
31
|
+
"eslint-plugin-header": "^3.1.1",
|
|
32
|
+
"eslint-plugin-import": "^2.32.0",
|
|
33
|
+
"jest": "^30.2.0",
|
|
34
|
+
"lint-staged": "^15.3.0",
|
|
35
|
+
"prettier": "^3.6.2",
|
|
36
|
+
"ts-jest": "^29.4.5",
|
|
37
|
+
"typescript": "^5.8.3"
|
|
38
|
+
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"*.{ts}": "eslint --fix --config eslint.config-staged.cjs"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20.18.1"
|
|
44
|
+
},
|
|
45
|
+
"license": "FCL-1.0-ALv2",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "pnpm run build:cjs && pnpm run build:esm",
|
|
48
|
+
"build:cjs": "tsc -p tsconfig.build.cjs.json",
|
|
49
|
+
"build:esm": "tsc -p tsconfig.build.esm.json",
|
|
50
|
+
"dev": "pnpm exec concurrently -k -n cjs,esm \"pnpm run build:cjs:watch\" \"pnpm run build:esm:watch\"",
|
|
51
|
+
"build:watch": "tsc -p tsconfig.json --watch",
|
|
52
|
+
"lint": "eslint \"src/**/*.ts\" \"jest.config.ts\"",
|
|
53
|
+
"lint:fix": "eslint \"src/**/*.ts\" \"jest.config.ts\" --fix",
|
|
54
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
55
|
+
"test": "jest --config jest.config.ts",
|
|
56
|
+
"build:cjs:watch": "tsc -p tsconfig.build.cjs.json --watch",
|
|
57
|
+
"build:esm:watch": "tsc -p tsconfig.build.esm.json --watch"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
integrationHealthItemSchema,
|
|
9
|
+
integrationHealthKindSchema,
|
|
10
|
+
integrationHealthResponseSchema,
|
|
11
|
+
integrationHealthStatusSchema,
|
|
12
|
+
type IntegrationHealthItem,
|
|
13
|
+
type IntegrationHealthKind,
|
|
14
|
+
type IntegrationHealthResponse,
|
|
15
|
+
type IntegrationHealthStatus,
|
|
16
|
+
} from "./integration-health";
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
StatsType,
|
|
20
|
+
statsFullSchema,
|
|
21
|
+
statsSchema,
|
|
22
|
+
statsStubSchema,
|
|
23
|
+
type Stats,
|
|
24
|
+
type StatsFull,
|
|
25
|
+
type StatsStub,
|
|
26
|
+
} from "./stats";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
export const integrationHealthStatusSchema = z.enum([
|
|
10
|
+
"healthy",
|
|
11
|
+
"warning",
|
|
12
|
+
"unhealthy",
|
|
13
|
+
"disabled",
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
export const integrationHealthKindSchema = z.enum(["channel", "service"]);
|
|
17
|
+
|
|
18
|
+
export const integrationHealthItemSchema = z.object({
|
|
19
|
+
id: z.string(),
|
|
20
|
+
kind: integrationHealthKindSchema,
|
|
21
|
+
name: z.string(),
|
|
22
|
+
status: integrationHealthStatusSchema,
|
|
23
|
+
checkedAt: z.string().datetime({ offset: true }),
|
|
24
|
+
reason: z.string().optional(),
|
|
25
|
+
message: z.string().optional(),
|
|
26
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const integrationHealthResponseSchema = z.object({
|
|
30
|
+
checkedAt: z.string().datetime({ offset: true }),
|
|
31
|
+
integrations: z.array(integrationHealthItemSchema),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type IntegrationHealthStatus = z.infer<
|
|
35
|
+
typeof integrationHealthStatusSchema
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export type IntegrationHealthKind = z.infer<typeof integrationHealthKindSchema>;
|
|
39
|
+
|
|
40
|
+
export type IntegrationHealthItem = z.infer<typeof integrationHealthItemSchema>;
|
|
41
|
+
|
|
42
|
+
export type IntegrationHealthResponse = z.infer<
|
|
43
|
+
typeof integrationHealthResponseSchema
|
|
44
|
+
>;
|