@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,21 @@
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
+ import { modelIdentitySchema, relationSchema } from "./domain";
10
+ import { permissionSchema } from "./permission";
11
+ const modelStubObjectSchema = baseStubSchema.extend({
12
+ name: z.string(),
13
+ identity: modelIdentitySchema,
14
+ attributes: z.record(z.string(), z.unknown()),
15
+ relation: preprocess((value) => (value == null ? undefined : value), relationSchema.optional()).optional(),
16
+ });
17
+ export const modelStubSchema = modelStubObjectSchema;
18
+ export const modelSchema = modelStubObjectSchema;
19
+ export const modelFullSchema = modelStubObjectSchema.extend({
20
+ permissions: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => permissionSchema))).optional(),
21
+ });
@@ -0,0 +1,29 @@
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 { Action, relationSchema } from "./domain";
11
+ import { modelSchema } from "./model";
12
+ import { roleSchema } from "./role";
13
+ const permissionAliasMap = {
14
+ modelId: "model",
15
+ roleId: "role",
16
+ };
17
+ const permissionStubObjectSchema = baseStubSchema.extend({
18
+ action: z.enum(Action),
19
+ relation: relationSchema,
20
+ });
21
+ export const permissionStubSchema = permissionStubObjectSchema;
22
+ export const permissionSchema = preprocess((value) => withAliases(value, permissionAliasMap), permissionStubObjectSchema.extend({
23
+ model: preprocess((value) => (value == null ? null : asId(value)), z.string()),
24
+ role: preprocess((value) => (value == null ? null : asId(value)), z.string()),
25
+ }));
26
+ export const permissionFullSchema = permissionStubObjectSchema.extend({
27
+ model: z.lazy(() => modelSchema),
28
+ role: z.lazy(() => roleSchema),
29
+ });
@@ -0,0 +1,21 @@
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
+ import { permissionSchema } from "./permission";
10
+ import { userSchema } from "./user";
11
+ const roleBaseSchema = baseStubSchema.extend({
12
+ name: z.string(),
13
+ active: z.coerce.boolean(),
14
+ });
15
+ const roleFullObjectSchema = z.object({
16
+ permissions: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => permissionSchema))).optional(),
17
+ users: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => userSchema))),
18
+ });
19
+ export const roleStubSchema = roleBaseSchema;
20
+ export const roleSchema = roleBaseSchema;
21
+ export const roleFullSchema = z.intersection(roleBaseSchema, roleFullObjectSchema);
@@ -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 { z } from "zod";
7
+ import { asId, asIdArray, withAliases } from "../shared/aliases";
8
+ import { preprocess } from "../shared/preprocess";
9
+ import { nullableStringSchema, subscriberBaseSchema } from "../shared/profile";
10
+ const userProfileAssignedAliasMap = {
11
+ labelIds: "labels",
12
+ assignedToId: "assignedTo",
13
+ roleIds: "roles",
14
+ avatarId: "avatar",
15
+ };
16
+ export const userProviderSchema = z.object({
17
+ strategy: z.literal("local"),
18
+ sub: z.string().optional(),
19
+ });
20
+ const userProfileAssignedObjectSchema = 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
+ username: z.string(),
24
+ email: z.string(),
25
+ sendEmail: z.coerce.boolean(),
26
+ state: z.coerce.boolean(),
27
+ resetCount: z.coerce.number(),
28
+ resetToken: nullableStringSchema,
29
+ provider: userProviderSchema.optional(),
30
+ roles: preprocess((value) => (Array.isArray(value) ? asIdArray(value) : []), z.array(z.string())),
31
+ avatar: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
32
+ });
33
+ export const userProfileAssignedStubSchema = userProfileAssignedObjectSchema;
34
+ export const userProfileAssignedSchema = preprocess((value) => withAliases(value, userProfileAssignedAliasMap), userProfileAssignedObjectSchema);
35
+ export const userProfileAssignedFullSchema = userProfileAssignedSchema;
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
3
+ * Copyright (c) 2026 Hexastack.
4
+ * Full terms: see LICENSE.md.
5
+ */
6
+ import { userProfileBaseSchema } from "../shared/profile";
7
+ export const userProfileStubSchema = userProfileBaseSchema;
8
+ export const userProfileSchema = userProfileBaseSchema;
9
+ export const userProfileFullSchema = userProfileBaseSchema;
@@ -0,0 +1,41 @@
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 { labelSchema } from "../chat/label";
9
+ import { asId, asIdArray, withAliases } from "../shared/aliases";
10
+ import { preprocess } from "../shared/preprocess";
11
+ import { subscriberBaseSchema } from "../shared/profile";
12
+ import { roleSchema } from "./role";
13
+ import { userProfileAssignedSchema, userProviderSchema, } from "./user-profile-assigned";
14
+ const userAliasMap = {
15
+ labelIds: "labels",
16
+ assignedToId: "assignedTo",
17
+ roleIds: "roles",
18
+ avatarId: "avatar",
19
+ };
20
+ const userStubObjectSchema = subscriberBaseSchema.extend({
21
+ username: z.string(),
22
+ email: z.string(),
23
+ sendEmail: z.coerce.boolean(),
24
+ state: z.coerce.boolean(),
25
+ resetCount: z.coerce.number(),
26
+ resetToken: preprocess((value) => (value == null ? null : value), z.string().nullable()),
27
+ provider: userProviderSchema.optional(),
28
+ });
29
+ export const userStubSchema = userStubObjectSchema;
30
+ export const userSchema = preprocess((value) => withAliases(value, userAliasMap), userStubObjectSchema.extend({
31
+ labels: preprocess((value) => (Array.isArray(value) ? asIdArray(value) : []), z.array(z.string())),
32
+ assignedTo: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
33
+ roles: preprocess((value) => (Array.isArray(value) ? asIdArray(value) : []), z.array(z.string())),
34
+ avatar: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
35
+ }));
36
+ export const userFullSchema = userStubObjectSchema.extend({
37
+ labels: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => labelSchema))),
38
+ assignedTo: preprocess((value) => (value == null ? null : value), userProfileAssignedSchema.nullable()),
39
+ roles: preprocess((value) => (Array.isArray(value) ? value : []), z.array(z.lazy(() => roleSchema))),
40
+ avatar: preprocess((value) => (value == null ? null : value), attachmentSchema.nullable()),
41
+ });
@@ -0,0 +1,41 @@
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 WorkflowType;
8
+ (function (WorkflowType) {
9
+ WorkflowType["conversational"] = "conversational";
10
+ WorkflowType["manual"] = "manual";
11
+ WorkflowType["scheduled"] = "scheduled";
12
+ })(WorkflowType || (WorkflowType = {}));
13
+ export var WorkflowVersionAction;
14
+ (function (WorkflowVersionAction) {
15
+ WorkflowVersionAction["create"] = "create";
16
+ WorkflowVersionAction["update"] = "update";
17
+ WorkflowVersionAction["restore"] = "restore";
18
+ WorkflowVersionAction["import"] = "import";
19
+ })(WorkflowVersionAction || (WorkflowVersionAction = {}));
20
+ export var MemoryScope;
21
+ (function (MemoryScope) {
22
+ MemoryScope["global"] = "global";
23
+ MemoryScope["workflow"] = "workflow";
24
+ MemoryScope["thread"] = "thread";
25
+ MemoryScope["run"] = "run";
26
+ })(MemoryScope || (MemoryScope = {}));
27
+ export var McpServerTransport;
28
+ (function (McpServerTransport) {
29
+ McpServerTransport["http"] = "http";
30
+ McpServerTransport["stdio"] = "stdio";
31
+ })(McpServerTransport || (McpServerTransport = {}));
32
+ export var DirectionType;
33
+ (function (DirectionType) {
34
+ DirectionType["HORIZONTAL"] = "horizontal";
35
+ DirectionType["VERTICAL"] = "vertical";
36
+ })(DirectionType || (DirectionType = {}));
37
+ export const workflowTypeSchema = z.enum(WorkflowType);
38
+ export const workflowVersionActionSchema = z.enum(WorkflowVersionAction);
39
+ export const memoryScopeSchema = z.enum(MemoryScope);
40
+ export const mcpServerTransportSchema = z.enum(McpServerTransport);
41
+ export const directionTypeSchema = z.enum(DirectionType);
@@ -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 { subscriberSchema } from "../chat/subscriber";
8
+ import { toRecord } from "../shared/object";
9
+ import { userSchema } from "../user/user";
10
+ export const nullishToNull = (value) => {
11
+ return value == null ? null : value;
12
+ };
13
+ export const userOrSubscriberSchema = z.union([
14
+ z.lazy(() => userSchema),
15
+ subscriberSchema,
16
+ ]);
17
+ export const parseUserOrSubscriber = (value) => {
18
+ const record = toRecord(value);
19
+ if (record?.type === "UserOrmEntity") {
20
+ return userSchema.parse(value);
21
+ }
22
+ if (record?.type === "SubscriberOrmEntity") {
23
+ return subscriberSchema.parse(value);
24
+ }
25
+ const parsedUser = userSchema.safeParse(value);
26
+ if (parsedUser.success) {
27
+ return parsedUser.data;
28
+ }
29
+ return subscriberSchema.parse(value);
30
+ };
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Hexabot — Fair Core License (FCL-1.0-ALv2)
3
+ * Copyright (c) 2026 Hexastack.
4
+ * Full terms: see LICENSE.md.
5
+ */
6
+ export { DirectionType, McpServerTransport, MemoryScope, WorkflowType, WorkflowVersionAction, } from "./domain";
7
+ export { createWorkflowFullSchema, workflowFullSchema, workflowSchema, workflowStubSchema, } from "./workflow";
8
+ export { workflowVersionFullSchema, workflowVersionSchema, workflowVersionStubSchema, } from "./workflow-version";
9
+ export { resolveRunDurationMs, workflowRunFullSchema, workflowRunSchema, workflowRunStubSchema, } from "./workflow-run";
10
+ export { memoryDefinitionFullSchema, memoryDefinitionSchema, memoryDefinitionStubSchema, } from "./memory-definition";
11
+ export { memoryRecordFullSchema, memoryRecordSchema, memoryRecordStubSchema, } from "./memory-record";
12
+ export { mcpServerFullSchema, mcpServerSchema, mcpServerStubSchema, } from "./mcp-server";
@@ -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 { asId, withAliases } from "../shared/aliases";
8
+ import { baseStubSchema } from "../shared/base";
9
+ import { preprocess } from "../shared/preprocess";
10
+ import { credentialSchema } from "../user/credential";
11
+ import { mcpServerTransportSchema } from "./domain";
12
+ const mcpServerAliasMap = {
13
+ credentialId: "credential",
14
+ };
15
+ const mcpServerStubObjectSchema = baseStubSchema.extend({
16
+ name: z.string(),
17
+ enabled: z.coerce.boolean(),
18
+ transport: mcpServerTransportSchema,
19
+ url: preprocess((value) => (value == null ? null : value), z.string().nullable()),
20
+ command: preprocess((value) => (value == null ? null : value), z.string().nullable()),
21
+ args: preprocess((value) => (value == null ? null : value), z.array(z.string()).nullable()),
22
+ cwd: preprocess((value) => (value == null ? null : value), z.string().nullable()),
23
+ });
24
+ export const mcpServerStubSchema = mcpServerStubObjectSchema;
25
+ export const mcpServerSchema = preprocess((value) => withAliases(value, mcpServerAliasMap), mcpServerStubObjectSchema.extend({
26
+ credential: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
27
+ }));
28
+ export const mcpServerFullSchema = mcpServerStubObjectSchema.extend({
29
+ credential: preprocess((value) => (value == null ? null : credentialSchema.parse(value)), credentialSchema.nullable()).optional(),
30
+ });
@@ -0,0 +1,18 @@
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 { memoryScopeSchema } from "./domain";
9
+ const memoryDefinitionObjectSchema = baseStubSchema.extend({
10
+ name: z.string(),
11
+ slug: z.string(),
12
+ scope: memoryScopeSchema,
13
+ schema: z.any(),
14
+ ttlSeconds: z.coerce.number().nullable().optional(),
15
+ });
16
+ export const memoryDefinitionStubSchema = memoryDefinitionObjectSchema;
17
+ export const memoryDefinitionSchema = memoryDefinitionObjectSchema;
18
+ export const memoryDefinitionFullSchema = memoryDefinitionObjectSchema;
@@ -0,0 +1,41 @@
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 { threadSchema } from "../chat/thread";
8
+ import { asId, withAliases } from "../shared/aliases";
9
+ import { baseStubSchema } from "../shared/base";
10
+ import { preprocess } from "../shared/preprocess";
11
+ import { parseUserOrSubscriber, userOrSubscriberSchema } from "./helpers";
12
+ import { memoryDefinitionSchema } from "./memory-definition";
13
+ import { workflowSchema } from "./workflow";
14
+ import { workflowRunSchema } from "./workflow-run";
15
+ const memoryRecordAliasMap = {
16
+ definitionId: "definition",
17
+ ownerId: "owner",
18
+ workflowId: "workflow",
19
+ runId: "run",
20
+ threadId: "thread",
21
+ };
22
+ const memoryRecordStubObjectSchema = baseStubSchema.extend({
23
+ value: z.record(z.string(), z.unknown()),
24
+ ttlSeconds: z.coerce.number().nullable().optional(),
25
+ expiresAt: z.coerce.date().nullable().optional(),
26
+ });
27
+ export const memoryRecordStubSchema = memoryRecordStubObjectSchema;
28
+ export const memoryRecordSchema = preprocess((value) => withAliases(value, memoryRecordAliasMap), memoryRecordStubObjectSchema.extend({
29
+ definition: preprocess((value) => (value == null ? null : asId(value)), z.string()),
30
+ owner: preprocess((value) => (value == null ? null : asId(value)), z.string()),
31
+ workflow: preprocess((value) => (value == null ? undefined : asId(value)), z.string().optional()).optional(),
32
+ run: preprocess((value) => (value == null ? undefined : asId(value)), z.string().optional()).optional(),
33
+ thread: preprocess((value) => (value == null ? undefined : asId(value)), z.string().optional()).optional(),
34
+ }));
35
+ export const memoryRecordFullSchema = memoryRecordStubObjectSchema.extend({
36
+ definition: memoryDefinitionSchema,
37
+ owner: preprocess(parseUserOrSubscriber, userOrSubscriberSchema),
38
+ workflow: workflowSchema.nullable().optional(),
39
+ run: workflowRunSchema.nullable().optional(),
40
+ thread: threadSchema.nullable().optional(),
41
+ });
@@ -0,0 +1,96 @@
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 { threadSchema } from "../chat/thread";
8
+ import { asId, withAliases } from "../shared/aliases";
9
+ import { baseStubSchema } from "../shared/base";
10
+ import { cloneWithPrototype, toRecord } from "../shared/object";
11
+ import { preprocess } from "../shared/preprocess";
12
+ import { nullishToNull, parseUserOrSubscriber, userOrSubscriberSchema, } from "./helpers";
13
+ import { workflowSchema } from "./workflow";
14
+ import { workflowVersionSchema } from "./workflow-version";
15
+ const workflowRunStatusSchema = z.enum([
16
+ "idle",
17
+ "running",
18
+ "suspended",
19
+ "finished",
20
+ "failed",
21
+ ]);
22
+ const resolveTimestampMs = (value) => {
23
+ if (!value) {
24
+ return null;
25
+ }
26
+ const date = value instanceof Date ? value : new Date(value);
27
+ const timestamp = date.getTime();
28
+ return Number.isNaN(timestamp) ? null : timestamp;
29
+ };
30
+ export const resolveRunDurationMs = (run) => {
31
+ const createdAtMs = resolveTimestampMs(run.createdAt);
32
+ if (createdAtMs == null) {
33
+ return null;
34
+ }
35
+ const endAtMs = resolveTimestampMs(run.finishedAt) ??
36
+ resolveTimestampMs(run.failedAt) ??
37
+ resolveTimestampMs(run.suspendedAt) ??
38
+ (run.status === "running" ? Date.now() : null);
39
+ if (endAtMs == null) {
40
+ return null;
41
+ }
42
+ return Math.max(0, endAtMs - createdAtMs);
43
+ };
44
+ const workflowRunAliasMap = {
45
+ workflowId: "workflow",
46
+ workflowVersionId: "workflowVersion",
47
+ triggeredById: "triggeredBy",
48
+ threadId: "thread",
49
+ };
50
+ const workflowRunStubObjectSchema = baseStubSchema.extend({
51
+ status: workflowRunStatusSchema,
52
+ input: preprocess(nullishToNull, z.record(z.string(), z.any()).nullable()),
53
+ output: preprocess(nullishToNull, z.record(z.string(), z.any()).nullable()),
54
+ context: preprocess((value) => (value == null ? {} : value), z.record(z.string(), z.any())),
55
+ snapshot: preprocess(nullishToNull, z.any().nullable()),
56
+ stepLog: preprocess(nullishToNull, z.record(z.string(), z.any()).nullable()),
57
+ suspendedStep: preprocess(nullishToNull, z.string().nullable()),
58
+ suspensionReason: preprocess(nullishToNull, z.string().nullable()),
59
+ suspensionData: preprocess(nullishToNull, z.unknown().nullable()),
60
+ suspensionStepExecId: preprocess(nullishToNull, z.string().nullable()),
61
+ suspensionIndex: preprocess(nullishToNull, z.coerce.number().nullable()),
62
+ suspensionKey: preprocess(nullishToNull, z.string().nullable()),
63
+ suspensionAwaitResults: preprocess(nullishToNull, z.record(z.string(), z.any()).nullable()),
64
+ lastResumeData: preprocess(nullishToNull, z.unknown().nullable()),
65
+ error: preprocess(nullishToNull, z.string().nullable()),
66
+ suspendedAt: preprocess(nullishToNull, z.coerce.date().nullable()),
67
+ finishedAt: preprocess(nullishToNull, z.coerce.date().nullable()),
68
+ failedAt: preprocess(nullishToNull, z.coerce.date().nullable()),
69
+ duration: preprocess(nullishToNull, z.coerce.number().nullable()),
70
+ metadata: preprocess(nullishToNull, z.record(z.string(), z.any()).nullable()),
71
+ });
72
+ const withWorkflowRunDuration = (value) => {
73
+ const record = toRecord(value);
74
+ if (!record) {
75
+ return value;
76
+ }
77
+ const next = cloneWithPrototype(record);
78
+ next.duration = resolveRunDurationMs(next);
79
+ return next;
80
+ };
81
+ const nullableUserOrSubscriberSchema = preprocess((value) => (value == null ? null : parseUserOrSubscriber(value)), userOrSubscriberSchema.nullable());
82
+ export const workflowRunStubSchema = preprocess(withWorkflowRunDuration, workflowRunStubObjectSchema);
83
+ export const workflowRunSchema = preprocess((value) => withAliases(withWorkflowRunDuration(value), workflowRunAliasMap), workflowRunStubObjectSchema.extend({
84
+ workflow: preprocess((value) => (value == null ? null : asId(value)), z.string()),
85
+ workflowVersion: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
86
+ triggeredBy: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
87
+ }));
88
+ export const workflowRunFullSchema = preprocess((value) => withWorkflowRunDuration(value), workflowRunStubObjectSchema.extend({
89
+ workflow: workflowSchema,
90
+ workflowVersion: z
91
+ .lazy(() => workflowVersionSchema)
92
+ .nullable()
93
+ .optional(),
94
+ triggeredBy: nullableUserOrSubscriberSchema,
95
+ thread: threadSchema.nullable().optional(),
96
+ }));
@@ -0,0 +1,36 @@
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/user";
11
+ import { workflowVersionActionSchema } from "./domain";
12
+ import { nullishToNull } from "./helpers";
13
+ import { workflowSchema } from "./workflow";
14
+ const workflowVersionAliasMap = {
15
+ parentVersionId: "parentVersion",
16
+ workflowId: "workflow",
17
+ createdById: "createdBy",
18
+ };
19
+ const workflowVersionStubObjectSchema = baseStubSchema.extend({
20
+ version: z.coerce.number(),
21
+ definitionYml: z.string(),
22
+ checksum: z.string(),
23
+ message: preprocess(nullishToNull, z.string().nullable()),
24
+ action: preprocess(nullishToNull, workflowVersionActionSchema.nullable()),
25
+ });
26
+ export const workflowVersionStubSchema = workflowVersionStubObjectSchema;
27
+ export const workflowVersionSchema = preprocess((value) => withAliases(value, workflowVersionAliasMap), workflowVersionStubObjectSchema.extend({
28
+ parentVersion: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
29
+ workflow: preprocess((value) => (value == null ? null : asId(value)), z.string()),
30
+ createdBy: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
31
+ }));
32
+ export const workflowVersionFullSchema = workflowVersionStubObjectSchema.extend({
33
+ parentVersion: preprocess(nullishToNull, z.lazy(() => workflowVersionSchema).nullable()),
34
+ workflow: z.lazy(() => workflowSchema),
35
+ createdBy: preprocess((value) => (value == null ? null : value), z.lazy(() => userSchema).nullable()),
36
+ });
@@ -0,0 +1,94 @@
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 { cloneWithPrototype, toRecord } from "../shared/object";
10
+ import { preprocess } from "../shared/preprocess";
11
+ import { userSchema } from "../user/user";
12
+ import { directionTypeSchema, workflowTypeSchema } from "./domain";
13
+ import { nullishToNull } from "./helpers";
14
+ import { workflowVersionSchema } from "./workflow-version";
15
+ const workflowAliasMap = {
16
+ currentVersionId: "currentVersion",
17
+ publishedVersionId: "publishedVersion",
18
+ createdById: "createdBy",
19
+ };
20
+ const workflowStubObjectSchema = baseStubSchema.extend({
21
+ name: z.string(),
22
+ description: preprocess(nullishToNull, z.string().nullable()),
23
+ type: workflowTypeSchema,
24
+ schedule: preprocess(nullishToNull, z.string().nullable()),
25
+ inputSchema: z.any(),
26
+ builtin: z.coerce.boolean(),
27
+ x: z.coerce.number(),
28
+ y: z.coerce.number(),
29
+ zoom: z.coerce.number(),
30
+ direction: directionTypeSchema,
31
+ });
32
+ const withWorkflowAliases = (value) => {
33
+ const original = toRecord(value);
34
+ const aliased = withAliases(value, workflowAliasMap);
35
+ const record = toRecord(aliased);
36
+ if (!record) {
37
+ return aliased;
38
+ }
39
+ const next = cloneWithPrototype(record);
40
+ const hasExplicitCurrentVersion = !!original && "currentVersion" in original;
41
+ const hasExplicitPublishedVersion = !!original && "publishedVersion" in original;
42
+ const hasCurrentVersion = next.currentVersion != null;
43
+ if (!hasExplicitCurrentVersion && next.currentVersion == null) {
44
+ delete next.currentVersion;
45
+ }
46
+ if (!hasExplicitPublishedVersion &&
47
+ next.publishedVersion == null &&
48
+ !hasCurrentVersion) {
49
+ delete next.publishedVersion;
50
+ }
51
+ return next;
52
+ };
53
+ const workflowDefinitionSchema = z.any();
54
+ const withWorkflowDerivedFields = (value, parseDefinition) => {
55
+ const record = toRecord(value);
56
+ if (!record) {
57
+ return value;
58
+ }
59
+ const next = cloneWithPrototype(record);
60
+ const currentVersion = toRecord(next.currentVersion);
61
+ const currentDefinitionYml = typeof next.definitionYml === "string"
62
+ ? next.definitionYml
63
+ : typeof currentVersion?.definitionYml === "string"
64
+ ? currentVersion.definitionYml
65
+ : undefined;
66
+ if (next.definitionYml === undefined && currentDefinitionYml !== undefined) {
67
+ next.definitionYml = currentDefinitionYml;
68
+ }
69
+ if (next.definition === undefined &&
70
+ typeof currentDefinitionYml === "string" &&
71
+ currentDefinitionYml.trim() !== "" &&
72
+ parseDefinition) {
73
+ next.definition = parseDefinition(currentDefinitionYml);
74
+ }
75
+ return next;
76
+ };
77
+ const workflowFullObjectSchema = workflowStubObjectSchema.extend({
78
+ currentVersion: preprocess((value) => (value == null ? null : value), z.lazy(() => workflowVersionSchema).nullable()),
79
+ publishedVersion: preprocess((value) => (value == null ? null : value), z.lazy(() => workflowVersionSchema).nullable()),
80
+ createdBy: preprocess((value) => (value == null ? null : value), z.lazy(() => userSchema).nullable()),
81
+ definitionYml: preprocess((value) => (value == null ? undefined : value), z.string().optional()).optional(),
82
+ definition: preprocess((value) => (value == null ? undefined : value), workflowDefinitionSchema.optional()).optional(),
83
+ });
84
+ export const workflowStubSchema = workflowStubObjectSchema;
85
+ export const workflowSchema = preprocess(withWorkflowAliases, workflowStubObjectSchema.extend({
86
+ currentVersion: preprocess((value) => value === undefined ? undefined : value == null ? null : asId(value), z.string().nullable().optional()).optional(),
87
+ publishedVersion: preprocess((value) => value === undefined ? undefined : value == null ? null : asId(value), z.string().nullable().optional()).optional(),
88
+ createdBy: preprocess((value) => (value == null ? null : asId(value)), z.string().nullable()),
89
+ runAfterMs: preprocess((value) => (value == null ? 0 : value), z.coerce.number()),
90
+ }));
91
+ export const createWorkflowFullSchema = (options) => {
92
+ return preprocess((value) => withWorkflowDerivedFields(value, options?.parseDefinition), workflowFullObjectSchema);
93
+ };
94
+ export const workflowFullSchema = createWorkflowFullSchema();
@@ -0,0 +1,3 @@
1
+ export { integrationHealthItemSchema, integrationHealthKindSchema, integrationHealthResponseSchema, integrationHealthStatusSchema, type IntegrationHealthItem, type IntegrationHealthKind, type IntegrationHealthResponse, type IntegrationHealthStatus, } from "./integration-health";
2
+ export { StatsType, statsFullSchema, statsSchema, statsStubSchema, type Stats, type StatsFull, type StatsStub, } from "./stats";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analytics/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,6BAA6B,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,eAAe,EACf,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,SAAS,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ export declare const integrationHealthStatusSchema: z.ZodEnum<{
3
+ healthy: "healthy";
4
+ warning: "warning";
5
+ unhealthy: "unhealthy";
6
+ disabled: "disabled";
7
+ }>;
8
+ export declare const integrationHealthKindSchema: z.ZodEnum<{
9
+ channel: "channel";
10
+ service: "service";
11
+ }>;
12
+ export declare const integrationHealthItemSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ kind: z.ZodEnum<{
15
+ channel: "channel";
16
+ service: "service";
17
+ }>;
18
+ name: z.ZodString;
19
+ status: z.ZodEnum<{
20
+ healthy: "healthy";
21
+ warning: "warning";
22
+ unhealthy: "unhealthy";
23
+ disabled: "disabled";
24
+ }>;
25
+ checkedAt: z.ZodString;
26
+ reason: z.ZodOptional<z.ZodString>;
27
+ message: z.ZodOptional<z.ZodString>;
28
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ }, z.core.$strip>;
30
+ export declare const integrationHealthResponseSchema: z.ZodObject<{
31
+ checkedAt: z.ZodString;
32
+ integrations: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodString;
34
+ kind: z.ZodEnum<{
35
+ channel: "channel";
36
+ service: "service";
37
+ }>;
38
+ name: z.ZodString;
39
+ status: z.ZodEnum<{
40
+ healthy: "healthy";
41
+ warning: "warning";
42
+ unhealthy: "unhealthy";
43
+ disabled: "disabled";
44
+ }>;
45
+ checkedAt: z.ZodString;
46
+ reason: z.ZodOptional<z.ZodString>;
47
+ message: z.ZodOptional<z.ZodString>;
48
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>;
51
+ export type IntegrationHealthStatus = z.infer<typeof integrationHealthStatusSchema>;
52
+ export type IntegrationHealthKind = z.infer<typeof integrationHealthKindSchema>;
53
+ export type IntegrationHealthItem = z.infer<typeof integrationHealthItemSchema>;
54
+ export type IntegrationHealthResponse = z.infer<typeof integrationHealthResponseSchema>;
55
+ //# sourceMappingURL=integration-health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-health.d.ts","sourceRoot":"","sources":["../../../src/analytics/integration-health.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B;;;;;EAKxC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;EAAiC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBAStC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;iBAG1C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC"}