@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,119 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { buttonSchema } from "./button";
|
|
8
|
+
export const contentOptionsSchema = z.object({
|
|
9
|
+
display: z.enum(["list", "carousel"]).meta({
|
|
10
|
+
title: "Display",
|
|
11
|
+
}),
|
|
12
|
+
contentType: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.meta({
|
|
16
|
+
title: "Content Type",
|
|
17
|
+
"ui:widget": "AutoCompleteWidget",
|
|
18
|
+
"ui:options": {
|
|
19
|
+
entity: "ContentType",
|
|
20
|
+
valueKey: "id",
|
|
21
|
+
labelKey: "name",
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
fields: z
|
|
25
|
+
.object({
|
|
26
|
+
title: z.string().meta({
|
|
27
|
+
title: "Title",
|
|
28
|
+
"ui:field": "AutoCompleteField",
|
|
29
|
+
"ui:options": {
|
|
30
|
+
entity: "ContentType",
|
|
31
|
+
idFormPath: "content.contentType",
|
|
32
|
+
nestedArrayField: "schema.properties",
|
|
33
|
+
nestedArrayItemField: "type",
|
|
34
|
+
nestedArrayItemValue: "string",
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
subtitle: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.meta({
|
|
41
|
+
title: "Subtitle",
|
|
42
|
+
"ui:field": "AutoCompleteField",
|
|
43
|
+
"ui:options": {
|
|
44
|
+
entity: "ContentType",
|
|
45
|
+
idFormPath: "content.contentType",
|
|
46
|
+
nestedArrayField: "schema.properties",
|
|
47
|
+
nestedArrayItemField: "type",
|
|
48
|
+
nestedArrayItemValue: "string",
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
image_url: z
|
|
52
|
+
.string()
|
|
53
|
+
.optional()
|
|
54
|
+
.meta({
|
|
55
|
+
title: "Image URL Field",
|
|
56
|
+
"ui:field": "AutoCompleteField",
|
|
57
|
+
"ui:options": {
|
|
58
|
+
entity: "ContentType",
|
|
59
|
+
idFormPath: "content.contentType",
|
|
60
|
+
nestedArrayField: "schema.properties",
|
|
61
|
+
nestedArrayItemField: "type",
|
|
62
|
+
nestedArrayItemValue: "file",
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
url: z
|
|
66
|
+
.string()
|
|
67
|
+
.optional()
|
|
68
|
+
.meta({
|
|
69
|
+
title: "URL",
|
|
70
|
+
"ui:field": "AutoCompleteField",
|
|
71
|
+
"ui:options": {
|
|
72
|
+
showOnlyWhenWebUrlButton: true,
|
|
73
|
+
entity: "ContentType",
|
|
74
|
+
valueKey: "name",
|
|
75
|
+
idFormPath: "content.contentType",
|
|
76
|
+
nestedArrayField: "schema.properties",
|
|
77
|
+
nestedArrayItemField: "type",
|
|
78
|
+
nestedArrayItemValue: "uri",
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
action_title: z
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.meta({
|
|
85
|
+
title: "Action Title",
|
|
86
|
+
"ui:options": {
|
|
87
|
+
showOnlyWhenPostbackButton: true,
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
action_payload: z
|
|
91
|
+
.string()
|
|
92
|
+
.optional()
|
|
93
|
+
.meta({
|
|
94
|
+
title: "Action Payload",
|
|
95
|
+
"ui:options": {
|
|
96
|
+
showOnlyWhenPostbackButton: true,
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
99
|
+
})
|
|
100
|
+
.meta({ title: "Fields" }),
|
|
101
|
+
buttons: z.array(buttonSchema).meta({ title: "Buttons" }),
|
|
102
|
+
limit: z.number().finite(),
|
|
103
|
+
query: z.any().optional(),
|
|
104
|
+
top_element_style: z.enum(["large", "compact"]).optional().meta({
|
|
105
|
+
title: "Top Element Style",
|
|
106
|
+
}),
|
|
107
|
+
});
|
|
108
|
+
export const fallbackOptionsSchema = z.object({
|
|
109
|
+
active: z.boolean(),
|
|
110
|
+
message: z.array(z.string()),
|
|
111
|
+
max_attempts: z.number().finite(),
|
|
112
|
+
});
|
|
113
|
+
export const ActionOptionsSchema = z.object({
|
|
114
|
+
typing: z.union([z.boolean(), z.int().nonnegative()]).optional(),
|
|
115
|
+
content: contentOptionsSchema.optional(),
|
|
116
|
+
fallback: fallbackOptionsSchema.optional(),
|
|
117
|
+
assignTo: z.string().optional(),
|
|
118
|
+
effects: z.array(z.string()).optional(),
|
|
119
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { attachmentPayloadSchema } from "./attachment";
|
|
8
|
+
import { PayloadType } from "./button";
|
|
9
|
+
export const coordinatesSchema = z.object({
|
|
10
|
+
lat: z.number(),
|
|
11
|
+
lon: z.number(),
|
|
12
|
+
});
|
|
13
|
+
export const payloadSchema = z.discriminatedUnion("type", [
|
|
14
|
+
z.object({
|
|
15
|
+
type: z.literal(PayloadType.location),
|
|
16
|
+
coordinates: coordinatesSchema,
|
|
17
|
+
}),
|
|
18
|
+
z.object({
|
|
19
|
+
type: z.literal(PayloadType.attachment),
|
|
20
|
+
attachment: attachmentPayloadSchema,
|
|
21
|
+
}),
|
|
22
|
+
]);
|
|
23
|
+
export const stdQuickReplySchema = z.object({
|
|
24
|
+
title: z.string().meta({
|
|
25
|
+
title: "Title",
|
|
26
|
+
description: "The label shown to the user.",
|
|
27
|
+
}),
|
|
28
|
+
payload: z.string().meta({
|
|
29
|
+
title: "Payload",
|
|
30
|
+
description: "The value sent back when the quick reply is selected.",
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { attachmentSchema } from "../attachment/attachment";
|
|
8
|
+
import { sourceSchema } from "../channel/source";
|
|
9
|
+
import { asId, asIdArray, withAliases } from "../shared/aliases";
|
|
10
|
+
import { preprocess } from "../shared/preprocess";
|
|
11
|
+
import { subscriberBaseSchema } from "../shared/profile";
|
|
12
|
+
import { userProfileAssignedSchema } from "../user/user-profile-assigned";
|
|
13
|
+
import { labelSchema } from "./label";
|
|
14
|
+
const subscriberAliasMap = {
|
|
15
|
+
labelIds: "labels",
|
|
16
|
+
assignedToId: "assignedTo",
|
|
17
|
+
avatarId: "avatar",
|
|
18
|
+
sourceId: "source",
|
|
19
|
+
};
|
|
20
|
+
const subscriberObjectSchema = subscriberBaseSchema.extend({
|
|
21
|
+
labels: preprocess((value) => (Array.isArray(value) ? asIdArray(value) : []), z.array(z.string())),
|
|
22
|
+
assignedTo: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
|
|
23
|
+
avatar: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
|
|
24
|
+
source: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
|
|
25
|
+
});
|
|
26
|
+
export const subscriberStubSchema = subscriberBaseSchema;
|
|
27
|
+
export const subscriberSchema = preprocess((value) => withAliases(value, subscriberAliasMap), subscriberObjectSchema);
|
|
28
|
+
export const subscriberFullSchema = subscriberBaseSchema.extend({
|
|
29
|
+
labels: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => labelSchema))),
|
|
30
|
+
assignedTo: preprocess((value) => (value == null ? null : value), userProfileAssignedSchema.nullable()),
|
|
31
|
+
avatar: preprocess((value) => (value == null ? null : value), attachmentSchema.nullable()),
|
|
32
|
+
source: preprocess((value) => (value == null ? null : value), sourceSchema.nullable()),
|
|
33
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { sourceSchema } from "../channel/source";
|
|
8
|
+
import { asId, withAliases } from "../shared/aliases";
|
|
9
|
+
import { baseStubSchema } from "../shared/base";
|
|
10
|
+
import { preprocess } from "../shared/preprocess";
|
|
11
|
+
import { subscriberSchema } from "./subscriber";
|
|
12
|
+
const nullableOptionalDateSchema = z.coerce.date().nullable().optional();
|
|
13
|
+
const nullableOptionalStringSchema = z.string().nullable().optional();
|
|
14
|
+
const threadAliasMap = {
|
|
15
|
+
subscriberId: "subscriber",
|
|
16
|
+
sourceId: "source",
|
|
17
|
+
};
|
|
18
|
+
const threadStubObjectSchema = baseStubSchema.extend({
|
|
19
|
+
status: z.enum(["open", "closed"]),
|
|
20
|
+
lastMessageAt: nullableOptionalDateSchema,
|
|
21
|
+
closedAt: nullableOptionalDateSchema,
|
|
22
|
+
closeReason: z.enum(["manual", "inactivity"]).nullable().optional(),
|
|
23
|
+
title: nullableOptionalStringSchema,
|
|
24
|
+
});
|
|
25
|
+
export const threadStubSchema = threadStubObjectSchema;
|
|
26
|
+
export const threadSchema = preprocess((value) => withAliases(value, threadAliasMap), threadStubObjectSchema.extend({
|
|
27
|
+
subscriber: preprocess((value) => (value == null ? null : asId(value)), z.string()),
|
|
28
|
+
source: preprocess((value) => (value == null ? null : asId(value)), z.string()),
|
|
29
|
+
}));
|
|
30
|
+
export const threadFullSchema = threadStubObjectSchema.extend({
|
|
31
|
+
subscriber: subscriberSchema,
|
|
32
|
+
source: sourceSchema,
|
|
33
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
const contentTypeObjectSchema = baseStubSchema.extend({
|
|
9
|
+
name: z.string(),
|
|
10
|
+
schema: z.any(),
|
|
11
|
+
});
|
|
12
|
+
export const contentTypeStubSchema = contentTypeObjectSchema;
|
|
13
|
+
export const contentTypeSchema = contentTypeObjectSchema;
|
|
14
|
+
export const contentTypeFullSchema = contentTypeObjectSchema;
|
|
@@ -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
|
+
import { z } from "zod";
|
|
7
|
+
import { asId, withAliases } from "../shared/aliases";
|
|
8
|
+
import { baseStubSchema } from "../shared/base";
|
|
9
|
+
import { preprocess } from "../shared/preprocess";
|
|
10
|
+
import { contentTypeSchema } from "./content-type";
|
|
11
|
+
const contentAliasMap = {
|
|
12
|
+
contentTypeId: "contentType",
|
|
13
|
+
};
|
|
14
|
+
const contentStubObjectSchema = baseStubSchema.extend({
|
|
15
|
+
title: z.string(),
|
|
16
|
+
status: z.coerce.boolean(),
|
|
17
|
+
properties: preprocess((value) => (value == null ? null : value), z.record(z.string(), z.unknown()).nullable()),
|
|
18
|
+
searchText: z.string(),
|
|
19
|
+
});
|
|
20
|
+
export const contentStubSchema = contentStubObjectSchema;
|
|
21
|
+
export const contentSchema = preprocess((value) => withAliases(value, contentAliasMap), contentStubObjectSchema.extend({
|
|
22
|
+
contentType: preprocess((value) => (value == null ? null : asId(value)), z.string()),
|
|
23
|
+
}));
|
|
24
|
+
export const contentFullSchema = contentStubObjectSchema.extend({
|
|
25
|
+
contentType: contentTypeSchema,
|
|
26
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export { contentTypeFullSchema, contentTypeSchema, contentTypeStubSchema, } from "./content-type";
|
|
7
|
+
export { contentFullSchema, contentSchema, contentStubSchema, } from "./content";
|
|
8
|
+
export { MenuType, menuFullSchema, menuSchema, menuStubSchema, } from "./menu";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { asId, withAliases } from "../shared/aliases";
|
|
8
|
+
import { baseStubSchema } from "../shared/base";
|
|
9
|
+
import { preprocess } from "../shared/preprocess";
|
|
10
|
+
export var MenuType;
|
|
11
|
+
(function (MenuType) {
|
|
12
|
+
MenuType["web_url"] = "web_url";
|
|
13
|
+
MenuType["postback"] = "postback";
|
|
14
|
+
MenuType["nested"] = "nested";
|
|
15
|
+
})(MenuType || (MenuType = {}));
|
|
16
|
+
const menuTypeSchema = z.enum(MenuType);
|
|
17
|
+
const menuAliasMap = {
|
|
18
|
+
parentId: "parent",
|
|
19
|
+
};
|
|
20
|
+
const menuStubObjectSchema = baseStubSchema.extend({
|
|
21
|
+
title: z.string(),
|
|
22
|
+
type: menuTypeSchema,
|
|
23
|
+
payload: z.string().nullable().optional(),
|
|
24
|
+
url: z.string().nullable().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const menuStubSchema = menuStubObjectSchema;
|
|
27
|
+
export const menuSchema = preprocess((value) => withAliases(value, menuAliasMap), menuStubObjectSchema.extend({
|
|
28
|
+
parent: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()).optional(),
|
|
29
|
+
}));
|
|
30
|
+
export const menuFullSchema = menuStubObjectSchema.extend({
|
|
31
|
+
parent: menuSchema.nullable().optional(),
|
|
32
|
+
children: preprocess((value) => (Array.isArray(value) ? value : []), z.array(menuSchema)).optional(),
|
|
33
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
import { preprocess } from "../shared/preprocess";
|
|
9
|
+
const dummyObjectSchema = baseStubSchema.extend({
|
|
10
|
+
dummy: z.string(),
|
|
11
|
+
dynamicField: preprocess((value) => (value == null ? undefined : value), z.record(z.string(), z.unknown()).optional()).optional(),
|
|
12
|
+
});
|
|
13
|
+
export const dummyStubSchema = dummyObjectSchema;
|
|
14
|
+
export const dummySchema = dummyObjectSchema;
|
|
15
|
+
export const dummyFullSchema = dummyObjectSchema;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export { languageFullSchema, languageSchema, languageStubSchema, } from "./language";
|
|
7
|
+
export { translationFullSchema, translationSchema, translationStubSchema, } from "./translation";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
const languageObjectSchema = baseStubSchema.extend({
|
|
9
|
+
title: z.string(),
|
|
10
|
+
code: z.string(),
|
|
11
|
+
isDefault: z.coerce.boolean(),
|
|
12
|
+
isRTL: z.coerce.boolean(),
|
|
13
|
+
});
|
|
14
|
+
export const languageStubSchema = languageObjectSchema;
|
|
15
|
+
export const languageSchema = languageObjectSchema;
|
|
16
|
+
export const languageFullSchema = languageObjectSchema;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
const translationObjectSchema = baseStubSchema.extend({
|
|
9
|
+
str: z.string(),
|
|
10
|
+
translations: z.record(z.string(), z.string()),
|
|
11
|
+
});
|
|
12
|
+
export const translationStubSchema = translationObjectSchema;
|
|
13
|
+
export const translationSchema = translationObjectSchema;
|
|
14
|
+
export const translationFullSchema = translationObjectSchema;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./attachment";
|
|
7
|
+
export * from "./analytics";
|
|
8
|
+
export * from "./audit";
|
|
9
|
+
export * from "./channel";
|
|
10
|
+
export * from "./chat";
|
|
11
|
+
export * from "./cms";
|
|
12
|
+
export * from "./i18n";
|
|
13
|
+
export * from "./setting";
|
|
14
|
+
export * from "./user";
|
|
15
|
+
export * from "./workflow";
|
|
16
|
+
export * from "./dummy";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export { FieldType, settingFullSchema, settingSchema, settingStubSchema, settingValueSchema, } from "./setting";
|
|
7
|
+
export { metadataFullSchema, metadataSchema, metadataStubSchema, } from "./metadata";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
const metadataObjectSchema = baseStubSchema.extend({
|
|
9
|
+
name: z.string(),
|
|
10
|
+
value: z.any(),
|
|
11
|
+
});
|
|
12
|
+
export const metadataStubSchema = metadataObjectSchema;
|
|
13
|
+
export const metadataSchema = metadataObjectSchema;
|
|
14
|
+
export const metadataFullSchema = metadataObjectSchema;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "../shared/base";
|
|
8
|
+
export const settingValueSchema = z.union([
|
|
9
|
+
z.null(),
|
|
10
|
+
z.string(),
|
|
11
|
+
z.number(),
|
|
12
|
+
z.boolean(),
|
|
13
|
+
z.array(z.string()),
|
|
14
|
+
z.record(z.string(), z.unknown()),
|
|
15
|
+
]);
|
|
16
|
+
const settingObjectSchema = baseStubSchema.extend({
|
|
17
|
+
group: z.string(),
|
|
18
|
+
subgroup: z.string().nullable().optional(),
|
|
19
|
+
label: z.string(),
|
|
20
|
+
value: settingValueSchema,
|
|
21
|
+
});
|
|
22
|
+
export const settingStubSchema = settingObjectSchema;
|
|
23
|
+
export const settingSchema = settingObjectSchema;
|
|
24
|
+
export const settingFullSchema = settingObjectSchema;
|
|
25
|
+
export var FieldType;
|
|
26
|
+
(function (FieldType) {
|
|
27
|
+
FieldType["text"] = "text";
|
|
28
|
+
FieldType["url"] = "url";
|
|
29
|
+
FieldType["textarea"] = "textarea";
|
|
30
|
+
FieldType["checkbox"] = "checkbox";
|
|
31
|
+
FieldType["file"] = "file";
|
|
32
|
+
FieldType["html"] = "html";
|
|
33
|
+
})(FieldType || (FieldType = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { cloneWithPrototype, toRecord } from "./object";
|
|
7
|
+
export const withAliases = (value, aliases) => {
|
|
8
|
+
const record = toRecord(value);
|
|
9
|
+
if (!record) {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
const next = cloneWithPrototype(record);
|
|
13
|
+
for (const [from, to] of Object.entries(aliases)) {
|
|
14
|
+
if (next[to] === undefined && next[from] !== undefined) {
|
|
15
|
+
next[to] = next[from];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return next;
|
|
19
|
+
};
|
|
20
|
+
export const asId = (value) => {
|
|
21
|
+
if (value == null || typeof value === "string") {
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
const record = toRecord(value);
|
|
25
|
+
if (!record) {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
return typeof record.id === "string" ? record.id : value;
|
|
29
|
+
};
|
|
30
|
+
export const asIdArray = (value) => {
|
|
31
|
+
if (!Array.isArray(value)) {
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
return value.map((entry) => asId(entry));
|
|
35
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
export const baseStubSchema = z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
createdAt: z.coerce.date(),
|
|
10
|
+
updatedAt: z.coerce.date(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export const toRecord = (value) => {
|
|
7
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
export const cloneWithPrototype = (value) => {
|
|
13
|
+
return Object.assign(Object.create(Object.getPrototypeOf(value)), value);
|
|
14
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { baseStubSchema } from "./base";
|
|
8
|
+
import { preprocess } from "./preprocess";
|
|
9
|
+
export const nullableStringSchema = preprocess((value) => (value == null ? null : value), z.string().nullable());
|
|
10
|
+
export const nullableDateSchema = preprocess((value) => (value == null ? null : value), z.coerce.date().nullable());
|
|
11
|
+
export const userProfileBaseSchema = baseStubSchema.extend({
|
|
12
|
+
firstName: z.string(),
|
|
13
|
+
lastName: z.string(),
|
|
14
|
+
language: nullableStringSchema,
|
|
15
|
+
timezone: z.coerce.number().default(0),
|
|
16
|
+
});
|
|
17
|
+
export const subscriberChannelSchema = z.object({
|
|
18
|
+
name: nullableStringSchema,
|
|
19
|
+
data: preprocess((value) => (value == null ? null : value), z.record(z.string(), z.any()).nullable()).optional(),
|
|
20
|
+
});
|
|
21
|
+
export const subscriberBaseSchema = userProfileBaseSchema.extend({
|
|
22
|
+
locale: nullableStringSchema,
|
|
23
|
+
gender: nullableStringSchema,
|
|
24
|
+
country: nullableStringSchema,
|
|
25
|
+
foreignId: nullableStringSchema,
|
|
26
|
+
assignedAt: nullableDateSchema,
|
|
27
|
+
lastvisit: nullableDateSchema,
|
|
28
|
+
retainedFrom: nullableDateSchema,
|
|
29
|
+
channel: preprocess((value) => value ?? { name: null, data: null }, subscriberChannelSchema),
|
|
30
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { asId, withAliases } from "../shared/aliases";
|
|
8
|
+
import { baseStubSchema } from "../shared/base";
|
|
9
|
+
import { preprocess } from "../shared/preprocess";
|
|
10
|
+
import { userSchema } from "./user";
|
|
11
|
+
const credentialAliasMap = {
|
|
12
|
+
ownerId: "owner",
|
|
13
|
+
};
|
|
14
|
+
const credentialStubObjectSchema = baseStubSchema.extend({
|
|
15
|
+
name: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export const credentialStubSchema = credentialStubObjectSchema;
|
|
18
|
+
export const credentialSchema = preprocess((value) => withAliases(value, credentialAliasMap), credentialStubObjectSchema.extend({
|
|
19
|
+
owner: preprocess((value) => (value == null ? null : asId(value)), z.string()),
|
|
20
|
+
}));
|
|
21
|
+
export const credentialFullSchema = credentialStubObjectSchema.extend({
|
|
22
|
+
owner: preprocess((value) => (value == null ? null : value), z.lazy(() => userSchema).nullable()),
|
|
23
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
export var Action;
|
|
8
|
+
(function (Action) {
|
|
9
|
+
Action["CREATE"] = "create";
|
|
10
|
+
Action["READ"] = "read";
|
|
11
|
+
Action["UPDATE"] = "update";
|
|
12
|
+
Action["DELETE"] = "delete";
|
|
13
|
+
})(Action || (Action = {}));
|
|
14
|
+
export var MethodToAction;
|
|
15
|
+
(function (MethodToAction) {
|
|
16
|
+
MethodToAction["POST"] = "create";
|
|
17
|
+
MethodToAction["GET"] = "read";
|
|
18
|
+
MethodToAction["PATCH"] = "update";
|
|
19
|
+
MethodToAction["DELETE"] = "delete";
|
|
20
|
+
})(MethodToAction || (MethodToAction = {}));
|
|
21
|
+
export const relationSchema = z.enum(["role", "createdBy"]);
|
|
22
|
+
export const modelIdentitySchema = z.enum([
|
|
23
|
+
"contenttype",
|
|
24
|
+
"content",
|
|
25
|
+
"nlpentity",
|
|
26
|
+
"nlpsampleentity",
|
|
27
|
+
"nlpsample",
|
|
28
|
+
"nlpvalue",
|
|
29
|
+
"setting",
|
|
30
|
+
"attachment",
|
|
31
|
+
"auditlog",
|
|
32
|
+
"user",
|
|
33
|
+
"role",
|
|
34
|
+
"permission",
|
|
35
|
+
"label",
|
|
36
|
+
"labelgroup",
|
|
37
|
+
"message",
|
|
38
|
+
"thread",
|
|
39
|
+
"subscriber",
|
|
40
|
+
"source",
|
|
41
|
+
"language",
|
|
42
|
+
"translation",
|
|
43
|
+
"stats",
|
|
44
|
+
"menu",
|
|
45
|
+
"workflow",
|
|
46
|
+
"workflowversion",
|
|
47
|
+
"workflowrun",
|
|
48
|
+
"memorydefinition",
|
|
49
|
+
"memoryrecord",
|
|
50
|
+
"mcpserver",
|
|
51
|
+
"model",
|
|
52
|
+
"credential",
|
|
53
|
+
]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2026 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
export { Action, MethodToAction, } from "./domain";
|
|
7
|
+
export { userProfileFullSchema, userProfileSchema, userProfileStubSchema, } from "./user-profile";
|
|
8
|
+
export { userProfileAssignedFullSchema, userProfileAssignedSchema, userProfileAssignedStubSchema, } from "./user-profile-assigned";
|
|
9
|
+
export { userFullSchema, userSchema, userStubSchema, } from "./user";
|
|
10
|
+
export { roleFullSchema, roleSchema, roleStubSchema, } from "./role";
|
|
11
|
+
export { modelFullSchema, modelSchema, modelStubSchema, } from "./model";
|
|
12
|
+
export { permissionFullSchema, permissionSchema, permissionStubSchema, } from "./permission";
|
|
13
|
+
export { credentialFullSchema, credentialSchema, credentialStubSchema, } from "./credential";
|