@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.
Files changed (294) hide show
  1. package/LICENSE.md +120 -0
  2. package/README.md +172 -0
  3. package/dist/cjs/analytics/index.js +18 -0
  4. package/dist/cjs/analytics/integration-health.js +30 -0
  5. package/dist/cjs/analytics/stats.js +32 -0
  6. package/dist/cjs/attachment/attachment.js +53 -0
  7. package/dist/cjs/attachment/index.js +16 -0
  8. package/dist/cjs/audit/audit-log.js +33 -0
  9. package/dist/cjs/audit/index.js +11 -0
  10. package/dist/cjs/channel/channel-metadata.js +15 -0
  11. package/dist/cjs/channel/index.js +15 -0
  12. package/dist/cjs/channel/source-full.js +16 -0
  13. package/dist/cjs/channel/source.js +25 -0
  14. package/dist/cjs/chat/attachment.js +32 -0
  15. package/dist/cjs/chat/button.js +70 -0
  16. package/dist/cjs/chat/index.js +87 -0
  17. package/dist/cjs/chat/label-group.js +22 -0
  18. package/dist/cjs/chat/label.js +37 -0
  19. package/dist/cjs/chat/message-contract.js +183 -0
  20. package/dist/cjs/chat/message.js +107 -0
  21. package/dist/cjs/chat/options.js +122 -0
  22. package/dist/cjs/chat/quick-reply.js +35 -0
  23. package/dist/cjs/chat/subscriber.js +36 -0
  24. package/dist/cjs/chat/thread.js +36 -0
  25. package/dist/cjs/cms/content-type.js +17 -0
  26. package/dist/cjs/cms/content.js +29 -0
  27. package/dist/cjs/cms/index.js +21 -0
  28. package/dist/cjs/cms/menu.js +36 -0
  29. package/dist/cjs/dummy/dummy.js +18 -0
  30. package/dist/cjs/dummy/index.js +12 -0
  31. package/dist/cjs/i18n/index.js +16 -0
  32. package/dist/cjs/i18n/language.js +19 -0
  33. package/dist/cjs/i18n/translation.js +17 -0
  34. package/dist/cjs/index.js +32 -0
  35. package/dist/cjs/setting/index.js +18 -0
  36. package/dist/cjs/setting/metadata.js +17 -0
  37. package/dist/cjs/setting/setting.js +36 -0
  38. package/dist/cjs/shared/aliases.js +41 -0
  39. package/dist/cjs/shared/base.js +14 -0
  40. package/dist/cjs/shared/object.js +19 -0
  41. package/dist/cjs/shared/preprocess.js +13 -0
  42. package/dist/cjs/shared/profile.js +33 -0
  43. package/dist/cjs/user/credential.js +26 -0
  44. package/dist/cjs/user/domain.js +56 -0
  45. package/dist/cjs/user/index.js +39 -0
  46. package/dist/cjs/user/model.js +24 -0
  47. package/dist/cjs/user/permission.js +32 -0
  48. package/dist/cjs/user/role.js +24 -0
  49. package/dist/cjs/user/user-profile-assigned.js +38 -0
  50. package/dist/cjs/user/user-profile.js +12 -0
  51. package/dist/cjs/user/user.js +44 -0
  52. package/dist/cjs/workflow/domain.js +44 -0
  53. package/dist/cjs/workflow/helpers.js +35 -0
  54. package/dist/cjs/workflow/index.js +40 -0
  55. package/dist/cjs/workflow/mcp-server.js +33 -0
  56. package/dist/cjs/workflow/memory-definition.js +21 -0
  57. package/dist/cjs/workflow/memory-record.js +44 -0
  58. package/dist/cjs/workflow/workflow-run.js +100 -0
  59. package/dist/cjs/workflow/workflow-version.js +39 -0
  60. package/dist/cjs/workflow/workflow.js +98 -0
  61. package/dist/esm/analytics/index.js +7 -0
  62. package/dist/esm/analytics/integration-health.js +27 -0
  63. package/dist/esm/analytics/stats.js +29 -0
  64. package/dist/esm/attachment/attachment.js +50 -0
  65. package/dist/esm/attachment/index.js +6 -0
  66. package/dist/esm/audit/audit-log.js +30 -0
  67. package/dist/esm/audit/index.js +6 -0
  68. package/dist/esm/channel/channel-metadata.js +12 -0
  69. package/dist/esm/channel/index.js +8 -0
  70. package/dist/esm/channel/source-full.js +13 -0
  71. package/dist/esm/channel/source.js +22 -0
  72. package/dist/esm/chat/attachment.js +29 -0
  73. package/dist/esm/chat/button.js +67 -0
  74. package/dist/esm/chat/index.js +15 -0
  75. package/dist/esm/chat/label-group.js +19 -0
  76. package/dist/esm/chat/label.js +34 -0
  77. package/dist/esm/chat/message-contract.js +180 -0
  78. package/dist/esm/chat/message.js +104 -0
  79. package/dist/esm/chat/options.js +119 -0
  80. package/dist/esm/chat/quick-reply.js +32 -0
  81. package/dist/esm/chat/subscriber.js +33 -0
  82. package/dist/esm/chat/thread.js +33 -0
  83. package/dist/esm/cms/content-type.js +14 -0
  84. package/dist/esm/cms/content.js +26 -0
  85. package/dist/esm/cms/index.js +8 -0
  86. package/dist/esm/cms/menu.js +33 -0
  87. package/dist/esm/dummy/dummy.js +15 -0
  88. package/dist/esm/dummy/index.js +6 -0
  89. package/dist/esm/i18n/index.js +7 -0
  90. package/dist/esm/i18n/language.js +16 -0
  91. package/dist/esm/i18n/translation.js +14 -0
  92. package/dist/esm/index.js +16 -0
  93. package/dist/esm/setting/index.js +7 -0
  94. package/dist/esm/setting/metadata.js +14 -0
  95. package/dist/esm/setting/setting.js +33 -0
  96. package/dist/esm/shared/aliases.js +35 -0
  97. package/dist/esm/shared/base.js +11 -0
  98. package/dist/esm/shared/object.js +14 -0
  99. package/dist/esm/shared/preprocess.js +9 -0
  100. package/dist/esm/shared/profile.js +30 -0
  101. package/dist/esm/user/credential.js +23 -0
  102. package/dist/esm/user/domain.js +53 -0
  103. package/dist/esm/user/index.js +13 -0
  104. package/dist/esm/user/model.js +21 -0
  105. package/dist/esm/user/permission.js +29 -0
  106. package/dist/esm/user/role.js +21 -0
  107. package/dist/esm/user/user-profile-assigned.js +35 -0
  108. package/dist/esm/user/user-profile.js +9 -0
  109. package/dist/esm/user/user.js +41 -0
  110. package/dist/esm/workflow/domain.js +41 -0
  111. package/dist/esm/workflow/helpers.js +30 -0
  112. package/dist/esm/workflow/index.js +12 -0
  113. package/dist/esm/workflow/mcp-server.js +30 -0
  114. package/dist/esm/workflow/memory-definition.js +18 -0
  115. package/dist/esm/workflow/memory-record.js +41 -0
  116. package/dist/esm/workflow/workflow-run.js +96 -0
  117. package/dist/esm/workflow/workflow-version.js +36 -0
  118. package/dist/esm/workflow/workflow.js +94 -0
  119. package/dist/types/analytics/index.d.ts +3 -0
  120. package/dist/types/analytics/index.d.ts.map +1 -0
  121. package/dist/types/analytics/integration-health.d.ts +55 -0
  122. package/dist/types/analytics/integration-health.d.ts.map +1 -0
  123. package/dist/types/analytics/stats.d.ts +43 -0
  124. package/dist/types/analytics/stats.d.ts.map +1 -0
  125. package/dist/types/attachment/attachment.d.ts +212 -0
  126. package/dist/types/attachment/attachment.d.ts.map +1 -0
  127. package/dist/types/attachment/index.d.ts +2 -0
  128. package/dist/types/attachment/index.d.ts.map +1 -0
  129. package/dist/types/audit/audit-log.d.ts +58 -0
  130. package/dist/types/audit/audit-log.d.ts.map +1 -0
  131. package/dist/types/audit/index.d.ts +2 -0
  132. package/dist/types/audit/index.d.ts.map +1 -0
  133. package/dist/types/channel/channel-metadata.d.ts +7 -0
  134. package/dist/types/channel/channel-metadata.d.ts.map +1 -0
  135. package/dist/types/channel/index.d.ts +4 -0
  136. package/dist/types/channel/index.d.ts.map +1 -0
  137. package/dist/types/channel/source-full.d.ts +58 -0
  138. package/dist/types/channel/source-full.d.ts.map +1 -0
  139. package/dist/types/channel/source.d.ts +44 -0
  140. package/dist/types/channel/source.d.ts.map +1 -0
  141. package/dist/types/chat/attachment.d.ts +34 -0
  142. package/dist/types/chat/attachment.d.ts.map +1 -0
  143. package/dist/types/chat/button.d.ts +31 -0
  144. package/dist/types/chat/button.d.ts.map +1 -0
  145. package/dist/types/chat/index.d.ts +11 -0
  146. package/dist/types/chat/index.d.ts.map +1 -0
  147. package/dist/types/chat/label-group.d.ts +47 -0
  148. package/dist/types/chat/label-group.d.ts.map +1 -0
  149. package/dist/types/chat/label.d.ts +102 -0
  150. package/dist/types/chat/label.d.ts.map +1 -0
  151. package/dist/types/chat/message-contract.d.ts +883 -0
  152. package/dist/types/chat/message-contract.d.ts.map +1 -0
  153. package/dist/types/chat/message.d.ts +1132 -0
  154. package/dist/types/chat/message.d.ts.map +1 -0
  155. package/dist/types/chat/options.d.ts +64 -0
  156. package/dist/types/chat/options.d.ts.map +1 -0
  157. package/dist/types/chat/quick-reply.d.ts +32 -0
  158. package/dist/types/chat/quick-reply.d.ts.map +1 -0
  159. package/dist/types/chat/subscriber.d.ts +236 -0
  160. package/dist/types/chat/subscriber.d.ts.map +1 -0
  161. package/dist/types/chat/thread.d.ts +126 -0
  162. package/dist/types/chat/thread.d.ts.map +1 -0
  163. package/dist/types/cms/content-type.d.ts +26 -0
  164. package/dist/types/cms/content-type.d.ts.map +1 -0
  165. package/dist/types/cms/content.d.ts +49 -0
  166. package/dist/types/cms/content.d.ts.map +1 -0
  167. package/dist/types/cms/index.d.ts +4 -0
  168. package/dist/types/cms/index.d.ts.map +1 -0
  169. package/dist/types/cms/menu.d.ts +85 -0
  170. package/dist/types/cms/menu.d.ts.map +1 -0
  171. package/dist/types/dummy/dummy.d.ts +26 -0
  172. package/dist/types/dummy/dummy.d.ts.map +1 -0
  173. package/dist/types/dummy/index.d.ts +2 -0
  174. package/dist/types/dummy/index.d.ts.map +1 -0
  175. package/dist/types/i18n/index.d.ts +3 -0
  176. package/dist/types/i18n/index.d.ts.map +1 -0
  177. package/dist/types/i18n/language.d.ts +32 -0
  178. package/dist/types/i18n/language.d.ts.map +1 -0
  179. package/dist/types/i18n/translation.d.ts +26 -0
  180. package/dist/types/i18n/translation.d.ts.map +1 -0
  181. package/dist/types/index.d.ts +12 -0
  182. package/dist/types/index.d.ts.map +1 -0
  183. package/dist/types/setting/index.d.ts +3 -0
  184. package/dist/types/setting/index.d.ts.map +1 -0
  185. package/dist/types/setting/metadata.d.ts +26 -0
  186. package/dist/types/setting/metadata.d.ts.map +1 -0
  187. package/dist/types/setting/setting.d.ts +41 -0
  188. package/dist/types/setting/setting.d.ts.map +1 -0
  189. package/dist/types/shared/aliases.d.ts +4 -0
  190. package/dist/types/shared/aliases.d.ts.map +1 -0
  191. package/dist/types/shared/base.d.ts +7 -0
  192. package/dist/types/shared/base.d.ts.map +1 -0
  193. package/dist/types/shared/object.d.ts +3 -0
  194. package/dist/types/shared/object.d.ts.map +1 -0
  195. package/dist/types/shared/preprocess.d.ts +3 -0
  196. package/dist/types/shared/preprocess.d.ts.map +1 -0
  197. package/dist/types/shared/profile.d.ts +40 -0
  198. package/dist/types/shared/profile.d.ts.map +1 -0
  199. package/dist/types/user/credential.d.ts +97 -0
  200. package/dist/types/user/credential.d.ts.map +1 -0
  201. package/dist/types/user/domain.d.ts +54 -0
  202. package/dist/types/user/domain.d.ts.map +1 -0
  203. package/dist/types/user/index.d.ts +9 -0
  204. package/dist/types/user/index.d.ts.map +1 -0
  205. package/dist/types/user/model.d.ts +142 -0
  206. package/dist/types/user/model.d.ts.map +1 -0
  207. package/dist/types/user/permission.d.ts +90 -0
  208. package/dist/types/user/permission.d.ts.map +1 -0
  209. package/dist/types/user/role.d.ts +111 -0
  210. package/dist/types/user/role.d.ts.map +1 -0
  211. package/dist/types/user/user-profile-assigned.d.ts +181 -0
  212. package/dist/types/user/user-profile-assigned.d.ts.map +1 -0
  213. package/dist/types/user/user-profile.d.ts +32 -0
  214. package/dist/types/user/user-profile.d.ts.map +1 -0
  215. package/dist/types/user/user.d.ts +270 -0
  216. package/dist/types/user/user.d.ts.map +1 -0
  217. package/dist/types/workflow/domain.d.ts +32 -0
  218. package/dist/types/workflow/domain.d.ts.map +1 -0
  219. package/dist/types/workflow/helpers.d.ts +117 -0
  220. package/dist/types/workflow/helpers.d.ts.map +1 -0
  221. package/dist/types/workflow/index.d.ts +8 -0
  222. package/dist/types/workflow/index.d.ts.map +1 -0
  223. package/dist/types/workflow/mcp-server.d.ts +67 -0
  224. package/dist/types/workflow/mcp-server.d.ts.map +1 -0
  225. package/dist/types/workflow/memory-definition.d.ts +35 -0
  226. package/dist/types/workflow/memory-definition.d.ts.map +1 -0
  227. package/dist/types/workflow/memory-record.d.ts +284 -0
  228. package/dist/types/workflow/memory-record.d.ts.map +1 -0
  229. package/dist/types/workflow/workflow-run.d.ts +375 -0
  230. package/dist/types/workflow/workflow-run.d.ts.map +1 -0
  231. package/dist/types/workflow/workflow-version.d.ts +179 -0
  232. package/dist/types/workflow/workflow-version.d.ts.map +1 -0
  233. package/dist/types/workflow/workflow.d.ts +366 -0
  234. package/dist/types/workflow/workflow.d.ts.map +1 -0
  235. package/package.json +59 -0
  236. package/src/analytics/index.ts +26 -0
  237. package/src/analytics/integration-health.ts +44 -0
  238. package/src/analytics/stats.ts +41 -0
  239. package/src/attachment/attachment.ts +75 -0
  240. package/src/attachment/index.ts +19 -0
  241. package/src/audit/audit-log.ts +42 -0
  242. package/src/audit/index.ts +12 -0
  243. package/src/channel/channel-metadata.ts +20 -0
  244. package/src/channel/index.ts +19 -0
  245. package/src/channel/source-full.ts +25 -0
  246. package/src/channel/source.ts +42 -0
  247. package/src/chat/attachment.ts +44 -0
  248. package/src/chat/button.ts +90 -0
  249. package/src/chat/index.ts +173 -0
  250. package/src/chat/label-group.ts +35 -0
  251. package/src/chat/label.ts +56 -0
  252. package/src/chat/message-contract.ts +370 -0
  253. package/src/chat/message.ts +164 -0
  254. package/src/chat/options.ts +130 -0
  255. package/src/chat/quick-reply.ts +41 -0
  256. package/src/chat/subscriber.ts +73 -0
  257. package/src/chat/thread.ts +55 -0
  258. package/src/cms/content-type.ts +26 -0
  259. package/src/cms/content.ts +48 -0
  260. package/src/cms/index.ts +33 -0
  261. package/src/cms/menu.ts +54 -0
  262. package/src/dummy/dummy.ts +30 -0
  263. package/src/dummy/index.ts +14 -0
  264. package/src/i18n/index.ts +23 -0
  265. package/src/i18n/language.ts +28 -0
  266. package/src/i18n/translation.ts +26 -0
  267. package/src/index.test.ts +1271 -0
  268. package/src/index.ts +27 -0
  269. package/src/setting/index.ts +25 -0
  270. package/src/setting/metadata.ts +26 -0
  271. package/src/setting/setting.ts +46 -0
  272. package/src/shared/aliases.ts +48 -0
  273. package/src/shared/base.ts +13 -0
  274. package/src/shared/object.ts +19 -0
  275. package/src/shared/preprocess.ts +14 -0
  276. package/src/shared/profile.ts +49 -0
  277. package/src/user/credential.ts +45 -0
  278. package/src/user/domain.ts +94 -0
  279. package/src/user/index.ts +78 -0
  280. package/src/user/model.ts +40 -0
  281. package/src/user/permission.ts +51 -0
  282. package/src/user/role.ts +43 -0
  283. package/src/user/user-profile-assigned.ts +70 -0
  284. package/src/user/user-profile.ts +21 -0
  285. package/src/user/user.ts +87 -0
  286. package/src/workflow/domain.ts +47 -0
  287. package/src/workflow/helpers.ts +40 -0
  288. package/src/workflow/index.ts +70 -0
  289. package/src/workflow/mcp-server.ts +64 -0
  290. package/src/workflow/memory-definition.ts +31 -0
  291. package/src/workflow/memory-record.ts +71 -0
  292. package/src/workflow/workflow-run.ts +156 -0
  293. package/src/workflow/workflow-version.ts +68 -0
  294. package/src/workflow/workflow.ts +163 -0
@@ -0,0 +1,73 @@
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
+ import { attachmentSchema } from "../attachment/attachment";
10
+ import { sourceSchema } from "../channel/source";
11
+ import { asId, asIdArray, withAliases } from "../shared/aliases";
12
+ import { preprocess } from "../shared/preprocess";
13
+ import { subscriberBaseSchema } from "../shared/profile";
14
+ import { userProfileAssignedSchema } from "../user/user-profile-assigned";
15
+
16
+ import { labelSchema } from "./label";
17
+
18
+ const subscriberAliasMap = {
19
+ labelIds: "labels",
20
+ assignedToId: "assignedTo",
21
+ avatarId: "avatar",
22
+ sourceId: "source",
23
+ } as const;
24
+ const subscriberObjectSchema = subscriberBaseSchema.extend({
25
+ labels: preprocess(
26
+ (value) => (Array.isArray(value) ? asIdArray(value) : []),
27
+ z.array(z.string()),
28
+ ),
29
+ assignedTo: preprocess(
30
+ (value) => (value == null ? null : asId(value)),
31
+ z.string().nullable(),
32
+ ),
33
+ avatar: preprocess(
34
+ (value) => (value == null ? null : asId(value)),
35
+ z.string().nullable(),
36
+ ),
37
+ source: preprocess(
38
+ (value) => (value == null ? null : asId(value)),
39
+ z.string().nullable(),
40
+ ),
41
+ });
42
+
43
+ export const subscriberStubSchema = subscriberBaseSchema;
44
+
45
+ export const subscriberSchema = preprocess(
46
+ (value) => withAliases(value, subscriberAliasMap),
47
+ subscriberObjectSchema,
48
+ );
49
+
50
+ export const subscriberFullSchema = subscriberBaseSchema.extend({
51
+ labels: preprocess(
52
+ (value) => (Array.isArray(value) ? value : []),
53
+ z.array(z.lazy(() => labelSchema)),
54
+ ),
55
+ assignedTo: preprocess(
56
+ (value) => (value == null ? null : value),
57
+ userProfileAssignedSchema.nullable(),
58
+ ),
59
+ avatar: preprocess(
60
+ (value) => (value == null ? null : value),
61
+ attachmentSchema.nullable(),
62
+ ),
63
+ source: preprocess(
64
+ (value) => (value == null ? null : value),
65
+ sourceSchema.nullable(),
66
+ ),
67
+ });
68
+
69
+ export type SubscriberStub = z.infer<typeof subscriberStubSchema>;
70
+
71
+ export type Subscriber = z.infer<typeof subscriberSchema>;
72
+
73
+ export type SubscriberFull = z.infer<typeof subscriberFullSchema>;
@@ -0,0 +1,55 @@
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
+ import { sourceSchema } from "../channel/source";
10
+ import { asId, withAliases } from "../shared/aliases";
11
+ import { baseStubSchema } from "../shared/base";
12
+ import { preprocess } from "../shared/preprocess";
13
+
14
+ import { subscriberSchema } from "./subscriber";
15
+
16
+ const nullableOptionalDateSchema = z.coerce.date().nullable().optional();
17
+ const nullableOptionalStringSchema = z.string().nullable().optional();
18
+ const threadAliasMap = {
19
+ subscriberId: "subscriber",
20
+ sourceId: "source",
21
+ } as const;
22
+ const threadStubObjectSchema = baseStubSchema.extend({
23
+ status: z.enum(["open", "closed"]),
24
+ lastMessageAt: nullableOptionalDateSchema,
25
+ closedAt: nullableOptionalDateSchema,
26
+ closeReason: z.enum(["manual", "inactivity"]).nullable().optional(),
27
+ title: nullableOptionalStringSchema,
28
+ });
29
+
30
+ export const threadStubSchema = threadStubObjectSchema;
31
+
32
+ export const threadSchema = preprocess(
33
+ (value) => withAliases(value, threadAliasMap),
34
+ threadStubObjectSchema.extend({
35
+ subscriber: preprocess(
36
+ (value) => (value == null ? null : asId(value)),
37
+ z.string(),
38
+ ),
39
+ source: preprocess(
40
+ (value) => (value == null ? null : asId(value)),
41
+ z.string(),
42
+ ),
43
+ }),
44
+ );
45
+
46
+ export const threadFullSchema = threadStubObjectSchema.extend({
47
+ subscriber: subscriberSchema,
48
+ source: sourceSchema,
49
+ });
50
+
51
+ export type ThreadStub = z.infer<typeof threadStubSchema>;
52
+
53
+ export type Thread = z.infer<typeof threadSchema>;
54
+
55
+ export type ThreadFull = z.infer<typeof threadFullSchema>;
@@ -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
+ import { z } from "zod";
8
+
9
+ import { baseStubSchema } from "../shared/base";
10
+
11
+ const contentTypeObjectSchema = baseStubSchema.extend({
12
+ name: z.string(),
13
+ schema: z.any(),
14
+ });
15
+
16
+ export const contentTypeStubSchema = contentTypeObjectSchema;
17
+
18
+ export const contentTypeSchema = contentTypeObjectSchema;
19
+
20
+ export const contentTypeFullSchema = contentTypeObjectSchema;
21
+
22
+ export type ContentTypeStub = z.infer<typeof contentTypeStubSchema>;
23
+
24
+ export type ContentType = z.infer<typeof contentTypeSchema>;
25
+
26
+ export type ContentTypeFull = z.infer<typeof contentTypeFullSchema>;
@@ -0,0 +1,48 @@
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
+ import { asId, withAliases } from "../shared/aliases";
10
+ import { baseStubSchema } from "../shared/base";
11
+ import { preprocess } from "../shared/preprocess";
12
+
13
+ import { contentTypeSchema } from "./content-type";
14
+
15
+ const contentAliasMap = {
16
+ contentTypeId: "contentType",
17
+ } as const;
18
+ const contentStubObjectSchema = baseStubSchema.extend({
19
+ title: z.string(),
20
+ status: z.coerce.boolean(),
21
+ properties: preprocess(
22
+ (value) => (value == null ? null : value),
23
+ z.record(z.string(), z.unknown()).nullable(),
24
+ ),
25
+ searchText: z.string(),
26
+ });
27
+
28
+ export const contentStubSchema = contentStubObjectSchema;
29
+
30
+ export const contentSchema = preprocess(
31
+ (value) => withAliases(value, contentAliasMap),
32
+ contentStubObjectSchema.extend({
33
+ contentType: preprocess(
34
+ (value) => (value == null ? null : asId(value)),
35
+ z.string(),
36
+ ),
37
+ }),
38
+ );
39
+
40
+ export const contentFullSchema = contentStubObjectSchema.extend({
41
+ contentType: contentTypeSchema,
42
+ });
43
+
44
+ export type ContentStub = z.infer<typeof contentStubSchema>;
45
+
46
+ export type Content = z.infer<typeof contentSchema>;
47
+
48
+ export type ContentFull = z.infer<typeof contentFullSchema>;
@@ -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
+
7
+ export {
8
+ contentTypeFullSchema,
9
+ contentTypeSchema,
10
+ contentTypeStubSchema,
11
+ type ContentType,
12
+ type ContentTypeFull,
13
+ type ContentTypeStub,
14
+ } from "./content-type";
15
+
16
+ export {
17
+ contentFullSchema,
18
+ contentSchema,
19
+ contentStubSchema,
20
+ type Content,
21
+ type ContentFull,
22
+ type ContentStub,
23
+ } from "./content";
24
+
25
+ export {
26
+ MenuType,
27
+ menuFullSchema,
28
+ menuSchema,
29
+ menuStubSchema,
30
+ type Menu,
31
+ type MenuFull,
32
+ type MenuStub,
33
+ } from "./menu";
@@ -0,0 +1,54 @@
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
+ import { asId, withAliases } from "../shared/aliases";
10
+ import { baseStubSchema } from "../shared/base";
11
+ import { preprocess } from "../shared/preprocess";
12
+
13
+ export enum MenuType {
14
+ web_url = "web_url",
15
+ postback = "postback",
16
+ nested = "nested",
17
+ }
18
+
19
+ const menuTypeSchema = z.enum(MenuType);
20
+ const menuAliasMap = {
21
+ parentId: "parent",
22
+ } as const;
23
+ const menuStubObjectSchema = baseStubSchema.extend({
24
+ title: z.string(),
25
+ type: menuTypeSchema,
26
+ payload: z.string().nullable().optional(),
27
+ url: z.string().nullable().optional(),
28
+ });
29
+
30
+ export const menuStubSchema = menuStubObjectSchema;
31
+
32
+ export const menuSchema = preprocess(
33
+ (value) => withAliases(value, menuAliasMap),
34
+ menuStubObjectSchema.extend({
35
+ parent: preprocess(
36
+ (value) => (value == null ? null : asId(value)),
37
+ z.string().nullable(),
38
+ ).optional(),
39
+ }),
40
+ );
41
+
42
+ export const menuFullSchema = menuStubObjectSchema.extend({
43
+ parent: menuSchema.nullable().optional(),
44
+ children: preprocess(
45
+ (value) => (Array.isArray(value) ? value : []),
46
+ z.array(menuSchema),
47
+ ).optional(),
48
+ });
49
+
50
+ export type MenuStub = z.infer<typeof menuStubSchema>;
51
+
52
+ export type Menu = z.infer<typeof menuSchema>;
53
+
54
+ export type MenuFull = z.infer<typeof menuFullSchema>;
@@ -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
+
7
+ import { z } from "zod";
8
+
9
+ import { baseStubSchema } from "../shared/base";
10
+ import { preprocess } from "../shared/preprocess";
11
+
12
+ const dummyObjectSchema = baseStubSchema.extend({
13
+ dummy: z.string(),
14
+ dynamicField: preprocess(
15
+ (value) => (value == null ? undefined : value),
16
+ z.record(z.string(), z.unknown()).optional(),
17
+ ).optional(),
18
+ });
19
+
20
+ export const dummyStubSchema = dummyObjectSchema;
21
+
22
+ export const dummySchema = dummyObjectSchema;
23
+
24
+ export const dummyFullSchema = dummyObjectSchema;
25
+
26
+ export type DummyStub = z.infer<typeof dummyStubSchema>;
27
+
28
+ export type Dummy = z.infer<typeof dummySchema>;
29
+
30
+ export type DummyFull = z.infer<typeof dummyFullSchema>;
@@ -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
+
7
+ export {
8
+ dummyFullSchema,
9
+ dummySchema,
10
+ dummyStubSchema,
11
+ type Dummy,
12
+ type DummyFull,
13
+ type DummyStub,
14
+ } from "./dummy";
@@ -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
+
7
+ export {
8
+ languageFullSchema,
9
+ languageSchema,
10
+ languageStubSchema,
11
+ type Language,
12
+ type LanguageFull,
13
+ type LanguageStub,
14
+ } from "./language";
15
+
16
+ export {
17
+ translationFullSchema,
18
+ translationSchema,
19
+ translationStubSchema,
20
+ type Translation,
21
+ type TranslationFull,
22
+ type TranslationStub,
23
+ } from "./translation";
@@ -0,0 +1,28 @@
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
+ import { baseStubSchema } from "../shared/base";
10
+
11
+ const languageObjectSchema = baseStubSchema.extend({
12
+ title: z.string(),
13
+ code: z.string(),
14
+ isDefault: z.coerce.boolean(),
15
+ isRTL: z.coerce.boolean(),
16
+ });
17
+
18
+ export const languageStubSchema = languageObjectSchema;
19
+
20
+ export const languageSchema = languageObjectSchema;
21
+
22
+ export const languageFullSchema = languageObjectSchema;
23
+
24
+ export type LanguageStub = z.infer<typeof languageStubSchema>;
25
+
26
+ export type Language = z.infer<typeof languageSchema>;
27
+
28
+ export type LanguageFull = z.infer<typeof languageFullSchema>;
@@ -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
+ import { z } from "zod";
8
+
9
+ import { baseStubSchema } from "../shared/base";
10
+
11
+ const translationObjectSchema = baseStubSchema.extend({
12
+ str: z.string(),
13
+ translations: z.record(z.string(), z.string()),
14
+ });
15
+
16
+ export const translationStubSchema = translationObjectSchema;
17
+
18
+ export const translationSchema = translationObjectSchema;
19
+
20
+ export const translationFullSchema = translationObjectSchema;
21
+
22
+ export type TranslationStub = z.infer<typeof translationStubSchema>;
23
+
24
+ export type Translation = z.infer<typeof translationSchema>;
25
+
26
+ export type TranslationFull = z.infer<typeof translationFullSchema>;