@kelpie/server 0.1.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 (1146) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +57 -0
  3. package/dist/app.d.ts +36 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/app.js +98 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/index.d.ts +46 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +26 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/lib/actor.d.ts +71 -0
  12. package/dist/lib/actor.d.ts.map +1 -0
  13. package/dist/lib/actor.js +48 -0
  14. package/dist/lib/actor.js.map +1 -0
  15. package/dist/lib/changes.d.ts +17 -0
  16. package/dist/lib/changes.d.ts.map +1 -0
  17. package/dist/lib/changes.js +35 -0
  18. package/dist/lib/changes.js.map +1 -0
  19. package/dist/lib/columns.d.ts +152 -0
  20. package/dist/lib/columns.d.ts.map +1 -0
  21. package/dist/lib/columns.js +126 -0
  22. package/dist/lib/columns.js.map +1 -0
  23. package/dist/lib/config.d.ts +36 -0
  24. package/dist/lib/config.d.ts.map +1 -0
  25. package/dist/lib/config.js +52 -0
  26. package/dist/lib/config.js.map +1 -0
  27. package/dist/lib/database.d.ts +57 -0
  28. package/dist/lib/database.d.ts.map +1 -0
  29. package/dist/lib/database.js +91 -0
  30. package/dist/lib/database.js.map +1 -0
  31. package/dist/lib/dates.d.ts +11 -0
  32. package/dist/lib/dates.d.ts.map +1 -0
  33. package/dist/lib/dates.js +17 -0
  34. package/dist/lib/dates.js.map +1 -0
  35. package/dist/lib/email.d.ts +42 -0
  36. package/dist/lib/email.d.ts.map +1 -0
  37. package/dist/lib/email.js +38 -0
  38. package/dist/lib/email.js.map +1 -0
  39. package/dist/lib/errors.d.ts +76 -0
  40. package/dist/lib/errors.d.ts.map +1 -0
  41. package/dist/lib/errors.js +102 -0
  42. package/dist/lib/errors.js.map +1 -0
  43. package/dist/lib/http.d.ts +59 -0
  44. package/dist/lib/http.d.ts.map +1 -0
  45. package/dist/lib/http.js +89 -0
  46. package/dist/lib/http.js.map +1 -0
  47. package/dist/lib/ids.d.ts +55 -0
  48. package/dist/lib/ids.d.ts.map +1 -0
  49. package/dist/lib/ids.js +56 -0
  50. package/dist/lib/ids.js.map +1 -0
  51. package/dist/lib/logger.d.ts +22 -0
  52. package/dist/lib/logger.d.ts.map +1 -0
  53. package/dist/lib/logger.js +43 -0
  54. package/dist/lib/logger.js.map +1 -0
  55. package/dist/lib/moduleConfig.d.ts +14 -0
  56. package/dist/lib/moduleConfig.d.ts.map +1 -0
  57. package/dist/lib/moduleConfig.js +56 -0
  58. package/dist/lib/moduleConfig.js.map +1 -0
  59. package/dist/lib/normalisation.d.ts +19 -0
  60. package/dist/lib/normalisation.d.ts.map +1 -0
  61. package/dist/lib/normalisation.js +32 -0
  62. package/dist/lib/normalisation.js.map +1 -0
  63. package/dist/lib/pagination.d.ts +104 -0
  64. package/dist/lib/pagination.d.ts.map +1 -0
  65. package/dist/lib/pagination.js +189 -0
  66. package/dist/lib/pagination.js.map +1 -0
  67. package/dist/lib/passwords.d.ts +32 -0
  68. package/dist/lib/passwords.d.ts.map +1 -0
  69. package/dist/lib/passwords.js +51 -0
  70. package/dist/lib/passwords.js.map +1 -0
  71. package/dist/lib/search.d.ts +11 -0
  72. package/dist/lib/search.d.ts.map +1 -0
  73. package/dist/lib/search.js +25 -0
  74. package/dist/lib/search.js.map +1 -0
  75. package/dist/lib/secrets.d.ts +40 -0
  76. package/dist/lib/secrets.d.ts.map +1 -0
  77. package/dist/lib/secrets.js +152 -0
  78. package/dist/lib/secrets.js.map +1 -0
  79. package/dist/lib/timezones.d.ts +38 -0
  80. package/dist/lib/timezones.d.ts.map +1 -0
  81. package/dist/lib/timezones.js +55 -0
  82. package/dist/lib/timezones.js.map +1 -0
  83. package/dist/lib/tokens.d.ts +10 -0
  84. package/dist/lib/tokens.d.ts.map +1 -0
  85. package/dist/lib/tokens.js +31 -0
  86. package/dist/lib/tokens.js.map +1 -0
  87. package/dist/lib/url.d.ts +25 -0
  88. package/dist/lib/url.d.ts.map +1 -0
  89. package/dist/lib/url.js +41 -0
  90. package/dist/lib/url.js.map +1 -0
  91. package/dist/modules/activities/index.d.ts +18 -0
  92. package/dist/modules/activities/index.d.ts.map +1 -0
  93. package/dist/modules/activities/index.js +34 -0
  94. package/dist/modules/activities/index.js.map +1 -0
  95. package/dist/modules/activities/recorder.d.ts +53 -0
  96. package/dist/modules/activities/recorder.d.ts.map +1 -0
  97. package/dist/modules/activities/recorder.js +36 -0
  98. package/dist/modules/activities/recorder.js.map +1 -0
  99. package/dist/modules/activities/repository.d.ts +52 -0
  100. package/dist/modules/activities/repository.d.ts.map +1 -0
  101. package/dist/modules/activities/repository.js +127 -0
  102. package/dist/modules/activities/repository.js.map +1 -0
  103. package/dist/modules/activities/routes.d.ts +17 -0
  104. package/dist/modules/activities/routes.d.ts.map +1 -0
  105. package/dist/modules/activities/routes.js +45 -0
  106. package/dist/modules/activities/routes.js.map +1 -0
  107. package/dist/modules/activities/schema.d.ts +188 -0
  108. package/dist/modules/activities/schema.d.ts.map +1 -0
  109. package/dist/modules/activities/schema.js +34 -0
  110. package/dist/modules/activities/schema.js.map +1 -0
  111. package/dist/modules/activities/service.d.ts +32 -0
  112. package/dist/modules/activities/service.d.ts.map +1 -0
  113. package/dist/modules/activities/service.js +28 -0
  114. package/dist/modules/activities/service.js.map +1 -0
  115. package/dist/modules/activities/tools.d.ts +4 -0
  116. package/dist/modules/activities/tools.d.ts.map +1 -0
  117. package/dist/modules/activities/tools.js +26 -0
  118. package/dist/modules/activities/tools.js.map +1 -0
  119. package/dist/modules/activities/wording.d.ts +79 -0
  120. package/dist/modules/activities/wording.d.ts.map +1 -0
  121. package/dist/modules/activities/wording.js +134 -0
  122. package/dist/modules/activities/wording.js.map +1 -0
  123. package/dist/modules/agent-tasks/catalog.d.ts +16 -0
  124. package/dist/modules/agent-tasks/catalog.d.ts.map +1 -0
  125. package/dist/modules/agent-tasks/catalog.js +694 -0
  126. package/dist/modules/agent-tasks/catalog.js.map +1 -0
  127. package/dist/modules/agent-tasks/dispatch.d.ts +61 -0
  128. package/dist/modules/agent-tasks/dispatch.d.ts.map +1 -0
  129. package/dist/modules/agent-tasks/dispatch.js +139 -0
  130. package/dist/modules/agent-tasks/dispatch.js.map +1 -0
  131. package/dist/modules/agent-tasks/index.d.ts +17 -0
  132. package/dist/modules/agent-tasks/index.d.ts.map +1 -0
  133. package/dist/modules/agent-tasks/index.js +54 -0
  134. package/dist/modules/agent-tasks/index.js.map +1 -0
  135. package/dist/modules/agent-tasks/prompt.d.ts +41 -0
  136. package/dist/modules/agent-tasks/prompt.d.ts.map +1 -0
  137. package/dist/modules/agent-tasks/prompt.js +78 -0
  138. package/dist/modules/agent-tasks/prompt.js.map +1 -0
  139. package/dist/modules/agent-tasks/repository.d.ts +32 -0
  140. package/dist/modules/agent-tasks/repository.d.ts.map +1 -0
  141. package/dist/modules/agent-tasks/repository.js +83 -0
  142. package/dist/modules/agent-tasks/repository.js.map +1 -0
  143. package/dist/modules/agent-tasks/resolve.d.ts +44 -0
  144. package/dist/modules/agent-tasks/resolve.d.ts.map +1 -0
  145. package/dist/modules/agent-tasks/resolve.js +396 -0
  146. package/dist/modules/agent-tasks/resolve.js.map +1 -0
  147. package/dist/modules/agent-tasks/routes.d.ts +55 -0
  148. package/dist/modules/agent-tasks/routes.d.ts.map +1 -0
  149. package/dist/modules/agent-tasks/routes.js +173 -0
  150. package/dist/modules/agent-tasks/routes.js.map +1 -0
  151. package/dist/modules/agent-tasks/schema.d.ts +346 -0
  152. package/dist/modules/agent-tasks/schema.d.ts.map +1 -0
  153. package/dist/modules/agent-tasks/schema.js +47 -0
  154. package/dist/modules/agent-tasks/schema.js.map +1 -0
  155. package/dist/modules/agent-tasks/service.d.ts +79 -0
  156. package/dist/modules/agent-tasks/service.d.ts.map +1 -0
  157. package/dist/modules/agent-tasks/service.js +210 -0
  158. package/dist/modules/agent-tasks/service.js.map +1 -0
  159. package/dist/modules/agent-tasks/wire.d.ts +35 -0
  160. package/dist/modules/agent-tasks/wire.d.ts.map +1 -0
  161. package/dist/modules/agent-tasks/wire.js +31 -0
  162. package/dist/modules/agent-tasks/wire.js.map +1 -0
  163. package/dist/modules/api-keys/index.d.ts +9 -0
  164. package/dist/modules/api-keys/index.d.ts.map +1 -0
  165. package/dist/modules/api-keys/index.js +29 -0
  166. package/dist/modules/api-keys/index.js.map +1 -0
  167. package/dist/modules/api-keys/keys.d.ts +25 -0
  168. package/dist/modules/api-keys/keys.d.ts.map +1 -0
  169. package/dist/modules/api-keys/keys.js +40 -0
  170. package/dist/modules/api-keys/keys.js.map +1 -0
  171. package/dist/modules/api-keys/repository.d.ts +15 -0
  172. package/dist/modules/api-keys/repository.d.ts.map +1 -0
  173. package/dist/modules/api-keys/repository.js +48 -0
  174. package/dist/modules/api-keys/repository.js.map +1 -0
  175. package/dist/modules/api-keys/routes.d.ts +8 -0
  176. package/dist/modules/api-keys/routes.d.ts.map +1 -0
  177. package/dist/modules/api-keys/routes.js +52 -0
  178. package/dist/modules/api-keys/routes.js.map +1 -0
  179. package/dist/modules/api-keys/schema.d.ts +166 -0
  180. package/dist/modules/api-keys/schema.d.ts.map +1 -0
  181. package/dist/modules/api-keys/schema.js +23 -0
  182. package/dist/modules/api-keys/schema.js.map +1 -0
  183. package/dist/modules/api-keys/service.d.ts +37 -0
  184. package/dist/modules/api-keys/service.d.ts.map +1 -0
  185. package/dist/modules/api-keys/service.js +95 -0
  186. package/dist/modules/api-keys/service.js.map +1 -0
  187. package/dist/modules/attachedRecords.d.ts +39 -0
  188. package/dist/modules/attachedRecords.d.ts.map +1 -0
  189. package/dist/modules/attachedRecords.js +52 -0
  190. package/dist/modules/attachedRecords.js.map +1 -0
  191. package/dist/modules/auth/actor.d.ts +11 -0
  192. package/dist/modules/auth/actor.d.ts.map +1 -0
  193. package/dist/modules/auth/actor.js +10 -0
  194. package/dist/modules/auth/actor.js.map +1 -0
  195. package/dist/modules/auth/credentials.d.ts +18 -0
  196. package/dist/modules/auth/credentials.d.ts.map +1 -0
  197. package/dist/modules/auth/credentials.js +105 -0
  198. package/dist/modules/auth/credentials.js.map +1 -0
  199. package/dist/modules/auth/index.d.ts +3 -0
  200. package/dist/modules/auth/index.d.ts.map +1 -0
  201. package/dist/modules/auth/index.js +41 -0
  202. package/dist/modules/auth/index.js.map +1 -0
  203. package/dist/modules/auth/preferences.d.ts +34 -0
  204. package/dist/modules/auth/preferences.d.ts.map +1 -0
  205. package/dist/modules/auth/preferences.js +30 -0
  206. package/dist/modules/auth/preferences.js.map +1 -0
  207. package/dist/modules/auth/repository.d.ts +54 -0
  208. package/dist/modules/auth/repository.d.ts.map +1 -0
  209. package/dist/modules/auth/repository.js +137 -0
  210. package/dist/modules/auth/repository.js.map +1 -0
  211. package/dist/modules/auth/routes.d.ts +10 -0
  212. package/dist/modules/auth/routes.d.ts.map +1 -0
  213. package/dist/modules/auth/routes.js +181 -0
  214. package/dist/modules/auth/routes.js.map +1 -0
  215. package/dist/modules/auth/schema.d.ts +530 -0
  216. package/dist/modules/auth/schema.d.ts.map +1 -0
  217. package/dist/modules/auth/schema.js +67 -0
  218. package/dist/modules/auth/schema.js.map +1 -0
  219. package/dist/modules/auth/service.d.ts +73 -0
  220. package/dist/modules/auth/service.d.ts.map +1 -0
  221. package/dist/modules/auth/service.js +288 -0
  222. package/dist/modules/auth/service.js.map +1 -0
  223. package/dist/modules/auth/session.d.ts +16 -0
  224. package/dist/modules/auth/session.d.ts.map +1 -0
  225. package/dist/modules/auth/session.js +30 -0
  226. package/dist/modules/auth/session.js.map +1 -0
  227. package/dist/modules/companies/index.d.ts +9 -0
  228. package/dist/modules/companies/index.d.ts.map +1 -0
  229. package/dist/modules/companies/index.js +37 -0
  230. package/dist/modules/companies/index.js.map +1 -0
  231. package/dist/modules/companies/repository.d.ts +40 -0
  232. package/dist/modules/companies/repository.d.ts.map +1 -0
  233. package/dist/modules/companies/repository.js +112 -0
  234. package/dist/modules/companies/repository.js.map +1 -0
  235. package/dist/modules/companies/routes.d.ts +89 -0
  236. package/dist/modules/companies/routes.d.ts.map +1 -0
  237. package/dist/modules/companies/routes.js +125 -0
  238. package/dist/modules/companies/routes.js.map +1 -0
  239. package/dist/modules/companies/schema.d.ts +381 -0
  240. package/dist/modules/companies/schema.d.ts.map +1 -0
  241. package/dist/modules/companies/schema.js +51 -0
  242. package/dist/modules/companies/schema.js.map +1 -0
  243. package/dist/modules/companies/service.d.ts +49 -0
  244. package/dist/modules/companies/service.d.ts.map +1 -0
  245. package/dist/modules/companies/service.js +184 -0
  246. package/dist/modules/companies/service.js.map +1 -0
  247. package/dist/modules/companies/tools.d.ts +4 -0
  248. package/dist/modules/companies/tools.d.ts.map +1 -0
  249. package/dist/modules/companies/tools.js +27 -0
  250. package/dist/modules/companies/tools.js.map +1 -0
  251. package/dist/modules/core.d.ts +21 -0
  252. package/dist/modules/core.d.ts.map +1 -0
  253. package/dist/modules/core.js +82 -0
  254. package/dist/modules/core.js.map +1 -0
  255. package/dist/modules/crudTools.d.ts +99 -0
  256. package/dist/modules/crudTools.d.ts.map +1 -0
  257. package/dist/modules/crudTools.js +123 -0
  258. package/dist/modules/crudTools.js.map +1 -0
  259. package/dist/modules/dashboard/attention.d.ts +39 -0
  260. package/dist/modules/dashboard/attention.d.ts.map +1 -0
  261. package/dist/modules/dashboard/attention.js +57 -0
  262. package/dist/modules/dashboard/attention.js.map +1 -0
  263. package/dist/modules/dashboard/index.d.ts +15 -0
  264. package/dist/modules/dashboard/index.d.ts.map +1 -0
  265. package/dist/modules/dashboard/index.js +44 -0
  266. package/dist/modules/dashboard/index.js.map +1 -0
  267. package/dist/modules/dashboard/repository.d.ts +83 -0
  268. package/dist/modules/dashboard/repository.d.ts.map +1 -0
  269. package/dist/modules/dashboard/repository.js +217 -0
  270. package/dist/modules/dashboard/repository.js.map +1 -0
  271. package/dist/modules/dashboard/routes.d.ts +21 -0
  272. package/dist/modules/dashboard/routes.d.ts.map +1 -0
  273. package/dist/modules/dashboard/routes.js +116 -0
  274. package/dist/modules/dashboard/routes.js.map +1 -0
  275. package/dist/modules/dashboard/service.d.ts +122 -0
  276. package/dist/modules/dashboard/service.d.ts.map +1 -0
  277. package/dist/modules/dashboard/service.js +215 -0
  278. package/dist/modules/dashboard/service.js.map +1 -0
  279. package/dist/modules/dashboard/tools.d.ts +4 -0
  280. package/dist/modules/dashboard/tools.d.ts.map +1 -0
  281. package/dist/modules/dashboard/tools.js +33 -0
  282. package/dist/modules/dashboard/tools.js.map +1 -0
  283. package/dist/modules/deals/index.d.ts +11 -0
  284. package/dist/modules/deals/index.d.ts.map +1 -0
  285. package/dist/modules/deals/index.js +38 -0
  286. package/dist/modules/deals/index.js.map +1 -0
  287. package/dist/modules/deals/repository.d.ts +44 -0
  288. package/dist/modules/deals/repository.d.ts.map +1 -0
  289. package/dist/modules/deals/repository.js +160 -0
  290. package/dist/modules/deals/repository.js.map +1 -0
  291. package/dist/modules/deals/routes.d.ts +50 -0
  292. package/dist/modules/deals/routes.d.ts.map +1 -0
  293. package/dist/modules/deals/routes.js +132 -0
  294. package/dist/modules/deals/routes.js.map +1 -0
  295. package/dist/modules/deals/schema.d.ts +419 -0
  296. package/dist/modules/deals/schema.d.ts.map +1 -0
  297. package/dist/modules/deals/schema.js +61 -0
  298. package/dist/modules/deals/schema.js.map +1 -0
  299. package/dist/modules/deals/service.d.ts +71 -0
  300. package/dist/modules/deals/service.d.ts.map +1 -0
  301. package/dist/modules/deals/service.js +277 -0
  302. package/dist/modules/deals/service.js.map +1 -0
  303. package/dist/modules/deals/tools.d.ts +4 -0
  304. package/dist/modules/deals/tools.d.ts.map +1 -0
  305. package/dist/modules/deals/tools.js +33 -0
  306. package/dist/modules/deals/tools.js.map +1 -0
  307. package/dist/modules/decisions/index.d.ts +11 -0
  308. package/dist/modules/decisions/index.d.ts.map +1 -0
  309. package/dist/modules/decisions/index.js +34 -0
  310. package/dist/modules/decisions/index.js.map +1 -0
  311. package/dist/modules/decisions/repository.d.ts +38 -0
  312. package/dist/modules/decisions/repository.d.ts.map +1 -0
  313. package/dist/modules/decisions/repository.js +126 -0
  314. package/dist/modules/decisions/repository.js.map +1 -0
  315. package/dist/modules/decisions/routes.d.ts +42 -0
  316. package/dist/modules/decisions/routes.d.ts.map +1 -0
  317. package/dist/modules/decisions/routes.js +131 -0
  318. package/dist/modules/decisions/routes.js.map +1 -0
  319. package/dist/modules/decisions/schema.d.ts +228 -0
  320. package/dist/modules/decisions/schema.d.ts.map +1 -0
  321. package/dist/modules/decisions/schema.js +41 -0
  322. package/dist/modules/decisions/schema.js.map +1 -0
  323. package/dist/modules/decisions/service.d.ts +60 -0
  324. package/dist/modules/decisions/service.d.ts.map +1 -0
  325. package/dist/modules/decisions/service.js +122 -0
  326. package/dist/modules/decisions/service.js.map +1 -0
  327. package/dist/modules/decisions/tools.d.ts +4 -0
  328. package/dist/modules/decisions/tools.d.ts.map +1 -0
  329. package/dist/modules/decisions/tools.js +32 -0
  330. package/dist/modules/decisions/tools.js.map +1 -0
  331. package/dist/modules/forms/embed.d.ts +50 -0
  332. package/dist/modules/forms/embed.d.ts.map +1 -0
  333. package/dist/modules/forms/embed.js +236 -0
  334. package/dist/modules/forms/embed.js.map +1 -0
  335. package/dist/modules/forms/fields.d.ts +71 -0
  336. package/dist/modules/forms/fields.d.ts.map +1 -0
  337. package/dist/modules/forms/fields.js +122 -0
  338. package/dist/modules/forms/fields.js.map +1 -0
  339. package/dist/modules/forms/index.d.ts +15 -0
  340. package/dist/modules/forms/index.d.ts.map +1 -0
  341. package/dist/modules/forms/index.js +53 -0
  342. package/dist/modules/forms/index.js.map +1 -0
  343. package/dist/modules/forms/mapping.d.ts +99 -0
  344. package/dist/modules/forms/mapping.d.ts.map +1 -0
  345. package/dist/modules/forms/mapping.js +152 -0
  346. package/dist/modules/forms/mapping.js.map +1 -0
  347. package/dist/modules/forms/publicRoutes.d.ts +11 -0
  348. package/dist/modules/forms/publicRoutes.d.ts.map +1 -0
  349. package/dist/modules/forms/publicRoutes.js +68 -0
  350. package/dist/modules/forms/publicRoutes.js.map +1 -0
  351. package/dist/modules/forms/repository.d.ts +65 -0
  352. package/dist/modules/forms/repository.d.ts.map +1 -0
  353. package/dist/modules/forms/repository.js +139 -0
  354. package/dist/modules/forms/repository.js.map +1 -0
  355. package/dist/modules/forms/routes.d.ts +106 -0
  356. package/dist/modules/forms/routes.d.ts.map +1 -0
  357. package/dist/modules/forms/routes.js +204 -0
  358. package/dist/modules/forms/routes.js.map +1 -0
  359. package/dist/modules/forms/schema.d.ts +643 -0
  360. package/dist/modules/forms/schema.d.ts.map +1 -0
  361. package/dist/modules/forms/schema.js +87 -0
  362. package/dist/modules/forms/schema.js.map +1 -0
  363. package/dist/modules/forms/service.d.ts +62 -0
  364. package/dist/modules/forms/service.d.ts.map +1 -0
  365. package/dist/modules/forms/service.js +208 -0
  366. package/dist/modules/forms/service.js.map +1 -0
  367. package/dist/modules/forms/submission.d.ts +30 -0
  368. package/dist/modules/forms/submission.d.ts.map +1 -0
  369. package/dist/modules/forms/submission.js +337 -0
  370. package/dist/modules/forms/submission.js.map +1 -0
  371. package/dist/modules/forms/tools.d.ts +4 -0
  372. package/dist/modules/forms/tools.d.ts.map +1 -0
  373. package/dist/modules/forms/tools.js +46 -0
  374. package/dist/modules/forms/tools.js.map +1 -0
  375. package/dist/modules/handbook/index.d.ts +15 -0
  376. package/dist/modules/handbook/index.d.ts.map +1 -0
  377. package/dist/modules/handbook/index.js +37 -0
  378. package/dist/modules/handbook/index.js.map +1 -0
  379. package/dist/modules/handbook/repository.d.ts +52 -0
  380. package/dist/modules/handbook/repository.d.ts.map +1 -0
  381. package/dist/modules/handbook/repository.js +109 -0
  382. package/dist/modules/handbook/repository.js.map +1 -0
  383. package/dist/modules/handbook/routes.d.ts +38 -0
  384. package/dist/modules/handbook/routes.d.ts.map +1 -0
  385. package/dist/modules/handbook/routes.js +103 -0
  386. package/dist/modules/handbook/routes.js.map +1 -0
  387. package/dist/modules/handbook/schema.d.ts +206 -0
  388. package/dist/modules/handbook/schema.d.ts.map +1 -0
  389. package/dist/modules/handbook/schema.js +37 -0
  390. package/dist/modules/handbook/schema.js.map +1 -0
  391. package/dist/modules/handbook/service.d.ts +59 -0
  392. package/dist/modules/handbook/service.d.ts.map +1 -0
  393. package/dist/modules/handbook/service.js +246 -0
  394. package/dist/modules/handbook/service.js.map +1 -0
  395. package/dist/modules/handbook/slugs.d.ts +28 -0
  396. package/dist/modules/handbook/slugs.d.ts.map +1 -0
  397. package/dist/modules/handbook/slugs.js +48 -0
  398. package/dist/modules/handbook/slugs.js.map +1 -0
  399. package/dist/modules/handbook/tools.d.ts +4 -0
  400. package/dist/modules/handbook/tools.d.ts.map +1 -0
  401. package/dist/modules/handbook/tools.js +26 -0
  402. package/dist/modules/handbook/tools.js.map +1 -0
  403. package/dist/modules/handbook/tree.d.ts +69 -0
  404. package/dist/modules/handbook/tree.d.ts.map +1 -0
  405. package/dist/modules/handbook/tree.js +117 -0
  406. package/dist/modules/handbook/tree.js.map +1 -0
  407. package/dist/modules/hiring/candidates.d.ts +70 -0
  408. package/dist/modules/hiring/candidates.d.ts.map +1 -0
  409. package/dist/modules/hiring/candidates.js +243 -0
  410. package/dist/modules/hiring/candidates.js.map +1 -0
  411. package/dist/modules/hiring/index.d.ts +15 -0
  412. package/dist/modules/hiring/index.d.ts.map +1 -0
  413. package/dist/modules/hiring/index.js +48 -0
  414. package/dist/modules/hiring/index.js.map +1 -0
  415. package/dist/modules/hiring/repository.d.ts +52 -0
  416. package/dist/modules/hiring/repository.d.ts.map +1 -0
  417. package/dist/modules/hiring/repository.js +137 -0
  418. package/dist/modules/hiring/repository.js.map +1 -0
  419. package/dist/modules/hiring/roles.d.ts +42 -0
  420. package/dist/modules/hiring/roles.d.ts.map +1 -0
  421. package/dist/modules/hiring/roles.js +104 -0
  422. package/dist/modules/hiring/roles.js.map +1 -0
  423. package/dist/modules/hiring/routes.d.ts +73 -0
  424. package/dist/modules/hiring/routes.d.ts.map +1 -0
  425. package/dist/modules/hiring/routes.js +170 -0
  426. package/dist/modules/hiring/routes.js.map +1 -0
  427. package/dist/modules/hiring/schema.d.ts +308 -0
  428. package/dist/modules/hiring/schema.d.ts.map +1 -0
  429. package/dist/modules/hiring/schema.js +62 -0
  430. package/dist/modules/hiring/schema.js.map +1 -0
  431. package/dist/modules/hiring/tools.d.ts +8 -0
  432. package/dist/modules/hiring/tools.d.ts.map +1 -0
  433. package/dist/modules/hiring/tools.js +50 -0
  434. package/dist/modules/hiring/tools.js.map +1 -0
  435. package/dist/modules/import-export/csv.d.ts +47 -0
  436. package/dist/modules/import-export/csv.d.ts.map +1 -0
  437. package/dist/modules/import-export/csv.js +138 -0
  438. package/dist/modules/import-export/csv.js.map +1 -0
  439. package/dist/modules/import-export/drafts.d.ts +83 -0
  440. package/dist/modules/import-export/drafts.d.ts.map +1 -0
  441. package/dist/modules/import-export/drafts.js +97 -0
  442. package/dist/modules/import-export/drafts.js.map +1 -0
  443. package/dist/modules/import-export/exportRows.d.ts +8 -0
  444. package/dist/modules/import-export/exportRows.d.ts.map +1 -0
  445. package/dist/modules/import-export/exportRows.js +71 -0
  446. package/dist/modules/import-export/exportRows.js.map +1 -0
  447. package/dist/modules/import-export/index.d.ts +15 -0
  448. package/dist/modules/import-export/index.d.ts.map +1 -0
  449. package/dist/modules/import-export/index.js +43 -0
  450. package/dist/modules/import-export/index.js.map +1 -0
  451. package/dist/modules/import-export/mapping.d.ts +46 -0
  452. package/dist/modules/import-export/mapping.d.ts.map +1 -0
  453. package/dist/modules/import-export/mapping.js +115 -0
  454. package/dist/modules/import-export/mapping.js.map +1 -0
  455. package/dist/modules/import-export/plan.d.ts +107 -0
  456. package/dist/modules/import-export/plan.d.ts.map +1 -0
  457. package/dist/modules/import-export/plan.js +178 -0
  458. package/dist/modules/import-export/plan.js.map +1 -0
  459. package/dist/modules/import-export/presets.d.ts +39 -0
  460. package/dist/modules/import-export/presets.d.ts.map +1 -0
  461. package/dist/modules/import-export/presets.js +151 -0
  462. package/dist/modules/import-export/presets.js.map +1 -0
  463. package/dist/modules/import-export/repository.d.ts +171 -0
  464. package/dist/modules/import-export/repository.d.ts.map +1 -0
  465. package/dist/modules/import-export/repository.js +343 -0
  466. package/dist/modules/import-export/repository.js.map +1 -0
  467. package/dist/modules/import-export/routes.d.ts +9 -0
  468. package/dist/modules/import-export/routes.d.ts.map +1 -0
  469. package/dist/modules/import-export/routes.js +199 -0
  470. package/dist/modules/import-export/routes.js.map +1 -0
  471. package/dist/modules/import-export/schema.d.ts +494 -0
  472. package/dist/modules/import-export/schema.d.ts.map +1 -0
  473. package/dist/modules/import-export/schema.js +99 -0
  474. package/dist/modules/import-export/schema.js.map +1 -0
  475. package/dist/modules/import-export/service.d.ts +74 -0
  476. package/dist/modules/import-export/service.d.ts.map +1 -0
  477. package/dist/modules/import-export/service.js +561 -0
  478. package/dist/modules/import-export/service.js.map +1 -0
  479. package/dist/modules/import-export/streams.d.ts +4 -0
  480. package/dist/modules/import-export/streams.d.ts.map +1 -0
  481. package/dist/modules/import-export/streams.js +55 -0
  482. package/dist/modules/import-export/streams.js.map +1 -0
  483. package/dist/modules/import-export/tools.d.ts +22 -0
  484. package/dist/modules/import-export/tools.d.ts.map +1 -0
  485. package/dist/modules/import-export/tools.js +116 -0
  486. package/dist/modules/import-export/tools.js.map +1 -0
  487. package/dist/modules/import-export/validation.d.ts +7 -0
  488. package/dist/modules/import-export/validation.d.ts.map +1 -0
  489. package/dist/modules/import-export/validation.js +114 -0
  490. package/dist/modules/import-export/validation.js.map +1 -0
  491. package/dist/modules/import-export/writes.d.ts +45 -0
  492. package/dist/modules/import-export/writes.d.ts.map +1 -0
  493. package/dist/modules/import-export/writes.js +247 -0
  494. package/dist/modules/import-export/writes.js.map +1 -0
  495. package/dist/modules/integrations/schema.d.ts +185 -0
  496. package/dist/modules/integrations/schema.d.ts.map +1 -0
  497. package/dist/modules/integrations/schema.js +26 -0
  498. package/dist/modules/integrations/schema.js.map +1 -0
  499. package/dist/modules/mcp/index.d.ts +26 -0
  500. package/dist/modules/mcp/index.d.ts.map +1 -0
  501. package/dist/modules/mcp/index.js +45 -0
  502. package/dist/modules/mcp/index.js.map +1 -0
  503. package/dist/modules/mcp/protocol.d.ts +166 -0
  504. package/dist/modules/mcp/protocol.d.ts.map +1 -0
  505. package/dist/modules/mcp/protocol.js +292 -0
  506. package/dist/modules/mcp/protocol.js.map +1 -0
  507. package/dist/modules/mcp/router.d.ts +23 -0
  508. package/dist/modules/mcp/router.d.ts.map +1 -0
  509. package/dist/modules/mcp/router.js +298 -0
  510. package/dist/modules/mcp/router.js.map +1 -0
  511. package/dist/modules/notes/index.d.ts +9 -0
  512. package/dist/modules/notes/index.d.ts.map +1 -0
  513. package/dist/modules/notes/index.js +37 -0
  514. package/dist/modules/notes/index.js.map +1 -0
  515. package/dist/modules/notes/repository.d.ts +34 -0
  516. package/dist/modules/notes/repository.d.ts.map +1 -0
  517. package/dist/modules/notes/repository.js +70 -0
  518. package/dist/modules/notes/repository.js.map +1 -0
  519. package/dist/modules/notes/routes.d.ts +37 -0
  520. package/dist/modules/notes/routes.d.ts.map +1 -0
  521. package/dist/modules/notes/routes.js +124 -0
  522. package/dist/modules/notes/routes.js.map +1 -0
  523. package/dist/modules/notes/schema.d.ts +176 -0
  524. package/dist/modules/notes/schema.d.ts.map +1 -0
  525. package/dist/modules/notes/schema.js +35 -0
  526. package/dist/modules/notes/schema.js.map +1 -0
  527. package/dist/modules/notes/service.d.ts +49 -0
  528. package/dist/modules/notes/service.d.ts.map +1 -0
  529. package/dist/modules/notes/service.js +118 -0
  530. package/dist/modules/notes/service.js.map +1 -0
  531. package/dist/modules/notes/tools.d.ts +4 -0
  532. package/dist/modules/notes/tools.d.ts.map +1 -0
  533. package/dist/modules/notes/tools.js +41 -0
  534. package/dist/modules/notes/tools.js.map +1 -0
  535. package/dist/modules/opportunities/index.d.ts +11 -0
  536. package/dist/modules/opportunities/index.d.ts.map +1 -0
  537. package/dist/modules/opportunities/index.js +38 -0
  538. package/dist/modules/opportunities/index.js.map +1 -0
  539. package/dist/modules/opportunities/repository.d.ts +28 -0
  540. package/dist/modules/opportunities/repository.d.ts.map +1 -0
  541. package/dist/modules/opportunities/repository.js +89 -0
  542. package/dist/modules/opportunities/repository.js.map +1 -0
  543. package/dist/modules/opportunities/routes.d.ts +39 -0
  544. package/dist/modules/opportunities/routes.d.ts.map +1 -0
  545. package/dist/modules/opportunities/routes.js +104 -0
  546. package/dist/modules/opportunities/routes.js.map +1 -0
  547. package/dist/modules/opportunities/schema.d.ts +266 -0
  548. package/dist/modules/opportunities/schema.d.ts.map +1 -0
  549. package/dist/modules/opportunities/schema.js +41 -0
  550. package/dist/modules/opportunities/schema.js.map +1 -0
  551. package/dist/modules/opportunities/service.d.ts +60 -0
  552. package/dist/modules/opportunities/service.d.ts.map +1 -0
  553. package/dist/modules/opportunities/service.js +212 -0
  554. package/dist/modules/opportunities/service.js.map +1 -0
  555. package/dist/modules/opportunities/tools.d.ts +4 -0
  556. package/dist/modules/opportunities/tools.d.ts.map +1 -0
  557. package/dist/modules/opportunities/tools.js +33 -0
  558. package/dist/modules/opportunities/tools.js.map +1 -0
  559. package/dist/modules/partnerships/index.d.ts +11 -0
  560. package/dist/modules/partnerships/index.d.ts.map +1 -0
  561. package/dist/modules/partnerships/index.js +38 -0
  562. package/dist/modules/partnerships/index.js.map +1 -0
  563. package/dist/modules/partnerships/repository.d.ts +47 -0
  564. package/dist/modules/partnerships/repository.d.ts.map +1 -0
  565. package/dist/modules/partnerships/repository.js +169 -0
  566. package/dist/modules/partnerships/repository.js.map +1 -0
  567. package/dist/modules/partnerships/routes.d.ts +46 -0
  568. package/dist/modules/partnerships/routes.d.ts.map +1 -0
  569. package/dist/modules/partnerships/routes.js +122 -0
  570. package/dist/modules/partnerships/routes.js.map +1 -0
  571. package/dist/modules/partnerships/schema.d.ts +338 -0
  572. package/dist/modules/partnerships/schema.d.ts.map +1 -0
  573. package/dist/modules/partnerships/schema.js +54 -0
  574. package/dist/modules/partnerships/schema.js.map +1 -0
  575. package/dist/modules/partnerships/service.d.ts +71 -0
  576. package/dist/modules/partnerships/service.d.ts.map +1 -0
  577. package/dist/modules/partnerships/service.js +273 -0
  578. package/dist/modules/partnerships/service.js.map +1 -0
  579. package/dist/modules/partnerships/tools.d.ts +4 -0
  580. package/dist/modules/partnerships/tools.d.ts.map +1 -0
  581. package/dist/modules/partnerships/tools.js +35 -0
  582. package/dist/modules/partnerships/tools.js.map +1 -0
  583. package/dist/modules/people/index.d.ts +9 -0
  584. package/dist/modules/people/index.d.ts.map +1 -0
  585. package/dist/modules/people/index.js +37 -0
  586. package/dist/modules/people/index.js.map +1 -0
  587. package/dist/modules/people/repository.d.ts +31 -0
  588. package/dist/modules/people/repository.d.ts.map +1 -0
  589. package/dist/modules/people/repository.js +109 -0
  590. package/dist/modules/people/repository.js.map +1 -0
  591. package/dist/modules/people/routes.d.ts +111 -0
  592. package/dist/modules/people/routes.d.ts.map +1 -0
  593. package/dist/modules/people/routes.js +134 -0
  594. package/dist/modules/people/routes.js.map +1 -0
  595. package/dist/modules/people/schema.d.ts +354 -0
  596. package/dist/modules/people/schema.d.ts.map +1 -0
  597. package/dist/modules/people/schema.js +61 -0
  598. package/dist/modules/people/schema.js.map +1 -0
  599. package/dist/modules/people/service.d.ts +56 -0
  600. package/dist/modules/people/service.d.ts.map +1 -0
  601. package/dist/modules/people/service.js +190 -0
  602. package/dist/modules/people/service.js.map +1 -0
  603. package/dist/modules/people/tools.d.ts +4 -0
  604. package/dist/modules/people/tools.d.ts.map +1 -0
  605. package/dist/modules/people/tools.js +27 -0
  606. package/dist/modules/people/tools.js.map +1 -0
  607. package/dist/modules/pipelines/index.d.ts +9 -0
  608. package/dist/modules/pipelines/index.d.ts.map +1 -0
  609. package/dist/modules/pipelines/index.js +37 -0
  610. package/dist/modules/pipelines/index.js.map +1 -0
  611. package/dist/modules/pipelines/repository.d.ts +26 -0
  612. package/dist/modules/pipelines/repository.d.ts.map +1 -0
  613. package/dist/modules/pipelines/repository.js +67 -0
  614. package/dist/modules/pipelines/repository.js.map +1 -0
  615. package/dist/modules/pipelines/routes.d.ts +33 -0
  616. package/dist/modules/pipelines/routes.d.ts.map +1 -0
  617. package/dist/modules/pipelines/routes.js +98 -0
  618. package/dist/modules/pipelines/routes.js.map +1 -0
  619. package/dist/modules/pipelines/schema.d.ts +170 -0
  620. package/dist/modules/pipelines/schema.d.ts.map +1 -0
  621. package/dist/modules/pipelines/schema.js +30 -0
  622. package/dist/modules/pipelines/schema.js.map +1 -0
  623. package/dist/modules/pipelines/service.d.ts +49 -0
  624. package/dist/modules/pipelines/service.d.ts.map +1 -0
  625. package/dist/modules/pipelines/service.js +227 -0
  626. package/dist/modules/pipelines/service.js.map +1 -0
  627. package/dist/modules/pipelines/tools.d.ts +4 -0
  628. package/dist/modules/pipelines/tools.d.ts.map +1 -0
  629. package/dist/modules/pipelines/tools.js +43 -0
  630. package/dist/modules/pipelines/tools.js.map +1 -0
  631. package/dist/modules/plans/index.d.ts +10 -0
  632. package/dist/modules/plans/index.d.ts.map +1 -0
  633. package/dist/modules/plans/index.js +33 -0
  634. package/dist/modules/plans/index.js.map +1 -0
  635. package/dist/modules/plans/repository.d.ts +49 -0
  636. package/dist/modules/plans/repository.d.ts.map +1 -0
  637. package/dist/modules/plans/repository.js +94 -0
  638. package/dist/modules/plans/repository.js.map +1 -0
  639. package/dist/modules/plans/routes.d.ts +46 -0
  640. package/dist/modules/plans/routes.d.ts.map +1 -0
  641. package/dist/modules/plans/routes.js +152 -0
  642. package/dist/modules/plans/routes.js.map +1 -0
  643. package/dist/modules/plans/schema.d.ts +209 -0
  644. package/dist/modules/plans/schema.d.ts.map +1 -0
  645. package/dist/modules/plans/schema.js +37 -0
  646. package/dist/modules/plans/schema.js.map +1 -0
  647. package/dist/modules/plans/service.d.ts +57 -0
  648. package/dist/modules/plans/service.d.ts.map +1 -0
  649. package/dist/modules/plans/service.js +125 -0
  650. package/dist/modules/plans/service.js.map +1 -0
  651. package/dist/modules/plans/tools.d.ts +4 -0
  652. package/dist/modules/plans/tools.d.ts.map +1 -0
  653. package/dist/modules/plans/tools.js +39 -0
  654. package/dist/modules/plans/tools.js.map +1 -0
  655. package/dist/modules/positions/index.d.ts +9 -0
  656. package/dist/modules/positions/index.d.ts.map +1 -0
  657. package/dist/modules/positions/index.js +36 -0
  658. package/dist/modules/positions/index.js.map +1 -0
  659. package/dist/modules/positions/repository.d.ts +34 -0
  660. package/dist/modules/positions/repository.d.ts.map +1 -0
  661. package/dist/modules/positions/repository.js +71 -0
  662. package/dist/modules/positions/repository.js.map +1 -0
  663. package/dist/modules/positions/routes.d.ts +22 -0
  664. package/dist/modules/positions/routes.d.ts.map +1 -0
  665. package/dist/modules/positions/routes.js +56 -0
  666. package/dist/modules/positions/routes.js.map +1 -0
  667. package/dist/modules/positions/schema.d.ts +154 -0
  668. package/dist/modules/positions/schema.d.ts.map +1 -0
  669. package/dist/modules/positions/schema.js +36 -0
  670. package/dist/modules/positions/schema.js.map +1 -0
  671. package/dist/modules/positions/service.d.ts +46 -0
  672. package/dist/modules/positions/service.d.ts.map +1 -0
  673. package/dist/modules/positions/service.js +159 -0
  674. package/dist/modules/positions/service.js.map +1 -0
  675. package/dist/modules/positions/tools.d.ts +4 -0
  676. package/dist/modules/positions/tools.d.ts.map +1 -0
  677. package/dist/modules/positions/tools.js +26 -0
  678. package/dist/modules/positions/tools.js.map +1 -0
  679. package/dist/modules/raises/index.d.ts +11 -0
  680. package/dist/modules/raises/index.d.ts.map +1 -0
  681. package/dist/modules/raises/index.js +38 -0
  682. package/dist/modules/raises/index.js.map +1 -0
  683. package/dist/modules/raises/repository.d.ts +48 -0
  684. package/dist/modules/raises/repository.d.ts.map +1 -0
  685. package/dist/modules/raises/repository.js +164 -0
  686. package/dist/modules/raises/repository.js.map +1 -0
  687. package/dist/modules/raises/routes.d.ts +48 -0
  688. package/dist/modules/raises/routes.d.ts.map +1 -0
  689. package/dist/modules/raises/routes.js +126 -0
  690. package/dist/modules/raises/routes.js.map +1 -0
  691. package/dist/modules/raises/schema.d.ts +356 -0
  692. package/dist/modules/raises/schema.d.ts.map +1 -0
  693. package/dist/modules/raises/schema.js +55 -0
  694. package/dist/modules/raises/schema.js.map +1 -0
  695. package/dist/modules/raises/service.d.ts +79 -0
  696. package/dist/modules/raises/service.d.ts.map +1 -0
  697. package/dist/modules/raises/service.js +275 -0
  698. package/dist/modules/raises/service.js.map +1 -0
  699. package/dist/modules/raises/tools.d.ts +4 -0
  700. package/dist/modules/raises/tools.d.ts.map +1 -0
  701. package/dist/modules/raises/tools.js +33 -0
  702. package/dist/modules/raises/tools.js.map +1 -0
  703. package/dist/modules/recordTargets.d.ts +55 -0
  704. package/dist/modules/recordTargets.d.ts.map +1 -0
  705. package/dist/modules/recordTargets.js +107 -0
  706. package/dist/modules/recordTargets.js.map +1 -0
  707. package/dist/modules/references.d.ts +8 -0
  708. package/dist/modules/references.d.ts.map +1 -0
  709. package/dist/modules/references.js +40 -0
  710. package/dist/modules/references.js.map +1 -0
  711. package/dist/modules/reseal.d.ts +33 -0
  712. package/dist/modules/reseal.d.ts.map +1 -0
  713. package/dist/modules/reseal.js +108 -0
  714. package/dist/modules/reseal.js.map +1 -0
  715. package/dist/modules/search/index.d.ts +21 -0
  716. package/dist/modules/search/index.d.ts.map +1 -0
  717. package/dist/modules/search/index.js +50 -0
  718. package/dist/modules/search/index.js.map +1 -0
  719. package/dist/modules/search/query.d.ts +44 -0
  720. package/dist/modules/search/query.d.ts.map +1 -0
  721. package/dist/modules/search/query.js +88 -0
  722. package/dist/modules/search/query.js.map +1 -0
  723. package/dist/modules/search/repository.d.ts +44 -0
  724. package/dist/modules/search/repository.d.ts.map +1 -0
  725. package/dist/modules/search/repository.js +252 -0
  726. package/dist/modules/search/repository.js.map +1 -0
  727. package/dist/modules/search/routes.d.ts +17 -0
  728. package/dist/modules/search/routes.d.ts.map +1 -0
  729. package/dist/modules/search/routes.js +93 -0
  730. package/dist/modules/search/routes.js.map +1 -0
  731. package/dist/modules/search/service.d.ts +55 -0
  732. package/dist/modules/search/service.d.ts.map +1 -0
  733. package/dist/modules/search/service.js +69 -0
  734. package/dist/modules/search/service.js.map +1 -0
  735. package/dist/modules/search/tools.d.ts +4 -0
  736. package/dist/modules/search/tools.d.ts.map +1 -0
  737. package/dist/modules/search/tools.js +52 -0
  738. package/dist/modules/search/tools.js.map +1 -0
  739. package/dist/modules/stagedRecords.d.ts +28 -0
  740. package/dist/modules/stagedRecords.d.ts.map +1 -0
  741. package/dist/modules/stagedRecords.js +50 -0
  742. package/dist/modules/stagedRecords.js.map +1 -0
  743. package/dist/modules/webhooks/delivery.d.ts +98 -0
  744. package/dist/modules/webhooks/delivery.d.ts.map +1 -0
  745. package/dist/modules/webhooks/delivery.js +237 -0
  746. package/dist/modules/webhooks/delivery.js.map +1 -0
  747. package/dist/modules/webhooks/index.d.ts +23 -0
  748. package/dist/modules/webhooks/index.d.ts.map +1 -0
  749. package/dist/modules/webhooks/index.js +48 -0
  750. package/dist/modules/webhooks/index.js.map +1 -0
  751. package/dist/modules/webhooks/payloads.d.ts +31 -0
  752. package/dist/modules/webhooks/payloads.d.ts.map +1 -0
  753. package/dist/modules/webhooks/payloads.js +52 -0
  754. package/dist/modules/webhooks/payloads.js.map +1 -0
  755. package/dist/modules/webhooks/repository.d.ts +70 -0
  756. package/dist/modules/webhooks/repository.d.ts.map +1 -0
  757. package/dist/modules/webhooks/repository.js +140 -0
  758. package/dist/modules/webhooks/repository.js.map +1 -0
  759. package/dist/modules/webhooks/routes.d.ts +47 -0
  760. package/dist/modules/webhooks/routes.d.ts.map +1 -0
  761. package/dist/modules/webhooks/routes.js +170 -0
  762. package/dist/modules/webhooks/routes.js.map +1 -0
  763. package/dist/modules/webhooks/schema.d.ts +396 -0
  764. package/dist/modules/webhooks/schema.d.ts.map +1 -0
  765. package/dist/modules/webhooks/schema.js +61 -0
  766. package/dist/modules/webhooks/schema.js.map +1 -0
  767. package/dist/modules/webhooks/service.d.ts +65 -0
  768. package/dist/modules/webhooks/service.d.ts.map +1 -0
  769. package/dist/modules/webhooks/service.js +202 -0
  770. package/dist/modules/webhooks/service.js.map +1 -0
  771. package/dist/modules/webhooks/signing.d.ts +57 -0
  772. package/dist/modules/webhooks/signing.d.ts.map +1 -0
  773. package/dist/modules/webhooks/signing.js +69 -0
  774. package/dist/modules/webhooks/signing.js.map +1 -0
  775. package/dist/modules/webhooks/tools.d.ts +4 -0
  776. package/dist/modules/webhooks/tools.d.ts.map +1 -0
  777. package/dist/modules/webhooks/tools.js +77 -0
  778. package/dist/modules/webhooks/tools.js.map +1 -0
  779. package/dist/modules/webhooks/url.d.ts +10 -0
  780. package/dist/modules/webhooks/url.d.ts.map +1 -0
  781. package/dist/modules/webhooks/url.js +9 -0
  782. package/dist/modules/webhooks/url.js.map +1 -0
  783. package/dist/modules/workspace/capabilities.d.ts +9 -0
  784. package/dist/modules/workspace/capabilities.d.ts.map +1 -0
  785. package/dist/modules/workspace/capabilities.js +12 -0
  786. package/dist/modules/workspace/capabilities.js.map +1 -0
  787. package/dist/modules/workspace/idempotencyMiddleware.d.ts +16 -0
  788. package/dist/modules/workspace/idempotencyMiddleware.d.ts.map +1 -0
  789. package/dist/modules/workspace/idempotencyMiddleware.js +142 -0
  790. package/dist/modules/workspace/idempotencyMiddleware.js.map +1 -0
  791. package/dist/modules/workspace/idempotencyRepository.d.ts +43 -0
  792. package/dist/modules/workspace/idempotencyRepository.d.ts.map +1 -0
  793. package/dist/modules/workspace/idempotencyRepository.js +75 -0
  794. package/dist/modules/workspace/idempotencyRepository.js.map +1 -0
  795. package/dist/modules/workspace/index.d.ts +9 -0
  796. package/dist/modules/workspace/index.d.ts.map +1 -0
  797. package/dist/modules/workspace/index.js +53 -0
  798. package/dist/modules/workspace/index.js.map +1 -0
  799. package/dist/modules/workspace/repository.d.ts +112 -0
  800. package/dist/modules/workspace/repository.d.ts.map +1 -0
  801. package/dist/modules/workspace/repository.js +266 -0
  802. package/dist/modules/workspace/repository.js.map +1 -0
  803. package/dist/modules/workspace/roles.d.ts +22 -0
  804. package/dist/modules/workspace/roles.d.ts.map +1 -0
  805. package/dist/modules/workspace/roles.js +31 -0
  806. package/dist/modules/workspace/roles.js.map +1 -0
  807. package/dist/modules/workspace/routes.d.ts +41 -0
  808. package/dist/modules/workspace/routes.d.ts.map +1 -0
  809. package/dist/modules/workspace/routes.js +158 -0
  810. package/dist/modules/workspace/routes.js.map +1 -0
  811. package/dist/modules/workspace/schema.d.ts +719 -0
  812. package/dist/modules/workspace/schema.d.ts.map +1 -0
  813. package/dist/modules/workspace/schema.js +102 -0
  814. package/dist/modules/workspace/schema.js.map +1 -0
  815. package/dist/modules/workspace/service.d.ts +94 -0
  816. package/dist/modules/workspace/service.d.ts.map +1 -0
  817. package/dist/modules/workspace/service.js +528 -0
  818. package/dist/modules/workspace/service.js.map +1 -0
  819. package/dist/modules/workspace/starters.d.ts +22 -0
  820. package/dist/modules/workspace/starters.d.ts.map +1 -0
  821. package/dist/modules/workspace/starters.js +56 -0
  822. package/dist/modules/workspace/starters.js.map +1 -0
  823. package/dist/modules/workspace/tools.d.ts +4 -0
  824. package/dist/modules/workspace/tools.d.ts.map +1 -0
  825. package/dist/modules/workspace/tools.js +95 -0
  826. package/dist/modules/workspace/tools.js.map +1 -0
  827. package/dist/runtime/entitlements.d.ts +66 -0
  828. package/dist/runtime/entitlements.d.ts.map +1 -0
  829. package/dist/runtime/entitlements.js +62 -0
  830. package/dist/runtime/entitlements.js.map +1 -0
  831. package/dist/runtime/events.d.ts +139 -0
  832. package/dist/runtime/events.d.ts.map +1 -0
  833. package/dist/runtime/events.js +98 -0
  834. package/dist/runtime/events.js.map +1 -0
  835. package/dist/runtime/migrate.d.ts +28 -0
  836. package/dist/runtime/migrate.d.ts.map +1 -0
  837. package/dist/runtime/migrate.js +43 -0
  838. package/dist/runtime/migrate.js.map +1 -0
  839. package/dist/runtime/module.d.ts +138 -0
  840. package/dist/runtime/module.d.ts.map +1 -0
  841. package/dist/runtime/module.js +2 -0
  842. package/dist/runtime/module.js.map +1 -0
  843. package/dist/runtime/moduleConfig.d.ts +21 -0
  844. package/dist/runtime/moduleConfig.d.ts.map +1 -0
  845. package/dist/runtime/moduleConfig.js +54 -0
  846. package/dist/runtime/moduleConfig.js.map +1 -0
  847. package/dist/runtime/order.d.ts +21 -0
  848. package/dist/runtime/order.d.ts.map +1 -0
  849. package/dist/runtime/order.js +72 -0
  850. package/dist/runtime/order.js.map +1 -0
  851. package/dist/runtime/registry.d.ts +66 -0
  852. package/dist/runtime/registry.d.ts.map +1 -0
  853. package/dist/runtime/registry.js +148 -0
  854. package/dist/runtime/registry.js.map +1 -0
  855. package/dist/runtime/transaction.d.ts +34 -0
  856. package/dist/runtime/transaction.d.ts.map +1 -0
  857. package/dist/runtime/transaction.js +24 -0
  858. package/dist/runtime/transaction.js.map +1 -0
  859. package/dist/schema/index.d.ts +30 -0
  860. package/dist/schema/index.d.ts.map +1 -0
  861. package/dist/schema/index.js +30 -0
  862. package/dist/schema/index.js.map +1 -0
  863. package/dist/testing/app.d.ts +42 -0
  864. package/dist/testing/app.d.ts.map +1 -0
  865. package/dist/testing/app.js +31 -0
  866. package/dist/testing/app.js.map +1 -0
  867. package/dist/testing/client.d.ts +34 -0
  868. package/dist/testing/client.d.ts.map +1 -0
  869. package/dist/testing/client.js +70 -0
  870. package/dist/testing/client.js.map +1 -0
  871. package/dist/testing/database.d.ts +17 -0
  872. package/dist/testing/database.d.ts.map +1 -0
  873. package/dist/testing/database.js +84 -0
  874. package/dist/testing/database.js.map +1 -0
  875. package/dist/testing/environment.d.ts +17 -0
  876. package/dist/testing/environment.d.ts.map +1 -0
  877. package/dist/testing/environment.js +19 -0
  878. package/dist/testing/environment.js.map +1 -0
  879. package/dist/testing/fixtures.d.ts +22 -0
  880. package/dist/testing/fixtures.d.ts.map +1 -0
  881. package/dist/testing/fixtures.js +55 -0
  882. package/dist/testing/fixtures.js.map +1 -0
  883. package/dist/testing/index.d.ts +10 -0
  884. package/dist/testing/index.d.ts.map +1 -0
  885. package/dist/testing/index.js +6 -0
  886. package/dist/testing/index.js.map +1 -0
  887. package/dist/testing/services.d.ts +18 -0
  888. package/dist/testing/services.d.ts.map +1 -0
  889. package/dist/testing/services.js +43 -0
  890. package/dist/testing/services.js.map +1 -0
  891. package/migrations/0000_initial_schema.sql +597 -0
  892. package/migrations/0001_uneven_lockjaw.sql +11 -0
  893. package/migrations/0002_neat_madame_web.sql +2 -0
  894. package/migrations/0003_bright_shockwave.sql +1 -0
  895. package/migrations/0004_drop_unused_import_columns.sql +2 -0
  896. package/migrations/0005_import_job_rows.sql +23 -0
  897. package/migrations/0006_drop_webhook_secret_hash.sql +1 -0
  898. package/migrations/0007_add_webhook_secret_encrypted.sql +1 -0
  899. package/migrations/0008_rich_mister_sinister.sql +3 -0
  900. package/migrations/0009_natural_proemial_gods.sql +1 -0
  901. package/migrations/0010_fine_brood.sql +1 -0
  902. package/migrations/0011_add_webhook_previous_secret.sql +2 -0
  903. package/migrations/0012_idempotency_keys_response_nullable.sql +1 -0
  904. package/migrations/0013_add_agent_run_failure_reason.sql +1 -0
  905. package/migrations/0014_right_shinko_yamashiro.sql +12 -0
  906. package/migrations/0015_peaceful_chimera.sql +33 -0
  907. package/migrations/meta/0000_snapshot.json +4467 -0
  908. package/migrations/meta/0001_snapshot.json +4539 -0
  909. package/migrations/meta/0002_snapshot.json +4539 -0
  910. package/migrations/meta/0003_snapshot.json +4544 -0
  911. package/migrations/meta/0004_snapshot.json +4531 -0
  912. package/migrations/meta/0005_snapshot.json +4674 -0
  913. package/migrations/meta/0006_snapshot.json +4668 -0
  914. package/migrations/meta/0007_snapshot.json +4674 -0
  915. package/migrations/meta/0008_snapshot.json +4694 -0
  916. package/migrations/meta/0009_snapshot.json +4700 -0
  917. package/migrations/meta/0010_snapshot.json +4694 -0
  918. package/migrations/meta/0011_snapshot.json +4706 -0
  919. package/migrations/meta/0012_snapshot.json +4706 -0
  920. package/migrations/meta/0013_snapshot.json +4712 -0
  921. package/migrations/meta/0014_snapshot.json +4802 -0
  922. package/migrations/meta/0015_snapshot.json +5077 -0
  923. package/migrations/meta/_journal.json +118 -0
  924. package/package.json +68 -0
  925. package/src/app.ts +157 -0
  926. package/src/index.ts +113 -0
  927. package/src/lib/actor.ts +99 -0
  928. package/src/lib/changes.ts +43 -0
  929. package/src/lib/columns.ts +170 -0
  930. package/src/lib/config.ts +86 -0
  931. package/src/lib/database.ts +118 -0
  932. package/src/lib/dates.ts +18 -0
  933. package/src/lib/email.ts +65 -0
  934. package/src/lib/errors.ts +156 -0
  935. package/src/lib/http.ts +109 -0
  936. package/src/lib/ids.ts +61 -0
  937. package/src/lib/logger.ts +73 -0
  938. package/src/lib/moduleConfig.ts +65 -0
  939. package/src/lib/normalisation.ts +36 -0
  940. package/src/lib/pagination.ts +291 -0
  941. package/src/lib/passwords.ts +56 -0
  942. package/src/lib/search.ts +29 -0
  943. package/src/lib/secrets.ts +223 -0
  944. package/src/lib/timezones.ts +59 -0
  945. package/src/lib/tokens.ts +37 -0
  946. package/src/lib/url.ts +52 -0
  947. package/src/modules/activities/index.ts +43 -0
  948. package/src/modules/activities/recorder.ts +108 -0
  949. package/src/modules/activities/repository.ts +196 -0
  950. package/src/modules/activities/routes.ts +78 -0
  951. package/src/modules/activities/schema.ts +41 -0
  952. package/src/modules/activities/service.ts +93 -0
  953. package/src/modules/activities/tools.ts +40 -0
  954. package/src/modules/activities/wording.ts +168 -0
  955. package/src/modules/agent-tasks/catalog.ts +712 -0
  956. package/src/modules/agent-tasks/dispatch.ts +188 -0
  957. package/src/modules/agent-tasks/index.ts +79 -0
  958. package/src/modules/agent-tasks/prompt.ts +140 -0
  959. package/src/modules/agent-tasks/repository.ts +152 -0
  960. package/src/modules/agent-tasks/resolve.ts +704 -0
  961. package/src/modules/agent-tasks/routes.ts +260 -0
  962. package/src/modules/agent-tasks/schema.ts +57 -0
  963. package/src/modules/agent-tasks/service.ts +370 -0
  964. package/src/modules/agent-tasks/wire.ts +61 -0
  965. package/src/modules/api-keys/index.ts +34 -0
  966. package/src/modules/api-keys/keys.ts +59 -0
  967. package/src/modules/api-keys/repository.ts +82 -0
  968. package/src/modules/api-keys/routes.ts +83 -0
  969. package/src/modules/api-keys/schema.ts +28 -0
  970. package/src/modules/api-keys/service.ts +152 -0
  971. package/src/modules/attachedRecords.ts +85 -0
  972. package/src/modules/auth/actor.ts +17 -0
  973. package/src/modules/auth/credentials.ts +153 -0
  974. package/src/modules/auth/index.ts +49 -0
  975. package/src/modules/auth/preferences.ts +57 -0
  976. package/src/modules/auth/repository.ts +240 -0
  977. package/src/modules/auth/routes.ts +247 -0
  978. package/src/modules/auth/schema.ts +77 -0
  979. package/src/modules/auth/service.ts +441 -0
  980. package/src/modules/auth/session.ts +40 -0
  981. package/src/modules/companies/index.ts +43 -0
  982. package/src/modules/companies/repository.ts +185 -0
  983. package/src/modules/companies/routes.ts +170 -0
  984. package/src/modules/companies/schema.ts +66 -0
  985. package/src/modules/companies/service.ts +267 -0
  986. package/src/modules/companies/tools.ts +32 -0
  987. package/src/modules/core.ts +93 -0
  988. package/src/modules/crudTools.ts +226 -0
  989. package/src/modules/dashboard/attention.ts +67 -0
  990. package/src/modules/dashboard/index.ts +49 -0
  991. package/src/modules/dashboard/repository.ts +360 -0
  992. package/src/modules/dashboard/routes.ts +171 -0
  993. package/src/modules/dashboard/service.ts +449 -0
  994. package/src/modules/dashboard/tools.ts +39 -0
  995. package/src/modules/deals/index.ts +44 -0
  996. package/src/modules/deals/repository.ts +251 -0
  997. package/src/modules/deals/routes.ts +166 -0
  998. package/src/modules/deals/schema.ts +72 -0
  999. package/src/modules/deals/service.ts +433 -0
  1000. package/src/modules/deals/tools.ts +39 -0
  1001. package/src/modules/decisions/index.ts +40 -0
  1002. package/src/modules/decisions/repository.ts +204 -0
  1003. package/src/modules/decisions/routes.ts +184 -0
  1004. package/src/modules/decisions/schema.ts +56 -0
  1005. package/src/modules/decisions/service.ts +223 -0
  1006. package/src/modules/decisions/tools.ts +38 -0
  1007. package/src/modules/forms/embed.ts +274 -0
  1008. package/src/modules/forms/fields.ts +206 -0
  1009. package/src/modules/forms/index.ts +61 -0
  1010. package/src/modules/forms/mapping.ts +222 -0
  1011. package/src/modules/forms/publicRoutes.ts +92 -0
  1012. package/src/modules/forms/repository.ts +223 -0
  1013. package/src/modules/forms/routes.ts +276 -0
  1014. package/src/modules/forms/schema.ts +135 -0
  1015. package/src/modules/forms/service.ts +362 -0
  1016. package/src/modules/forms/submission.ts +496 -0
  1017. package/src/modules/forms/tools.ts +66 -0
  1018. package/src/modules/handbook/index.ts +43 -0
  1019. package/src/modules/handbook/repository.ts +173 -0
  1020. package/src/modules/handbook/routes.ts +145 -0
  1021. package/src/modules/handbook/schema.ts +43 -0
  1022. package/src/modules/handbook/service.ts +399 -0
  1023. package/src/modules/handbook/slugs.ts +54 -0
  1024. package/src/modules/handbook/tools.ts +32 -0
  1025. package/src/modules/handbook/tree.ts +158 -0
  1026. package/src/modules/hiring/candidates.ts +391 -0
  1027. package/src/modules/hiring/index.ts +55 -0
  1028. package/src/modules/hiring/repository.ts +244 -0
  1029. package/src/modules/hiring/roles.ts +174 -0
  1030. package/src/modules/hiring/routes.ts +257 -0
  1031. package/src/modules/hiring/schema.ts +93 -0
  1032. package/src/modules/hiring/tools.ts +73 -0
  1033. package/src/modules/import-export/csv.ts +180 -0
  1034. package/src/modules/import-export/drafts.ts +182 -0
  1035. package/src/modules/import-export/exportRows.ts +85 -0
  1036. package/src/modules/import-export/index.ts +49 -0
  1037. package/src/modules/import-export/mapping.ts +154 -0
  1038. package/src/modules/import-export/plan.ts +311 -0
  1039. package/src/modules/import-export/presets.ts +183 -0
  1040. package/src/modules/import-export/repository.ts +603 -0
  1041. package/src/modules/import-export/routes.ts +276 -0
  1042. package/src/modules/import-export/schema.ts +142 -0
  1043. package/src/modules/import-export/service.ts +842 -0
  1044. package/src/modules/import-export/streams.ts +98 -0
  1045. package/src/modules/import-export/tools.ts +153 -0
  1046. package/src/modules/import-export/validation.ts +163 -0
  1047. package/src/modules/import-export/writes.ts +365 -0
  1048. package/src/modules/integrations/schema.ts +31 -0
  1049. package/src/modules/mcp/index.ts +52 -0
  1050. package/src/modules/mcp/protocol.ts +442 -0
  1051. package/src/modules/mcp/router.ts +425 -0
  1052. package/src/modules/notes/index.ts +43 -0
  1053. package/src/modules/notes/repository.ts +130 -0
  1054. package/src/modules/notes/routes.ts +170 -0
  1055. package/src/modules/notes/schema.ts +42 -0
  1056. package/src/modules/notes/service.ts +204 -0
  1057. package/src/modules/notes/tools.ts +46 -0
  1058. package/src/modules/opportunities/index.ts +44 -0
  1059. package/src/modules/opportunities/repository.ts +157 -0
  1060. package/src/modules/opportunities/routes.ts +152 -0
  1061. package/src/modules/opportunities/schema.ts +47 -0
  1062. package/src/modules/opportunities/service.ts +342 -0
  1063. package/src/modules/opportunities/tools.ts +39 -0
  1064. package/src/modules/partnerships/index.ts +44 -0
  1065. package/src/modules/partnerships/repository.ts +274 -0
  1066. package/src/modules/partnerships/routes.ts +170 -0
  1067. package/src/modules/partnerships/schema.ts +65 -0
  1068. package/src/modules/partnerships/service.ts +442 -0
  1069. package/src/modules/partnerships/tools.ts +41 -0
  1070. package/src/modules/people/index.ts +43 -0
  1071. package/src/modules/people/repository.ts +167 -0
  1072. package/src/modules/people/routes.ts +175 -0
  1073. package/src/modules/people/schema.ts +89 -0
  1074. package/src/modules/people/service.ts +284 -0
  1075. package/src/modules/people/tools.ts +32 -0
  1076. package/src/modules/pipelines/index.ts +43 -0
  1077. package/src/modules/pipelines/repository.ts +116 -0
  1078. package/src/modules/pipelines/routes.ts +157 -0
  1079. package/src/modules/pipelines/schema.ts +37 -0
  1080. package/src/modules/pipelines/service.ts +339 -0
  1081. package/src/modules/pipelines/tools.ts +52 -0
  1082. package/src/modules/plans/index.ts +39 -0
  1083. package/src/modules/plans/repository.ts +174 -0
  1084. package/src/modules/plans/routes.ts +212 -0
  1085. package/src/modules/plans/schema.ts +45 -0
  1086. package/src/modules/plans/service.ts +223 -0
  1087. package/src/modules/plans/tools.ts +45 -0
  1088. package/src/modules/positions/index.ts +42 -0
  1089. package/src/modules/positions/repository.ts +136 -0
  1090. package/src/modules/positions/routes.ts +97 -0
  1091. package/src/modules/positions/schema.ts +42 -0
  1092. package/src/modules/positions/service.ts +253 -0
  1093. package/src/modules/positions/tools.ts +32 -0
  1094. package/src/modules/raises/index.ts +44 -0
  1095. package/src/modules/raises/repository.ts +254 -0
  1096. package/src/modules/raises/routes.ts +160 -0
  1097. package/src/modules/raises/schema.ts +66 -0
  1098. package/src/modules/raises/service.ts +442 -0
  1099. package/src/modules/raises/tools.ts +39 -0
  1100. package/src/modules/recordTargets.ts +194 -0
  1101. package/src/modules/references.ts +44 -0
  1102. package/src/modules/reseal.ts +178 -0
  1103. package/src/modules/search/index.ts +55 -0
  1104. package/src/modules/search/query.ts +104 -0
  1105. package/src/modules/search/repository.ts +388 -0
  1106. package/src/modules/search/routes.ts +131 -0
  1107. package/src/modules/search/service.ts +153 -0
  1108. package/src/modules/search/tools.ts +60 -0
  1109. package/src/modules/stagedRecords.ts +91 -0
  1110. package/src/modules/webhooks/delivery.ts +349 -0
  1111. package/src/modules/webhooks/index.ts +85 -0
  1112. package/src/modules/webhooks/payloads.ts +84 -0
  1113. package/src/modules/webhooks/repository.ts +244 -0
  1114. package/src/modules/webhooks/routes.ts +240 -0
  1115. package/src/modules/webhooks/schema.ts +78 -0
  1116. package/src/modules/webhooks/service.ts +347 -0
  1117. package/src/modules/webhooks/signing.ts +95 -0
  1118. package/src/modules/webhooks/tools.ts +108 -0
  1119. package/src/modules/webhooks/url.ts +21 -0
  1120. package/src/modules/workspace/capabilities.ts +14 -0
  1121. package/src/modules/workspace/idempotencyMiddleware.ts +207 -0
  1122. package/src/modules/workspace/idempotencyRepository.ts +111 -0
  1123. package/src/modules/workspace/index.ts +64 -0
  1124. package/src/modules/workspace/repository.ts +420 -0
  1125. package/src/modules/workspace/roles.ts +38 -0
  1126. package/src/modules/workspace/routes.ts +255 -0
  1127. package/src/modules/workspace/schema.ts +130 -0
  1128. package/src/modules/workspace/service.ts +798 -0
  1129. package/src/modules/workspace/starters.ts +69 -0
  1130. package/src/modules/workspace/tools.ts +141 -0
  1131. package/src/runtime/entitlements.ts +142 -0
  1132. package/src/runtime/events.ts +185 -0
  1133. package/src/runtime/migrate.ts +75 -0
  1134. package/src/runtime/module.ts +147 -0
  1135. package/src/runtime/moduleConfig.ts +68 -0
  1136. package/src/runtime/order.ts +90 -0
  1137. package/src/runtime/registry.ts +263 -0
  1138. package/src/runtime/transaction.ts +80 -0
  1139. package/src/schema/index.ts +30 -0
  1140. package/src/testing/app.ts +79 -0
  1141. package/src/testing/client.ts +118 -0
  1142. package/src/testing/database.ts +106 -0
  1143. package/src/testing/environment.ts +22 -0
  1144. package/src/testing/fixtures.ts +70 -0
  1145. package/src/testing/index.ts +13 -0
  1146. package/src/testing/services.ts +67 -0
@@ -0,0 +1,4467 @@
1
+ {
2
+ "id": "fb016e08-5d92-4cd7-b9ca-f459251ae511",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.sessions": {
8
+ "name": "sessions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "user_id": {
18
+ "name": "user_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "active_workspace_id": {
24
+ "name": "active_workspace_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "token_hash": {
30
+ "name": "token_hash",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "device": {
36
+ "name": "device",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "location": {
42
+ "name": "location",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "last_active_at": {
48
+ "name": "last_active_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "now()"
53
+ },
54
+ "expires_at": {
55
+ "name": "expires_at",
56
+ "type": "timestamp with time zone",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "created_at": {
61
+ "name": "created_at",
62
+ "type": "timestamp with time zone",
63
+ "primaryKey": false,
64
+ "notNull": true,
65
+ "default": "now()"
66
+ }
67
+ },
68
+ "indexes": {},
69
+ "foreignKeys": {
70
+ "sessions_user_id_users_id_fk": {
71
+ "name": "sessions_user_id_users_id_fk",
72
+ "tableFrom": "sessions",
73
+ "tableTo": "users",
74
+ "columnsFrom": [
75
+ "user_id"
76
+ ],
77
+ "columnsTo": [
78
+ "id"
79
+ ],
80
+ "onDelete": "cascade",
81
+ "onUpdate": "no action"
82
+ }
83
+ },
84
+ "compositePrimaryKeys": {},
85
+ "uniqueConstraints": {
86
+ "sessions_token_hash_unique": {
87
+ "name": "sessions_token_hash_unique",
88
+ "nullsNotDistinct": false,
89
+ "columns": [
90
+ "token_hash"
91
+ ]
92
+ }
93
+ },
94
+ "policies": {},
95
+ "checkConstraints": {},
96
+ "isRLSEnabled": false
97
+ },
98
+ "public.user_preferences": {
99
+ "name": "user_preferences",
100
+ "schema": "",
101
+ "columns": {
102
+ "user_id": {
103
+ "name": "user_id",
104
+ "type": "text",
105
+ "primaryKey": true,
106
+ "notNull": true
107
+ },
108
+ "timezone": {
109
+ "name": "timezone",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": true
113
+ },
114
+ "theme": {
115
+ "name": "theme",
116
+ "type": "text",
117
+ "primaryKey": false,
118
+ "notNull": true
119
+ },
120
+ "email_digest": {
121
+ "name": "email_digest",
122
+ "type": "boolean",
123
+ "primaryKey": false,
124
+ "notNull": true
125
+ },
126
+ "mention_emails": {
127
+ "name": "mention_emails",
128
+ "type": "boolean",
129
+ "primaryKey": false,
130
+ "notNull": true
131
+ },
132
+ "product_updates": {
133
+ "name": "product_updates",
134
+ "type": "boolean",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "updated_at": {
139
+ "name": "updated_at",
140
+ "type": "timestamp with time zone",
141
+ "primaryKey": false,
142
+ "notNull": true,
143
+ "default": "now()"
144
+ }
145
+ },
146
+ "indexes": {},
147
+ "foreignKeys": {
148
+ "user_preferences_user_id_users_id_fk": {
149
+ "name": "user_preferences_user_id_users_id_fk",
150
+ "tableFrom": "user_preferences",
151
+ "tableTo": "users",
152
+ "columnsFrom": [
153
+ "user_id"
154
+ ],
155
+ "columnsTo": [
156
+ "id"
157
+ ],
158
+ "onDelete": "cascade",
159
+ "onUpdate": "no action"
160
+ }
161
+ },
162
+ "compositePrimaryKeys": {},
163
+ "uniqueConstraints": {},
164
+ "policies": {},
165
+ "checkConstraints": {},
166
+ "isRLSEnabled": false
167
+ },
168
+ "public.users": {
169
+ "name": "users",
170
+ "schema": "",
171
+ "columns": {
172
+ "id": {
173
+ "name": "id",
174
+ "type": "text",
175
+ "primaryKey": true,
176
+ "notNull": true
177
+ },
178
+ "email": {
179
+ "name": "email",
180
+ "type": "citext",
181
+ "primaryKey": false,
182
+ "notNull": true
183
+ },
184
+ "name": {
185
+ "name": "name",
186
+ "type": "text",
187
+ "primaryKey": false,
188
+ "notNull": true
189
+ },
190
+ "password_hash": {
191
+ "name": "password_hash",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": true
195
+ },
196
+ "created_at": {
197
+ "name": "created_at",
198
+ "type": "timestamp with time zone",
199
+ "primaryKey": false,
200
+ "notNull": true,
201
+ "default": "now()"
202
+ },
203
+ "updated_at": {
204
+ "name": "updated_at",
205
+ "type": "timestamp with time zone",
206
+ "primaryKey": false,
207
+ "notNull": true,
208
+ "default": "now()"
209
+ }
210
+ },
211
+ "indexes": {},
212
+ "foreignKeys": {},
213
+ "compositePrimaryKeys": {},
214
+ "uniqueConstraints": {
215
+ "users_email_unique": {
216
+ "name": "users_email_unique",
217
+ "nullsNotDistinct": false,
218
+ "columns": [
219
+ "email"
220
+ ]
221
+ }
222
+ },
223
+ "policies": {},
224
+ "checkConstraints": {},
225
+ "isRLSEnabled": false
226
+ },
227
+ "public.idempotency_keys": {
228
+ "name": "idempotency_keys",
229
+ "schema": "",
230
+ "columns": {
231
+ "id": {
232
+ "name": "id",
233
+ "type": "text",
234
+ "primaryKey": true,
235
+ "notNull": true
236
+ },
237
+ "workspace_id": {
238
+ "name": "workspace_id",
239
+ "type": "text",
240
+ "primaryKey": false,
241
+ "notNull": true
242
+ },
243
+ "key": {
244
+ "name": "key",
245
+ "type": "text",
246
+ "primaryKey": false,
247
+ "notNull": true
248
+ },
249
+ "request_hash": {
250
+ "name": "request_hash",
251
+ "type": "text",
252
+ "primaryKey": false,
253
+ "notNull": true
254
+ },
255
+ "response": {
256
+ "name": "response",
257
+ "type": "jsonb",
258
+ "primaryKey": false,
259
+ "notNull": true
260
+ },
261
+ "expires_at": {
262
+ "name": "expires_at",
263
+ "type": "timestamp with time zone",
264
+ "primaryKey": false,
265
+ "notNull": true
266
+ },
267
+ "created_at": {
268
+ "name": "created_at",
269
+ "type": "timestamp with time zone",
270
+ "primaryKey": false,
271
+ "notNull": true,
272
+ "default": "now()"
273
+ }
274
+ },
275
+ "indexes": {},
276
+ "foreignKeys": {
277
+ "idempotency_keys_workspace_id_workspaces_id_fk": {
278
+ "name": "idempotency_keys_workspace_id_workspaces_id_fk",
279
+ "tableFrom": "idempotency_keys",
280
+ "tableTo": "workspaces",
281
+ "columnsFrom": [
282
+ "workspace_id"
283
+ ],
284
+ "columnsTo": [
285
+ "id"
286
+ ],
287
+ "onDelete": "cascade",
288
+ "onUpdate": "no action"
289
+ }
290
+ },
291
+ "compositePrimaryKeys": {},
292
+ "uniqueConstraints": {
293
+ "idempotency_keys_workspace_key_key": {
294
+ "name": "idempotency_keys_workspace_key_key",
295
+ "nullsNotDistinct": false,
296
+ "columns": [
297
+ "workspace_id",
298
+ "key"
299
+ ]
300
+ }
301
+ },
302
+ "policies": {},
303
+ "checkConstraints": {},
304
+ "isRLSEnabled": false
305
+ },
306
+ "public.invites": {
307
+ "name": "invites",
308
+ "schema": "",
309
+ "columns": {
310
+ "id": {
311
+ "name": "id",
312
+ "type": "text",
313
+ "primaryKey": true,
314
+ "notNull": true
315
+ },
316
+ "workspace_id": {
317
+ "name": "workspace_id",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": true
321
+ },
322
+ "email": {
323
+ "name": "email",
324
+ "type": "citext",
325
+ "primaryKey": false,
326
+ "notNull": true
327
+ },
328
+ "role": {
329
+ "name": "role",
330
+ "type": "text",
331
+ "primaryKey": false,
332
+ "notNull": true
333
+ },
334
+ "invited_by": {
335
+ "name": "invited_by",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": false
339
+ },
340
+ "status": {
341
+ "name": "status",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "token_hash": {
347
+ "name": "token_hash",
348
+ "type": "text",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "expires_at": {
353
+ "name": "expires_at",
354
+ "type": "timestamp with time zone",
355
+ "primaryKey": false,
356
+ "notNull": true
357
+ },
358
+ "created_at": {
359
+ "name": "created_at",
360
+ "type": "timestamp with time zone",
361
+ "primaryKey": false,
362
+ "notNull": true,
363
+ "default": "now()"
364
+ },
365
+ "updated_at": {
366
+ "name": "updated_at",
367
+ "type": "timestamp with time zone",
368
+ "primaryKey": false,
369
+ "notNull": true,
370
+ "default": "now()"
371
+ }
372
+ },
373
+ "indexes": {
374
+ "invites_workspace_idx": {
375
+ "name": "invites_workspace_idx",
376
+ "columns": [
377
+ {
378
+ "expression": "workspace_id",
379
+ "isExpression": false,
380
+ "asc": true,
381
+ "nulls": "last"
382
+ }
383
+ ],
384
+ "isUnique": false,
385
+ "concurrently": false,
386
+ "method": "btree",
387
+ "with": {}
388
+ }
389
+ },
390
+ "foreignKeys": {
391
+ "invites_workspace_id_workspaces_id_fk": {
392
+ "name": "invites_workspace_id_workspaces_id_fk",
393
+ "tableFrom": "invites",
394
+ "tableTo": "workspaces",
395
+ "columnsFrom": [
396
+ "workspace_id"
397
+ ],
398
+ "columnsTo": [
399
+ "id"
400
+ ],
401
+ "onDelete": "cascade",
402
+ "onUpdate": "no action"
403
+ },
404
+ "invites_invited_by_workspace_members_id_fk": {
405
+ "name": "invites_invited_by_workspace_members_id_fk",
406
+ "tableFrom": "invites",
407
+ "tableTo": "workspace_members",
408
+ "columnsFrom": [
409
+ "invited_by"
410
+ ],
411
+ "columnsTo": [
412
+ "id"
413
+ ],
414
+ "onDelete": "set null",
415
+ "onUpdate": "no action"
416
+ }
417
+ },
418
+ "compositePrimaryKeys": {},
419
+ "uniqueConstraints": {},
420
+ "policies": {},
421
+ "checkConstraints": {
422
+ "invites_role_check": {
423
+ "name": "invites_role_check",
424
+ "value": "\"invites\".\"role\" in ('admin', 'member')"
425
+ },
426
+ "invites_status_check": {
427
+ "name": "invites_status_check",
428
+ "value": "\"invites\".\"status\" in ('pending', 'expired')"
429
+ }
430
+ },
431
+ "isRLSEnabled": false
432
+ },
433
+ "public.workspace_members": {
434
+ "name": "workspace_members",
435
+ "schema": "",
436
+ "columns": {
437
+ "id": {
438
+ "name": "id",
439
+ "type": "text",
440
+ "primaryKey": true,
441
+ "notNull": true
442
+ },
443
+ "workspace_id": {
444
+ "name": "workspace_id",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "user_id": {
450
+ "name": "user_id",
451
+ "type": "text",
452
+ "primaryKey": false,
453
+ "notNull": true
454
+ },
455
+ "role": {
456
+ "name": "role",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "joined_at": {
462
+ "name": "joined_at",
463
+ "type": "timestamp with time zone",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "default": "now()"
467
+ },
468
+ "created_at": {
469
+ "name": "created_at",
470
+ "type": "timestamp with time zone",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "default": "now()"
474
+ },
475
+ "updated_at": {
476
+ "name": "updated_at",
477
+ "type": "timestamp with time zone",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "default": "now()"
481
+ }
482
+ },
483
+ "indexes": {
484
+ "workspace_members_workspace_idx": {
485
+ "name": "workspace_members_workspace_idx",
486
+ "columns": [
487
+ {
488
+ "expression": "workspace_id",
489
+ "isExpression": false,
490
+ "asc": true,
491
+ "nulls": "last"
492
+ }
493
+ ],
494
+ "isUnique": false,
495
+ "concurrently": false,
496
+ "method": "btree",
497
+ "with": {}
498
+ }
499
+ },
500
+ "foreignKeys": {
501
+ "workspace_members_workspace_id_workspaces_id_fk": {
502
+ "name": "workspace_members_workspace_id_workspaces_id_fk",
503
+ "tableFrom": "workspace_members",
504
+ "tableTo": "workspaces",
505
+ "columnsFrom": [
506
+ "workspace_id"
507
+ ],
508
+ "columnsTo": [
509
+ "id"
510
+ ],
511
+ "onDelete": "cascade",
512
+ "onUpdate": "no action"
513
+ },
514
+ "workspace_members_user_id_users_id_fk": {
515
+ "name": "workspace_members_user_id_users_id_fk",
516
+ "tableFrom": "workspace_members",
517
+ "tableTo": "users",
518
+ "columnsFrom": [
519
+ "user_id"
520
+ ],
521
+ "columnsTo": [
522
+ "id"
523
+ ],
524
+ "onDelete": "cascade",
525
+ "onUpdate": "no action"
526
+ }
527
+ },
528
+ "compositePrimaryKeys": {},
529
+ "uniqueConstraints": {
530
+ "workspace_members_workspace_user_key": {
531
+ "name": "workspace_members_workspace_user_key",
532
+ "nullsNotDistinct": false,
533
+ "columns": [
534
+ "workspace_id",
535
+ "user_id"
536
+ ]
537
+ }
538
+ },
539
+ "policies": {},
540
+ "checkConstraints": {
541
+ "workspace_members_role_check": {
542
+ "name": "workspace_members_role_check",
543
+ "value": "\"workspace_members\".\"role\" in ('owner', 'admin', 'member')"
544
+ }
545
+ },
546
+ "isRLSEnabled": false
547
+ },
548
+ "public.workspaces": {
549
+ "name": "workspaces",
550
+ "schema": "",
551
+ "columns": {
552
+ "id": {
553
+ "name": "id",
554
+ "type": "text",
555
+ "primaryKey": true,
556
+ "notNull": true
557
+ },
558
+ "name": {
559
+ "name": "name",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true
563
+ },
564
+ "slug": {
565
+ "name": "slug",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true
569
+ },
570
+ "timezone": {
571
+ "name": "timezone",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true
575
+ },
576
+ "tagline": {
577
+ "name": "tagline",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": false
581
+ },
582
+ "one_liner": {
583
+ "name": "one_liner",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": false
587
+ },
588
+ "created_at": {
589
+ "name": "created_at",
590
+ "type": "timestamp with time zone",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "default": "now()"
594
+ },
595
+ "updated_at": {
596
+ "name": "updated_at",
597
+ "type": "timestamp with time zone",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "default": "now()"
601
+ }
602
+ },
603
+ "indexes": {},
604
+ "foreignKeys": {},
605
+ "compositePrimaryKeys": {},
606
+ "uniqueConstraints": {
607
+ "workspaces_slug_unique": {
608
+ "name": "workspaces_slug_unique",
609
+ "nullsNotDistinct": false,
610
+ "columns": [
611
+ "slug"
612
+ ]
613
+ }
614
+ },
615
+ "policies": {},
616
+ "checkConstraints": {},
617
+ "isRLSEnabled": false
618
+ },
619
+ "public.api_keys": {
620
+ "name": "api_keys",
621
+ "schema": "",
622
+ "columns": {
623
+ "id": {
624
+ "name": "id",
625
+ "type": "text",
626
+ "primaryKey": true,
627
+ "notNull": true
628
+ },
629
+ "workspace_id": {
630
+ "name": "workspace_id",
631
+ "type": "text",
632
+ "primaryKey": false,
633
+ "notNull": true
634
+ },
635
+ "user_id": {
636
+ "name": "user_id",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": false
640
+ },
641
+ "name": {
642
+ "name": "name",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true
646
+ },
647
+ "secret_hash": {
648
+ "name": "secret_hash",
649
+ "type": "text",
650
+ "primaryKey": false,
651
+ "notNull": true
652
+ },
653
+ "display_prefix": {
654
+ "name": "display_prefix",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true
658
+ },
659
+ "last_used_at": {
660
+ "name": "last_used_at",
661
+ "type": "timestamp with time zone",
662
+ "primaryKey": false,
663
+ "notNull": false
664
+ },
665
+ "created_at": {
666
+ "name": "created_at",
667
+ "type": "timestamp with time zone",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "default": "now()"
671
+ },
672
+ "updated_at": {
673
+ "name": "updated_at",
674
+ "type": "timestamp with time zone",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "default": "now()"
678
+ }
679
+ },
680
+ "indexes": {
681
+ "api_keys_workspace_idx": {
682
+ "name": "api_keys_workspace_idx",
683
+ "columns": [
684
+ {
685
+ "expression": "workspace_id",
686
+ "isExpression": false,
687
+ "asc": true,
688
+ "nulls": "last"
689
+ }
690
+ ],
691
+ "isUnique": false,
692
+ "concurrently": false,
693
+ "method": "btree",
694
+ "with": {}
695
+ }
696
+ },
697
+ "foreignKeys": {
698
+ "api_keys_workspace_id_workspaces_id_fk": {
699
+ "name": "api_keys_workspace_id_workspaces_id_fk",
700
+ "tableFrom": "api_keys",
701
+ "tableTo": "workspaces",
702
+ "columnsFrom": [
703
+ "workspace_id"
704
+ ],
705
+ "columnsTo": [
706
+ "id"
707
+ ],
708
+ "onDelete": "cascade",
709
+ "onUpdate": "no action"
710
+ },
711
+ "api_keys_user_id_users_id_fk": {
712
+ "name": "api_keys_user_id_users_id_fk",
713
+ "tableFrom": "api_keys",
714
+ "tableTo": "users",
715
+ "columnsFrom": [
716
+ "user_id"
717
+ ],
718
+ "columnsTo": [
719
+ "id"
720
+ ],
721
+ "onDelete": "cascade",
722
+ "onUpdate": "no action"
723
+ }
724
+ },
725
+ "compositePrimaryKeys": {},
726
+ "uniqueConstraints": {
727
+ "api_keys_secret_hash_unique": {
728
+ "name": "api_keys_secret_hash_unique",
729
+ "nullsNotDistinct": false,
730
+ "columns": [
731
+ "secret_hash"
732
+ ]
733
+ }
734
+ },
735
+ "policies": {},
736
+ "checkConstraints": {},
737
+ "isRLSEnabled": false
738
+ },
739
+ "public.people": {
740
+ "name": "people",
741
+ "schema": "",
742
+ "columns": {
743
+ "id": {
744
+ "name": "id",
745
+ "type": "text",
746
+ "primaryKey": true,
747
+ "notNull": true
748
+ },
749
+ "workspace_id": {
750
+ "name": "workspace_id",
751
+ "type": "text",
752
+ "primaryKey": false,
753
+ "notNull": true
754
+ },
755
+ "name": {
756
+ "name": "name",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true
760
+ },
761
+ "email": {
762
+ "name": "email",
763
+ "type": "citext",
764
+ "primaryKey": false,
765
+ "notNull": false
766
+ },
767
+ "phones": {
768
+ "name": "phones",
769
+ "type": "jsonb",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "default": "'[]'::jsonb"
773
+ },
774
+ "social_profiles": {
775
+ "name": "social_profiles",
776
+ "type": "jsonb",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "default": "'[]'::jsonb"
780
+ },
781
+ "timezone": {
782
+ "name": "timezone",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false
786
+ },
787
+ "location": {
788
+ "name": "location",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": false
792
+ },
793
+ "preferred_channel": {
794
+ "name": "preferred_channel",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true
798
+ },
799
+ "influence": {
800
+ "name": "influence",
801
+ "type": "text",
802
+ "primaryKey": false,
803
+ "notNull": true
804
+ },
805
+ "relationship": {
806
+ "name": "relationship",
807
+ "type": "text",
808
+ "primaryKey": false,
809
+ "notNull": true
810
+ },
811
+ "summary": {
812
+ "name": "summary",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": true,
816
+ "default": "''"
817
+ },
818
+ "tags": {
819
+ "name": "tags",
820
+ "type": "text[]",
821
+ "primaryKey": false,
822
+ "notNull": true,
823
+ "default": "'{}'"
824
+ },
825
+ "last_contacted_at": {
826
+ "name": "last_contacted_at",
827
+ "type": "timestamp with time zone",
828
+ "primaryKey": false,
829
+ "notNull": false
830
+ },
831
+ "created_at": {
832
+ "name": "created_at",
833
+ "type": "timestamp with time zone",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "default": "now()"
837
+ },
838
+ "updated_at": {
839
+ "name": "updated_at",
840
+ "type": "timestamp with time zone",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "default": "now()"
844
+ }
845
+ },
846
+ "indexes": {
847
+ "people_workspace_idx": {
848
+ "name": "people_workspace_idx",
849
+ "columns": [
850
+ {
851
+ "expression": "workspace_id",
852
+ "isExpression": false,
853
+ "asc": true,
854
+ "nulls": "last"
855
+ }
856
+ ],
857
+ "isUnique": false,
858
+ "concurrently": false,
859
+ "method": "btree",
860
+ "with": {}
861
+ }
862
+ },
863
+ "foreignKeys": {
864
+ "people_workspace_id_workspaces_id_fk": {
865
+ "name": "people_workspace_id_workspaces_id_fk",
866
+ "tableFrom": "people",
867
+ "tableTo": "workspaces",
868
+ "columnsFrom": [
869
+ "workspace_id"
870
+ ],
871
+ "columnsTo": [
872
+ "id"
873
+ ],
874
+ "onDelete": "cascade",
875
+ "onUpdate": "no action"
876
+ }
877
+ },
878
+ "compositePrimaryKeys": {},
879
+ "uniqueConstraints": {
880
+ "people_workspace_email_key": {
881
+ "name": "people_workspace_email_key",
882
+ "nullsNotDistinct": false,
883
+ "columns": [
884
+ "workspace_id",
885
+ "email"
886
+ ]
887
+ }
888
+ },
889
+ "policies": {},
890
+ "checkConstraints": {
891
+ "people_preferred_channel_check": {
892
+ "name": "people_preferred_channel_check",
893
+ "value": "\"people\".\"preferred_channel\" in ('email', 'call', 'linkedin')"
894
+ },
895
+ "people_influence_check": {
896
+ "name": "people_influence_check",
897
+ "value": "\"people\".\"influence\" in ('champion', 'decision_maker', 'influencer', 'blocker', 'end_user')"
898
+ },
899
+ "people_relationship_check": {
900
+ "name": "people_relationship_check",
901
+ "value": "\"people\".\"relationship\" in ('cold', 'warm', 'strong')"
902
+ }
903
+ },
904
+ "isRLSEnabled": false
905
+ },
906
+ "public.companies": {
907
+ "name": "companies",
908
+ "schema": "",
909
+ "columns": {
910
+ "id": {
911
+ "name": "id",
912
+ "type": "text",
913
+ "primaryKey": true,
914
+ "notNull": true
915
+ },
916
+ "workspace_id": {
917
+ "name": "workspace_id",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true
921
+ },
922
+ "name": {
923
+ "name": "name",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": true
927
+ },
928
+ "domain": {
929
+ "name": "domain",
930
+ "type": "citext",
931
+ "primaryKey": false,
932
+ "notNull": false
933
+ },
934
+ "industry": {
935
+ "name": "industry",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": false
939
+ },
940
+ "description": {
941
+ "name": "description",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "default": "''"
946
+ },
947
+ "stage": {
948
+ "name": "stage",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true
952
+ },
953
+ "size_band": {
954
+ "name": "size_band",
955
+ "type": "text",
956
+ "primaryKey": false,
957
+ "notNull": true
958
+ },
959
+ "hq": {
960
+ "name": "hq",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": false
964
+ },
965
+ "website": {
966
+ "name": "website",
967
+ "type": "text",
968
+ "primaryKey": false,
969
+ "notNull": false
970
+ },
971
+ "account_type": {
972
+ "name": "account_type",
973
+ "type": "text",
974
+ "primaryKey": false,
975
+ "notNull": true
976
+ },
977
+ "icp_fit": {
978
+ "name": "icp_fit",
979
+ "type": "text",
980
+ "primaryKey": false,
981
+ "notNull": true
982
+ },
983
+ "tech_stack": {
984
+ "name": "tech_stack",
985
+ "type": "text[]",
986
+ "primaryKey": false,
987
+ "notNull": true,
988
+ "default": "'{}'"
989
+ },
990
+ "summary": {
991
+ "name": "summary",
992
+ "type": "text",
993
+ "primaryKey": false,
994
+ "notNull": true,
995
+ "default": "''"
996
+ },
997
+ "tags": {
998
+ "name": "tags",
999
+ "type": "text[]",
1000
+ "primaryKey": false,
1001
+ "notNull": true,
1002
+ "default": "'{}'"
1003
+ },
1004
+ "created_at": {
1005
+ "name": "created_at",
1006
+ "type": "timestamp with time zone",
1007
+ "primaryKey": false,
1008
+ "notNull": true,
1009
+ "default": "now()"
1010
+ },
1011
+ "updated_at": {
1012
+ "name": "updated_at",
1013
+ "type": "timestamp with time zone",
1014
+ "primaryKey": false,
1015
+ "notNull": true,
1016
+ "default": "now()"
1017
+ }
1018
+ },
1019
+ "indexes": {
1020
+ "companies_workspace_idx": {
1021
+ "name": "companies_workspace_idx",
1022
+ "columns": [
1023
+ {
1024
+ "expression": "workspace_id",
1025
+ "isExpression": false,
1026
+ "asc": true,
1027
+ "nulls": "last"
1028
+ }
1029
+ ],
1030
+ "isUnique": false,
1031
+ "concurrently": false,
1032
+ "method": "btree",
1033
+ "with": {}
1034
+ }
1035
+ },
1036
+ "foreignKeys": {
1037
+ "companies_workspace_id_workspaces_id_fk": {
1038
+ "name": "companies_workspace_id_workspaces_id_fk",
1039
+ "tableFrom": "companies",
1040
+ "tableTo": "workspaces",
1041
+ "columnsFrom": [
1042
+ "workspace_id"
1043
+ ],
1044
+ "columnsTo": [
1045
+ "id"
1046
+ ],
1047
+ "onDelete": "cascade",
1048
+ "onUpdate": "no action"
1049
+ }
1050
+ },
1051
+ "compositePrimaryKeys": {},
1052
+ "uniqueConstraints": {
1053
+ "companies_workspace_domain_key": {
1054
+ "name": "companies_workspace_domain_key",
1055
+ "nullsNotDistinct": false,
1056
+ "columns": [
1057
+ "workspace_id",
1058
+ "domain"
1059
+ ]
1060
+ }
1061
+ },
1062
+ "policies": {},
1063
+ "checkConstraints": {
1064
+ "companies_stage_check": {
1065
+ "name": "companies_stage_check",
1066
+ "value": "\"companies\".\"stage\" in ('startup', 'growth', 'enterprise', 'other')"
1067
+ },
1068
+ "companies_size_band_check": {
1069
+ "name": "companies_size_band_check",
1070
+ "value": "\"companies\".\"size_band\" in ('1-10', '11-50', '51-200', '201+')"
1071
+ },
1072
+ "companies_account_type_check": {
1073
+ "name": "companies_account_type_check",
1074
+ "value": "\"companies\".\"account_type\" in ('prospect', 'customer', 'partner', 'investor', 'other')"
1075
+ },
1076
+ "companies_icp_fit_check": {
1077
+ "name": "companies_icp_fit_check",
1078
+ "value": "\"companies\".\"icp_fit\" in ('high', 'medium', 'low', 'unknown')"
1079
+ }
1080
+ },
1081
+ "isRLSEnabled": false
1082
+ },
1083
+ "public.positions": {
1084
+ "name": "positions",
1085
+ "schema": "",
1086
+ "columns": {
1087
+ "id": {
1088
+ "name": "id",
1089
+ "type": "text",
1090
+ "primaryKey": true,
1091
+ "notNull": true
1092
+ },
1093
+ "workspace_id": {
1094
+ "name": "workspace_id",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": true
1098
+ },
1099
+ "person_id": {
1100
+ "name": "person_id",
1101
+ "type": "text",
1102
+ "primaryKey": false,
1103
+ "notNull": true
1104
+ },
1105
+ "company_id": {
1106
+ "name": "company_id",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": true
1110
+ },
1111
+ "title": {
1112
+ "name": "title",
1113
+ "type": "text",
1114
+ "primaryKey": false,
1115
+ "notNull": true
1116
+ },
1117
+ "created_at": {
1118
+ "name": "created_at",
1119
+ "type": "timestamp with time zone",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "default": "now()"
1123
+ },
1124
+ "updated_at": {
1125
+ "name": "updated_at",
1126
+ "type": "timestamp with time zone",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "default": "now()"
1130
+ }
1131
+ },
1132
+ "indexes": {
1133
+ "positions_workspace_idx": {
1134
+ "name": "positions_workspace_idx",
1135
+ "columns": [
1136
+ {
1137
+ "expression": "workspace_id",
1138
+ "isExpression": false,
1139
+ "asc": true,
1140
+ "nulls": "last"
1141
+ }
1142
+ ],
1143
+ "isUnique": false,
1144
+ "concurrently": false,
1145
+ "method": "btree",
1146
+ "with": {}
1147
+ },
1148
+ "positions_company_idx": {
1149
+ "name": "positions_company_idx",
1150
+ "columns": [
1151
+ {
1152
+ "expression": "company_id",
1153
+ "isExpression": false,
1154
+ "asc": true,
1155
+ "nulls": "last"
1156
+ }
1157
+ ],
1158
+ "isUnique": false,
1159
+ "concurrently": false,
1160
+ "method": "btree",
1161
+ "with": {}
1162
+ }
1163
+ },
1164
+ "foreignKeys": {
1165
+ "positions_workspace_id_workspaces_id_fk": {
1166
+ "name": "positions_workspace_id_workspaces_id_fk",
1167
+ "tableFrom": "positions",
1168
+ "tableTo": "workspaces",
1169
+ "columnsFrom": [
1170
+ "workspace_id"
1171
+ ],
1172
+ "columnsTo": [
1173
+ "id"
1174
+ ],
1175
+ "onDelete": "cascade",
1176
+ "onUpdate": "no action"
1177
+ },
1178
+ "positions_person_id_people_id_fk": {
1179
+ "name": "positions_person_id_people_id_fk",
1180
+ "tableFrom": "positions",
1181
+ "tableTo": "people",
1182
+ "columnsFrom": [
1183
+ "person_id"
1184
+ ],
1185
+ "columnsTo": [
1186
+ "id"
1187
+ ],
1188
+ "onDelete": "cascade",
1189
+ "onUpdate": "no action"
1190
+ },
1191
+ "positions_company_id_companies_id_fk": {
1192
+ "name": "positions_company_id_companies_id_fk",
1193
+ "tableFrom": "positions",
1194
+ "tableTo": "companies",
1195
+ "columnsFrom": [
1196
+ "company_id"
1197
+ ],
1198
+ "columnsTo": [
1199
+ "id"
1200
+ ],
1201
+ "onDelete": "cascade",
1202
+ "onUpdate": "no action"
1203
+ }
1204
+ },
1205
+ "compositePrimaryKeys": {},
1206
+ "uniqueConstraints": {
1207
+ "positions_person_company_title_key": {
1208
+ "name": "positions_person_company_title_key",
1209
+ "nullsNotDistinct": false,
1210
+ "columns": [
1211
+ "person_id",
1212
+ "company_id",
1213
+ "title"
1214
+ ]
1215
+ }
1216
+ },
1217
+ "policies": {},
1218
+ "checkConstraints": {},
1219
+ "isRLSEnabled": false
1220
+ },
1221
+ "public.pipeline_stages": {
1222
+ "name": "pipeline_stages",
1223
+ "schema": "",
1224
+ "columns": {
1225
+ "id": {
1226
+ "name": "id",
1227
+ "type": "text",
1228
+ "primaryKey": true,
1229
+ "notNull": true
1230
+ },
1231
+ "workspace_id": {
1232
+ "name": "workspace_id",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true
1236
+ },
1237
+ "kind": {
1238
+ "name": "kind",
1239
+ "type": "text",
1240
+ "primaryKey": false,
1241
+ "notNull": true
1242
+ },
1243
+ "slug": {
1244
+ "name": "slug",
1245
+ "type": "text",
1246
+ "primaryKey": false,
1247
+ "notNull": true
1248
+ },
1249
+ "label": {
1250
+ "name": "label",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true
1254
+ },
1255
+ "open": {
1256
+ "name": "open",
1257
+ "type": "boolean",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "default": true
1261
+ },
1262
+ "sort_order": {
1263
+ "name": "sort_order",
1264
+ "type": "integer",
1265
+ "primaryKey": false,
1266
+ "notNull": true
1267
+ },
1268
+ "created_at": {
1269
+ "name": "created_at",
1270
+ "type": "timestamp with time zone",
1271
+ "primaryKey": false,
1272
+ "notNull": true,
1273
+ "default": "now()"
1274
+ },
1275
+ "updated_at": {
1276
+ "name": "updated_at",
1277
+ "type": "timestamp with time zone",
1278
+ "primaryKey": false,
1279
+ "notNull": true,
1280
+ "default": "now()"
1281
+ }
1282
+ },
1283
+ "indexes": {
1284
+ "pipeline_stages_workspace_kind_idx": {
1285
+ "name": "pipeline_stages_workspace_kind_idx",
1286
+ "columns": [
1287
+ {
1288
+ "expression": "workspace_id",
1289
+ "isExpression": false,
1290
+ "asc": true,
1291
+ "nulls": "last"
1292
+ },
1293
+ {
1294
+ "expression": "kind",
1295
+ "isExpression": false,
1296
+ "asc": true,
1297
+ "nulls": "last"
1298
+ }
1299
+ ],
1300
+ "isUnique": false,
1301
+ "concurrently": false,
1302
+ "method": "btree",
1303
+ "with": {}
1304
+ }
1305
+ },
1306
+ "foreignKeys": {
1307
+ "pipeline_stages_workspace_id_workspaces_id_fk": {
1308
+ "name": "pipeline_stages_workspace_id_workspaces_id_fk",
1309
+ "tableFrom": "pipeline_stages",
1310
+ "tableTo": "workspaces",
1311
+ "columnsFrom": [
1312
+ "workspace_id"
1313
+ ],
1314
+ "columnsTo": [
1315
+ "id"
1316
+ ],
1317
+ "onDelete": "cascade",
1318
+ "onUpdate": "no action"
1319
+ }
1320
+ },
1321
+ "compositePrimaryKeys": {},
1322
+ "uniqueConstraints": {
1323
+ "pipeline_stages_workspace_kind_slug_key": {
1324
+ "name": "pipeline_stages_workspace_kind_slug_key",
1325
+ "nullsNotDistinct": false,
1326
+ "columns": [
1327
+ "workspace_id",
1328
+ "kind",
1329
+ "slug"
1330
+ ]
1331
+ }
1332
+ },
1333
+ "policies": {},
1334
+ "checkConstraints": {
1335
+ "pipeline_stages_kind_check": {
1336
+ "name": "pipeline_stages_kind_check",
1337
+ "value": "\"pipeline_stages\".\"kind\" in ('deal', 'opportunity', 'raise', 'partnership')"
1338
+ }
1339
+ },
1340
+ "isRLSEnabled": false
1341
+ },
1342
+ "public.deal_people": {
1343
+ "name": "deal_people",
1344
+ "schema": "",
1345
+ "columns": {
1346
+ "deal_id": {
1347
+ "name": "deal_id",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": true
1351
+ },
1352
+ "person_id": {
1353
+ "name": "person_id",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": true
1357
+ }
1358
+ },
1359
+ "indexes": {},
1360
+ "foreignKeys": {
1361
+ "deal_people_deal_id_deals_id_fk": {
1362
+ "name": "deal_people_deal_id_deals_id_fk",
1363
+ "tableFrom": "deal_people",
1364
+ "tableTo": "deals",
1365
+ "columnsFrom": [
1366
+ "deal_id"
1367
+ ],
1368
+ "columnsTo": [
1369
+ "id"
1370
+ ],
1371
+ "onDelete": "cascade",
1372
+ "onUpdate": "no action"
1373
+ },
1374
+ "deal_people_person_id_people_id_fk": {
1375
+ "name": "deal_people_person_id_people_id_fk",
1376
+ "tableFrom": "deal_people",
1377
+ "tableTo": "people",
1378
+ "columnsFrom": [
1379
+ "person_id"
1380
+ ],
1381
+ "columnsTo": [
1382
+ "id"
1383
+ ],
1384
+ "onDelete": "restrict",
1385
+ "onUpdate": "no action"
1386
+ }
1387
+ },
1388
+ "compositePrimaryKeys": {
1389
+ "deal_people_deal_id_person_id_pk": {
1390
+ "name": "deal_people_deal_id_person_id_pk",
1391
+ "columns": [
1392
+ "deal_id",
1393
+ "person_id"
1394
+ ]
1395
+ }
1396
+ },
1397
+ "uniqueConstraints": {},
1398
+ "policies": {},
1399
+ "checkConstraints": {},
1400
+ "isRLSEnabled": false
1401
+ },
1402
+ "public.deals": {
1403
+ "name": "deals",
1404
+ "schema": "",
1405
+ "columns": {
1406
+ "id": {
1407
+ "name": "id",
1408
+ "type": "text",
1409
+ "primaryKey": true,
1410
+ "notNull": true
1411
+ },
1412
+ "workspace_id": {
1413
+ "name": "workspace_id",
1414
+ "type": "text",
1415
+ "primaryKey": false,
1416
+ "notNull": true
1417
+ },
1418
+ "name": {
1419
+ "name": "name",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": true
1423
+ },
1424
+ "company_id": {
1425
+ "name": "company_id",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true
1429
+ },
1430
+ "stage_id": {
1431
+ "name": "stage_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true
1435
+ },
1436
+ "value_cents": {
1437
+ "name": "value_cents",
1438
+ "type": "bigint",
1439
+ "primaryKey": false,
1440
+ "notNull": false
1441
+ },
1442
+ "currency": {
1443
+ "name": "currency",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": false
1447
+ },
1448
+ "owner_id": {
1449
+ "name": "owner_id",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": false
1453
+ },
1454
+ "expected_close": {
1455
+ "name": "expected_close",
1456
+ "type": "date",
1457
+ "primaryKey": false,
1458
+ "notNull": false
1459
+ },
1460
+ "competitors": {
1461
+ "name": "competitors",
1462
+ "type": "text[]",
1463
+ "primaryKey": false,
1464
+ "notNull": true,
1465
+ "default": "'{}'"
1466
+ },
1467
+ "risks": {
1468
+ "name": "risks",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": true,
1472
+ "default": "''"
1473
+ },
1474
+ "why_win": {
1475
+ "name": "why_win",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "default": "''"
1480
+ },
1481
+ "summary": {
1482
+ "name": "summary",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "default": "''"
1487
+ },
1488
+ "tags": {
1489
+ "name": "tags",
1490
+ "type": "text[]",
1491
+ "primaryKey": false,
1492
+ "notNull": true,
1493
+ "default": "'{}'"
1494
+ },
1495
+ "external_id": {
1496
+ "name": "external_id",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": false
1500
+ },
1501
+ "created_at": {
1502
+ "name": "created_at",
1503
+ "type": "timestamp with time zone",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "default": "now()"
1507
+ },
1508
+ "updated_at": {
1509
+ "name": "updated_at",
1510
+ "type": "timestamp with time zone",
1511
+ "primaryKey": false,
1512
+ "notNull": true,
1513
+ "default": "now()"
1514
+ }
1515
+ },
1516
+ "indexes": {
1517
+ "deals_workspace_idx": {
1518
+ "name": "deals_workspace_idx",
1519
+ "columns": [
1520
+ {
1521
+ "expression": "workspace_id",
1522
+ "isExpression": false,
1523
+ "asc": true,
1524
+ "nulls": "last"
1525
+ }
1526
+ ],
1527
+ "isUnique": false,
1528
+ "concurrently": false,
1529
+ "method": "btree",
1530
+ "with": {}
1531
+ },
1532
+ "deals_company_idx": {
1533
+ "name": "deals_company_idx",
1534
+ "columns": [
1535
+ {
1536
+ "expression": "company_id",
1537
+ "isExpression": false,
1538
+ "asc": true,
1539
+ "nulls": "last"
1540
+ }
1541
+ ],
1542
+ "isUnique": false,
1543
+ "concurrently": false,
1544
+ "method": "btree",
1545
+ "with": {}
1546
+ },
1547
+ "deals_stage_idx": {
1548
+ "name": "deals_stage_idx",
1549
+ "columns": [
1550
+ {
1551
+ "expression": "stage_id",
1552
+ "isExpression": false,
1553
+ "asc": true,
1554
+ "nulls": "last"
1555
+ }
1556
+ ],
1557
+ "isUnique": false,
1558
+ "concurrently": false,
1559
+ "method": "btree",
1560
+ "with": {}
1561
+ }
1562
+ },
1563
+ "foreignKeys": {
1564
+ "deals_workspace_id_workspaces_id_fk": {
1565
+ "name": "deals_workspace_id_workspaces_id_fk",
1566
+ "tableFrom": "deals",
1567
+ "tableTo": "workspaces",
1568
+ "columnsFrom": [
1569
+ "workspace_id"
1570
+ ],
1571
+ "columnsTo": [
1572
+ "id"
1573
+ ],
1574
+ "onDelete": "cascade",
1575
+ "onUpdate": "no action"
1576
+ },
1577
+ "deals_company_id_companies_id_fk": {
1578
+ "name": "deals_company_id_companies_id_fk",
1579
+ "tableFrom": "deals",
1580
+ "tableTo": "companies",
1581
+ "columnsFrom": [
1582
+ "company_id"
1583
+ ],
1584
+ "columnsTo": [
1585
+ "id"
1586
+ ],
1587
+ "onDelete": "restrict",
1588
+ "onUpdate": "no action"
1589
+ },
1590
+ "deals_stage_id_pipeline_stages_id_fk": {
1591
+ "name": "deals_stage_id_pipeline_stages_id_fk",
1592
+ "tableFrom": "deals",
1593
+ "tableTo": "pipeline_stages",
1594
+ "columnsFrom": [
1595
+ "stage_id"
1596
+ ],
1597
+ "columnsTo": [
1598
+ "id"
1599
+ ],
1600
+ "onDelete": "restrict",
1601
+ "onUpdate": "no action"
1602
+ },
1603
+ "deals_owner_id_workspace_members_id_fk": {
1604
+ "name": "deals_owner_id_workspace_members_id_fk",
1605
+ "tableFrom": "deals",
1606
+ "tableTo": "workspace_members",
1607
+ "columnsFrom": [
1608
+ "owner_id"
1609
+ ],
1610
+ "columnsTo": [
1611
+ "id"
1612
+ ],
1613
+ "onDelete": "restrict",
1614
+ "onUpdate": "no action"
1615
+ }
1616
+ },
1617
+ "compositePrimaryKeys": {},
1618
+ "uniqueConstraints": {},
1619
+ "policies": {},
1620
+ "checkConstraints": {},
1621
+ "isRLSEnabled": false
1622
+ },
1623
+ "public.opportunities": {
1624
+ "name": "opportunities",
1625
+ "schema": "",
1626
+ "columns": {
1627
+ "id": {
1628
+ "name": "id",
1629
+ "type": "text",
1630
+ "primaryKey": true,
1631
+ "notNull": true
1632
+ },
1633
+ "workspace_id": {
1634
+ "name": "workspace_id",
1635
+ "type": "text",
1636
+ "primaryKey": false,
1637
+ "notNull": true
1638
+ },
1639
+ "name": {
1640
+ "name": "name",
1641
+ "type": "text",
1642
+ "primaryKey": false,
1643
+ "notNull": true
1644
+ },
1645
+ "kind": {
1646
+ "name": "kind",
1647
+ "type": "text",
1648
+ "primaryKey": false,
1649
+ "notNull": true
1650
+ },
1651
+ "stage_id": {
1652
+ "name": "stage_id",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": true
1656
+ },
1657
+ "company_id": {
1658
+ "name": "company_id",
1659
+ "type": "text",
1660
+ "primaryKey": false,
1661
+ "notNull": false
1662
+ },
1663
+ "owner_id": {
1664
+ "name": "owner_id",
1665
+ "type": "text",
1666
+ "primaryKey": false,
1667
+ "notNull": false
1668
+ },
1669
+ "expected_close": {
1670
+ "name": "expected_close",
1671
+ "type": "date",
1672
+ "primaryKey": false,
1673
+ "notNull": false
1674
+ },
1675
+ "summary": {
1676
+ "name": "summary",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": true,
1680
+ "default": "''"
1681
+ },
1682
+ "tags": {
1683
+ "name": "tags",
1684
+ "type": "text[]",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "default": "'{}'"
1688
+ },
1689
+ "created_at": {
1690
+ "name": "created_at",
1691
+ "type": "timestamp with time zone",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "default": "now()"
1695
+ },
1696
+ "updated_at": {
1697
+ "name": "updated_at",
1698
+ "type": "timestamp with time zone",
1699
+ "primaryKey": false,
1700
+ "notNull": true,
1701
+ "default": "now()"
1702
+ }
1703
+ },
1704
+ "indexes": {
1705
+ "opportunities_workspace_idx": {
1706
+ "name": "opportunities_workspace_idx",
1707
+ "columns": [
1708
+ {
1709
+ "expression": "workspace_id",
1710
+ "isExpression": false,
1711
+ "asc": true,
1712
+ "nulls": "last"
1713
+ }
1714
+ ],
1715
+ "isUnique": false,
1716
+ "concurrently": false,
1717
+ "method": "btree",
1718
+ "with": {}
1719
+ },
1720
+ "opportunities_stage_idx": {
1721
+ "name": "opportunities_stage_idx",
1722
+ "columns": [
1723
+ {
1724
+ "expression": "stage_id",
1725
+ "isExpression": false,
1726
+ "asc": true,
1727
+ "nulls": "last"
1728
+ }
1729
+ ],
1730
+ "isUnique": false,
1731
+ "concurrently": false,
1732
+ "method": "btree",
1733
+ "with": {}
1734
+ }
1735
+ },
1736
+ "foreignKeys": {
1737
+ "opportunities_workspace_id_workspaces_id_fk": {
1738
+ "name": "opportunities_workspace_id_workspaces_id_fk",
1739
+ "tableFrom": "opportunities",
1740
+ "tableTo": "workspaces",
1741
+ "columnsFrom": [
1742
+ "workspace_id"
1743
+ ],
1744
+ "columnsTo": [
1745
+ "id"
1746
+ ],
1747
+ "onDelete": "cascade",
1748
+ "onUpdate": "no action"
1749
+ },
1750
+ "opportunities_stage_id_pipeline_stages_id_fk": {
1751
+ "name": "opportunities_stage_id_pipeline_stages_id_fk",
1752
+ "tableFrom": "opportunities",
1753
+ "tableTo": "pipeline_stages",
1754
+ "columnsFrom": [
1755
+ "stage_id"
1756
+ ],
1757
+ "columnsTo": [
1758
+ "id"
1759
+ ],
1760
+ "onDelete": "restrict",
1761
+ "onUpdate": "no action"
1762
+ },
1763
+ "opportunities_company_id_companies_id_fk": {
1764
+ "name": "opportunities_company_id_companies_id_fk",
1765
+ "tableFrom": "opportunities",
1766
+ "tableTo": "companies",
1767
+ "columnsFrom": [
1768
+ "company_id"
1769
+ ],
1770
+ "columnsTo": [
1771
+ "id"
1772
+ ],
1773
+ "onDelete": "restrict",
1774
+ "onUpdate": "no action"
1775
+ },
1776
+ "opportunities_owner_id_workspace_members_id_fk": {
1777
+ "name": "opportunities_owner_id_workspace_members_id_fk",
1778
+ "tableFrom": "opportunities",
1779
+ "tableTo": "workspace_members",
1780
+ "columnsFrom": [
1781
+ "owner_id"
1782
+ ],
1783
+ "columnsTo": [
1784
+ "id"
1785
+ ],
1786
+ "onDelete": "restrict",
1787
+ "onUpdate": "no action"
1788
+ }
1789
+ },
1790
+ "compositePrimaryKeys": {},
1791
+ "uniqueConstraints": {},
1792
+ "policies": {},
1793
+ "checkConstraints": {},
1794
+ "isRLSEnabled": false
1795
+ },
1796
+ "public.partnership_people": {
1797
+ "name": "partnership_people",
1798
+ "schema": "",
1799
+ "columns": {
1800
+ "partnership_id": {
1801
+ "name": "partnership_id",
1802
+ "type": "text",
1803
+ "primaryKey": false,
1804
+ "notNull": true
1805
+ },
1806
+ "person_id": {
1807
+ "name": "person_id",
1808
+ "type": "text",
1809
+ "primaryKey": false,
1810
+ "notNull": true
1811
+ }
1812
+ },
1813
+ "indexes": {},
1814
+ "foreignKeys": {
1815
+ "partnership_people_partnership_id_partnerships_id_fk": {
1816
+ "name": "partnership_people_partnership_id_partnerships_id_fk",
1817
+ "tableFrom": "partnership_people",
1818
+ "tableTo": "partnerships",
1819
+ "columnsFrom": [
1820
+ "partnership_id"
1821
+ ],
1822
+ "columnsTo": [
1823
+ "id"
1824
+ ],
1825
+ "onDelete": "cascade",
1826
+ "onUpdate": "no action"
1827
+ },
1828
+ "partnership_people_person_id_people_id_fk": {
1829
+ "name": "partnership_people_person_id_people_id_fk",
1830
+ "tableFrom": "partnership_people",
1831
+ "tableTo": "people",
1832
+ "columnsFrom": [
1833
+ "person_id"
1834
+ ],
1835
+ "columnsTo": [
1836
+ "id"
1837
+ ],
1838
+ "onDelete": "restrict",
1839
+ "onUpdate": "no action"
1840
+ }
1841
+ },
1842
+ "compositePrimaryKeys": {
1843
+ "partnership_people_partnership_id_person_id_pk": {
1844
+ "name": "partnership_people_partnership_id_person_id_pk",
1845
+ "columns": [
1846
+ "partnership_id",
1847
+ "person_id"
1848
+ ]
1849
+ }
1850
+ },
1851
+ "uniqueConstraints": {},
1852
+ "policies": {},
1853
+ "checkConstraints": {},
1854
+ "isRLSEnabled": false
1855
+ },
1856
+ "public.partnerships": {
1857
+ "name": "partnerships",
1858
+ "schema": "",
1859
+ "columns": {
1860
+ "id": {
1861
+ "name": "id",
1862
+ "type": "text",
1863
+ "primaryKey": true,
1864
+ "notNull": true
1865
+ },
1866
+ "workspace_id": {
1867
+ "name": "workspace_id",
1868
+ "type": "text",
1869
+ "primaryKey": false,
1870
+ "notNull": true
1871
+ },
1872
+ "name": {
1873
+ "name": "name",
1874
+ "type": "text",
1875
+ "primaryKey": false,
1876
+ "notNull": true
1877
+ },
1878
+ "company_id": {
1879
+ "name": "company_id",
1880
+ "type": "text",
1881
+ "primaryKey": false,
1882
+ "notNull": true
1883
+ },
1884
+ "stage_id": {
1885
+ "name": "stage_id",
1886
+ "type": "text",
1887
+ "primaryKey": false,
1888
+ "notNull": true
1889
+ },
1890
+ "kind": {
1891
+ "name": "kind",
1892
+ "type": "text",
1893
+ "primaryKey": false,
1894
+ "notNull": true
1895
+ },
1896
+ "next_touchpoint": {
1897
+ "name": "next_touchpoint",
1898
+ "type": "date",
1899
+ "primaryKey": false,
1900
+ "notNull": false
1901
+ },
1902
+ "owner_id": {
1903
+ "name": "owner_id",
1904
+ "type": "text",
1905
+ "primaryKey": false,
1906
+ "notNull": false
1907
+ },
1908
+ "goals": {
1909
+ "name": "goals",
1910
+ "type": "text",
1911
+ "primaryKey": false,
1912
+ "notNull": true,
1913
+ "default": "''"
1914
+ },
1915
+ "success_looks_like": {
1916
+ "name": "success_looks_like",
1917
+ "type": "text",
1918
+ "primaryKey": false,
1919
+ "notNull": true,
1920
+ "default": "''"
1921
+ },
1922
+ "summary": {
1923
+ "name": "summary",
1924
+ "type": "text",
1925
+ "primaryKey": false,
1926
+ "notNull": true,
1927
+ "default": "''"
1928
+ },
1929
+ "tags": {
1930
+ "name": "tags",
1931
+ "type": "text[]",
1932
+ "primaryKey": false,
1933
+ "notNull": true,
1934
+ "default": "'{}'"
1935
+ },
1936
+ "created_at": {
1937
+ "name": "created_at",
1938
+ "type": "timestamp with time zone",
1939
+ "primaryKey": false,
1940
+ "notNull": true,
1941
+ "default": "now()"
1942
+ },
1943
+ "updated_at": {
1944
+ "name": "updated_at",
1945
+ "type": "timestamp with time zone",
1946
+ "primaryKey": false,
1947
+ "notNull": true,
1948
+ "default": "now()"
1949
+ }
1950
+ },
1951
+ "indexes": {
1952
+ "partnerships_workspace_idx": {
1953
+ "name": "partnerships_workspace_idx",
1954
+ "columns": [
1955
+ {
1956
+ "expression": "workspace_id",
1957
+ "isExpression": false,
1958
+ "asc": true,
1959
+ "nulls": "last"
1960
+ }
1961
+ ],
1962
+ "isUnique": false,
1963
+ "concurrently": false,
1964
+ "method": "btree",
1965
+ "with": {}
1966
+ },
1967
+ "partnerships_company_idx": {
1968
+ "name": "partnerships_company_idx",
1969
+ "columns": [
1970
+ {
1971
+ "expression": "company_id",
1972
+ "isExpression": false,
1973
+ "asc": true,
1974
+ "nulls": "last"
1975
+ }
1976
+ ],
1977
+ "isUnique": false,
1978
+ "concurrently": false,
1979
+ "method": "btree",
1980
+ "with": {}
1981
+ },
1982
+ "partnerships_stage_idx": {
1983
+ "name": "partnerships_stage_idx",
1984
+ "columns": [
1985
+ {
1986
+ "expression": "stage_id",
1987
+ "isExpression": false,
1988
+ "asc": true,
1989
+ "nulls": "last"
1990
+ }
1991
+ ],
1992
+ "isUnique": false,
1993
+ "concurrently": false,
1994
+ "method": "btree",
1995
+ "with": {}
1996
+ }
1997
+ },
1998
+ "foreignKeys": {
1999
+ "partnerships_workspace_id_workspaces_id_fk": {
2000
+ "name": "partnerships_workspace_id_workspaces_id_fk",
2001
+ "tableFrom": "partnerships",
2002
+ "tableTo": "workspaces",
2003
+ "columnsFrom": [
2004
+ "workspace_id"
2005
+ ],
2006
+ "columnsTo": [
2007
+ "id"
2008
+ ],
2009
+ "onDelete": "cascade",
2010
+ "onUpdate": "no action"
2011
+ },
2012
+ "partnerships_company_id_companies_id_fk": {
2013
+ "name": "partnerships_company_id_companies_id_fk",
2014
+ "tableFrom": "partnerships",
2015
+ "tableTo": "companies",
2016
+ "columnsFrom": [
2017
+ "company_id"
2018
+ ],
2019
+ "columnsTo": [
2020
+ "id"
2021
+ ],
2022
+ "onDelete": "restrict",
2023
+ "onUpdate": "no action"
2024
+ },
2025
+ "partnerships_stage_id_pipeline_stages_id_fk": {
2026
+ "name": "partnerships_stage_id_pipeline_stages_id_fk",
2027
+ "tableFrom": "partnerships",
2028
+ "tableTo": "pipeline_stages",
2029
+ "columnsFrom": [
2030
+ "stage_id"
2031
+ ],
2032
+ "columnsTo": [
2033
+ "id"
2034
+ ],
2035
+ "onDelete": "restrict",
2036
+ "onUpdate": "no action"
2037
+ },
2038
+ "partnerships_owner_id_workspace_members_id_fk": {
2039
+ "name": "partnerships_owner_id_workspace_members_id_fk",
2040
+ "tableFrom": "partnerships",
2041
+ "tableTo": "workspace_members",
2042
+ "columnsFrom": [
2043
+ "owner_id"
2044
+ ],
2045
+ "columnsTo": [
2046
+ "id"
2047
+ ],
2048
+ "onDelete": "restrict",
2049
+ "onUpdate": "no action"
2050
+ }
2051
+ },
2052
+ "compositePrimaryKeys": {},
2053
+ "uniqueConstraints": {},
2054
+ "policies": {},
2055
+ "checkConstraints": {},
2056
+ "isRLSEnabled": false
2057
+ },
2058
+ "public.raise_people": {
2059
+ "name": "raise_people",
2060
+ "schema": "",
2061
+ "columns": {
2062
+ "raise_id": {
2063
+ "name": "raise_id",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": true
2067
+ },
2068
+ "person_id": {
2069
+ "name": "person_id",
2070
+ "type": "text",
2071
+ "primaryKey": false,
2072
+ "notNull": true
2073
+ }
2074
+ },
2075
+ "indexes": {},
2076
+ "foreignKeys": {
2077
+ "raise_people_raise_id_raises_id_fk": {
2078
+ "name": "raise_people_raise_id_raises_id_fk",
2079
+ "tableFrom": "raise_people",
2080
+ "tableTo": "raises",
2081
+ "columnsFrom": [
2082
+ "raise_id"
2083
+ ],
2084
+ "columnsTo": [
2085
+ "id"
2086
+ ],
2087
+ "onDelete": "cascade",
2088
+ "onUpdate": "no action"
2089
+ },
2090
+ "raise_people_person_id_people_id_fk": {
2091
+ "name": "raise_people_person_id_people_id_fk",
2092
+ "tableFrom": "raise_people",
2093
+ "tableTo": "people",
2094
+ "columnsFrom": [
2095
+ "person_id"
2096
+ ],
2097
+ "columnsTo": [
2098
+ "id"
2099
+ ],
2100
+ "onDelete": "restrict",
2101
+ "onUpdate": "no action"
2102
+ }
2103
+ },
2104
+ "compositePrimaryKeys": {
2105
+ "raise_people_raise_id_person_id_pk": {
2106
+ "name": "raise_people_raise_id_person_id_pk",
2107
+ "columns": [
2108
+ "raise_id",
2109
+ "person_id"
2110
+ ]
2111
+ }
2112
+ },
2113
+ "uniqueConstraints": {},
2114
+ "policies": {},
2115
+ "checkConstraints": {},
2116
+ "isRLSEnabled": false
2117
+ },
2118
+ "public.raises": {
2119
+ "name": "raises",
2120
+ "schema": "",
2121
+ "columns": {
2122
+ "id": {
2123
+ "name": "id",
2124
+ "type": "text",
2125
+ "primaryKey": true,
2126
+ "notNull": true
2127
+ },
2128
+ "workspace_id": {
2129
+ "name": "workspace_id",
2130
+ "type": "text",
2131
+ "primaryKey": false,
2132
+ "notNull": true
2133
+ },
2134
+ "name": {
2135
+ "name": "name",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": true
2139
+ },
2140
+ "company_id": {
2141
+ "name": "company_id",
2142
+ "type": "text",
2143
+ "primaryKey": false,
2144
+ "notNull": true
2145
+ },
2146
+ "stage_id": {
2147
+ "name": "stage_id",
2148
+ "type": "text",
2149
+ "primaryKey": false,
2150
+ "notNull": true
2151
+ },
2152
+ "check_size_cents": {
2153
+ "name": "check_size_cents",
2154
+ "type": "bigint",
2155
+ "primaryKey": false,
2156
+ "notNull": false
2157
+ },
2158
+ "currency": {
2159
+ "name": "currency",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": false
2163
+ },
2164
+ "thesis_fit": {
2165
+ "name": "thesis_fit",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": true,
2169
+ "default": "''"
2170
+ },
2171
+ "pass_reason": {
2172
+ "name": "pass_reason",
2173
+ "type": "text",
2174
+ "primaryKey": false,
2175
+ "notNull": false
2176
+ },
2177
+ "owner_id": {
2178
+ "name": "owner_id",
2179
+ "type": "text",
2180
+ "primaryKey": false,
2181
+ "notNull": false
2182
+ },
2183
+ "expected_close": {
2184
+ "name": "expected_close",
2185
+ "type": "date",
2186
+ "primaryKey": false,
2187
+ "notNull": false
2188
+ },
2189
+ "summary": {
2190
+ "name": "summary",
2191
+ "type": "text",
2192
+ "primaryKey": false,
2193
+ "notNull": true,
2194
+ "default": "''"
2195
+ },
2196
+ "tags": {
2197
+ "name": "tags",
2198
+ "type": "text[]",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "default": "'{}'"
2202
+ },
2203
+ "created_at": {
2204
+ "name": "created_at",
2205
+ "type": "timestamp with time zone",
2206
+ "primaryKey": false,
2207
+ "notNull": true,
2208
+ "default": "now()"
2209
+ },
2210
+ "updated_at": {
2211
+ "name": "updated_at",
2212
+ "type": "timestamp with time zone",
2213
+ "primaryKey": false,
2214
+ "notNull": true,
2215
+ "default": "now()"
2216
+ }
2217
+ },
2218
+ "indexes": {
2219
+ "raises_workspace_idx": {
2220
+ "name": "raises_workspace_idx",
2221
+ "columns": [
2222
+ {
2223
+ "expression": "workspace_id",
2224
+ "isExpression": false,
2225
+ "asc": true,
2226
+ "nulls": "last"
2227
+ }
2228
+ ],
2229
+ "isUnique": false,
2230
+ "concurrently": false,
2231
+ "method": "btree",
2232
+ "with": {}
2233
+ },
2234
+ "raises_company_idx": {
2235
+ "name": "raises_company_idx",
2236
+ "columns": [
2237
+ {
2238
+ "expression": "company_id",
2239
+ "isExpression": false,
2240
+ "asc": true,
2241
+ "nulls": "last"
2242
+ }
2243
+ ],
2244
+ "isUnique": false,
2245
+ "concurrently": false,
2246
+ "method": "btree",
2247
+ "with": {}
2248
+ },
2249
+ "raises_stage_idx": {
2250
+ "name": "raises_stage_idx",
2251
+ "columns": [
2252
+ {
2253
+ "expression": "stage_id",
2254
+ "isExpression": false,
2255
+ "asc": true,
2256
+ "nulls": "last"
2257
+ }
2258
+ ],
2259
+ "isUnique": false,
2260
+ "concurrently": false,
2261
+ "method": "btree",
2262
+ "with": {}
2263
+ }
2264
+ },
2265
+ "foreignKeys": {
2266
+ "raises_workspace_id_workspaces_id_fk": {
2267
+ "name": "raises_workspace_id_workspaces_id_fk",
2268
+ "tableFrom": "raises",
2269
+ "tableTo": "workspaces",
2270
+ "columnsFrom": [
2271
+ "workspace_id"
2272
+ ],
2273
+ "columnsTo": [
2274
+ "id"
2275
+ ],
2276
+ "onDelete": "cascade",
2277
+ "onUpdate": "no action"
2278
+ },
2279
+ "raises_company_id_companies_id_fk": {
2280
+ "name": "raises_company_id_companies_id_fk",
2281
+ "tableFrom": "raises",
2282
+ "tableTo": "companies",
2283
+ "columnsFrom": [
2284
+ "company_id"
2285
+ ],
2286
+ "columnsTo": [
2287
+ "id"
2288
+ ],
2289
+ "onDelete": "restrict",
2290
+ "onUpdate": "no action"
2291
+ },
2292
+ "raises_stage_id_pipeline_stages_id_fk": {
2293
+ "name": "raises_stage_id_pipeline_stages_id_fk",
2294
+ "tableFrom": "raises",
2295
+ "tableTo": "pipeline_stages",
2296
+ "columnsFrom": [
2297
+ "stage_id"
2298
+ ],
2299
+ "columnsTo": [
2300
+ "id"
2301
+ ],
2302
+ "onDelete": "restrict",
2303
+ "onUpdate": "no action"
2304
+ },
2305
+ "raises_owner_id_workspace_members_id_fk": {
2306
+ "name": "raises_owner_id_workspace_members_id_fk",
2307
+ "tableFrom": "raises",
2308
+ "tableTo": "workspace_members",
2309
+ "columnsFrom": [
2310
+ "owner_id"
2311
+ ],
2312
+ "columnsTo": [
2313
+ "id"
2314
+ ],
2315
+ "onDelete": "restrict",
2316
+ "onUpdate": "no action"
2317
+ }
2318
+ },
2319
+ "compositePrimaryKeys": {},
2320
+ "uniqueConstraints": {},
2321
+ "policies": {},
2322
+ "checkConstraints": {},
2323
+ "isRLSEnabled": false
2324
+ },
2325
+ "public.candidates": {
2326
+ "name": "candidates",
2327
+ "schema": "",
2328
+ "columns": {
2329
+ "id": {
2330
+ "name": "id",
2331
+ "type": "text",
2332
+ "primaryKey": true,
2333
+ "notNull": true
2334
+ },
2335
+ "workspace_id": {
2336
+ "name": "workspace_id",
2337
+ "type": "text",
2338
+ "primaryKey": false,
2339
+ "notNull": true
2340
+ },
2341
+ "role_id": {
2342
+ "name": "role_id",
2343
+ "type": "text",
2344
+ "primaryKey": false,
2345
+ "notNull": true
2346
+ },
2347
+ "person_id": {
2348
+ "name": "person_id",
2349
+ "type": "text",
2350
+ "primaryKey": false,
2351
+ "notNull": true
2352
+ },
2353
+ "status": {
2354
+ "name": "status",
2355
+ "type": "text",
2356
+ "primaryKey": false,
2357
+ "notNull": true
2358
+ },
2359
+ "interview_stage": {
2360
+ "name": "interview_stage",
2361
+ "type": "text",
2362
+ "primaryKey": false,
2363
+ "notNull": false
2364
+ },
2365
+ "referrer_person_id": {
2366
+ "name": "referrer_person_id",
2367
+ "type": "text",
2368
+ "primaryKey": false,
2369
+ "notNull": false
2370
+ },
2371
+ "created_at": {
2372
+ "name": "created_at",
2373
+ "type": "timestamp with time zone",
2374
+ "primaryKey": false,
2375
+ "notNull": true,
2376
+ "default": "now()"
2377
+ },
2378
+ "updated_at": {
2379
+ "name": "updated_at",
2380
+ "type": "timestamp with time zone",
2381
+ "primaryKey": false,
2382
+ "notNull": true,
2383
+ "default": "now()"
2384
+ }
2385
+ },
2386
+ "indexes": {
2387
+ "candidates_workspace_idx": {
2388
+ "name": "candidates_workspace_idx",
2389
+ "columns": [
2390
+ {
2391
+ "expression": "workspace_id",
2392
+ "isExpression": false,
2393
+ "asc": true,
2394
+ "nulls": "last"
2395
+ }
2396
+ ],
2397
+ "isUnique": false,
2398
+ "concurrently": false,
2399
+ "method": "btree",
2400
+ "with": {}
2401
+ }
2402
+ },
2403
+ "foreignKeys": {
2404
+ "candidates_workspace_id_workspaces_id_fk": {
2405
+ "name": "candidates_workspace_id_workspaces_id_fk",
2406
+ "tableFrom": "candidates",
2407
+ "tableTo": "workspaces",
2408
+ "columnsFrom": [
2409
+ "workspace_id"
2410
+ ],
2411
+ "columnsTo": [
2412
+ "id"
2413
+ ],
2414
+ "onDelete": "cascade",
2415
+ "onUpdate": "no action"
2416
+ },
2417
+ "candidates_role_id_roles_id_fk": {
2418
+ "name": "candidates_role_id_roles_id_fk",
2419
+ "tableFrom": "candidates",
2420
+ "tableTo": "roles",
2421
+ "columnsFrom": [
2422
+ "role_id"
2423
+ ],
2424
+ "columnsTo": [
2425
+ "id"
2426
+ ],
2427
+ "onDelete": "cascade",
2428
+ "onUpdate": "no action"
2429
+ },
2430
+ "candidates_person_id_people_id_fk": {
2431
+ "name": "candidates_person_id_people_id_fk",
2432
+ "tableFrom": "candidates",
2433
+ "tableTo": "people",
2434
+ "columnsFrom": [
2435
+ "person_id"
2436
+ ],
2437
+ "columnsTo": [
2438
+ "id"
2439
+ ],
2440
+ "onDelete": "cascade",
2441
+ "onUpdate": "no action"
2442
+ },
2443
+ "candidates_referrer_person_id_people_id_fk": {
2444
+ "name": "candidates_referrer_person_id_people_id_fk",
2445
+ "tableFrom": "candidates",
2446
+ "tableTo": "people",
2447
+ "columnsFrom": [
2448
+ "referrer_person_id"
2449
+ ],
2450
+ "columnsTo": [
2451
+ "id"
2452
+ ],
2453
+ "onDelete": "restrict",
2454
+ "onUpdate": "no action"
2455
+ }
2456
+ },
2457
+ "compositePrimaryKeys": {},
2458
+ "uniqueConstraints": {
2459
+ "candidates_role_person_key": {
2460
+ "name": "candidates_role_person_key",
2461
+ "nullsNotDistinct": false,
2462
+ "columns": [
2463
+ "role_id",
2464
+ "person_id"
2465
+ ]
2466
+ }
2467
+ },
2468
+ "policies": {},
2469
+ "checkConstraints": {
2470
+ "candidates_status_check": {
2471
+ "name": "candidates_status_check",
2472
+ "value": "\"candidates\".\"status\" in ('in_process', 'nurture', 'hired', 'passed', 'withdrawn')"
2473
+ },
2474
+ "candidates_interview_stage_check": {
2475
+ "name": "candidates_interview_stage_check",
2476
+ "value": "\"candidates\".\"interview_stage\" is null or \"candidates\".\"interview_stage\" in ('sourced', 'screen', 'interview', 'offer')"
2477
+ }
2478
+ },
2479
+ "isRLSEnabled": false
2480
+ },
2481
+ "public.roles": {
2482
+ "name": "roles",
2483
+ "schema": "",
2484
+ "columns": {
2485
+ "id": {
2486
+ "name": "id",
2487
+ "type": "text",
2488
+ "primaryKey": true,
2489
+ "notNull": true
2490
+ },
2491
+ "workspace_id": {
2492
+ "name": "workspace_id",
2493
+ "type": "text",
2494
+ "primaryKey": false,
2495
+ "notNull": true
2496
+ },
2497
+ "title": {
2498
+ "name": "title",
2499
+ "type": "text",
2500
+ "primaryKey": false,
2501
+ "notNull": true
2502
+ },
2503
+ "status": {
2504
+ "name": "status",
2505
+ "type": "text",
2506
+ "primaryKey": false,
2507
+ "notNull": true
2508
+ },
2509
+ "created_at": {
2510
+ "name": "created_at",
2511
+ "type": "timestamp with time zone",
2512
+ "primaryKey": false,
2513
+ "notNull": true,
2514
+ "default": "now()"
2515
+ },
2516
+ "updated_at": {
2517
+ "name": "updated_at",
2518
+ "type": "timestamp with time zone",
2519
+ "primaryKey": false,
2520
+ "notNull": true,
2521
+ "default": "now()"
2522
+ }
2523
+ },
2524
+ "indexes": {
2525
+ "roles_workspace_idx": {
2526
+ "name": "roles_workspace_idx",
2527
+ "columns": [
2528
+ {
2529
+ "expression": "workspace_id",
2530
+ "isExpression": false,
2531
+ "asc": true,
2532
+ "nulls": "last"
2533
+ }
2534
+ ],
2535
+ "isUnique": false,
2536
+ "concurrently": false,
2537
+ "method": "btree",
2538
+ "with": {}
2539
+ }
2540
+ },
2541
+ "foreignKeys": {
2542
+ "roles_workspace_id_workspaces_id_fk": {
2543
+ "name": "roles_workspace_id_workspaces_id_fk",
2544
+ "tableFrom": "roles",
2545
+ "tableTo": "workspaces",
2546
+ "columnsFrom": [
2547
+ "workspace_id"
2548
+ ],
2549
+ "columnsTo": [
2550
+ "id"
2551
+ ],
2552
+ "onDelete": "cascade",
2553
+ "onUpdate": "no action"
2554
+ }
2555
+ },
2556
+ "compositePrimaryKeys": {},
2557
+ "uniqueConstraints": {},
2558
+ "policies": {},
2559
+ "checkConstraints": {
2560
+ "roles_status_check": {
2561
+ "name": "roles_status_check",
2562
+ "value": "\"roles\".\"status\" in ('open', 'closed')"
2563
+ }
2564
+ },
2565
+ "isRLSEnabled": false
2566
+ },
2567
+ "public.plan_items": {
2568
+ "name": "plan_items",
2569
+ "schema": "",
2570
+ "columns": {
2571
+ "id": {
2572
+ "name": "id",
2573
+ "type": "text",
2574
+ "primaryKey": true,
2575
+ "notNull": true
2576
+ },
2577
+ "workspace_id": {
2578
+ "name": "workspace_id",
2579
+ "type": "text",
2580
+ "primaryKey": false,
2581
+ "notNull": true
2582
+ },
2583
+ "target_type": {
2584
+ "name": "target_type",
2585
+ "type": "text",
2586
+ "primaryKey": false,
2587
+ "notNull": true
2588
+ },
2589
+ "target_id": {
2590
+ "name": "target_id",
2591
+ "type": "text",
2592
+ "primaryKey": false,
2593
+ "notNull": true
2594
+ },
2595
+ "date": {
2596
+ "name": "date",
2597
+ "type": "date",
2598
+ "primaryKey": false,
2599
+ "notNull": true
2600
+ },
2601
+ "title": {
2602
+ "name": "title",
2603
+ "type": "text",
2604
+ "primaryKey": false,
2605
+ "notNull": true
2606
+ },
2607
+ "owner_id": {
2608
+ "name": "owner_id",
2609
+ "type": "text",
2610
+ "primaryKey": false,
2611
+ "notNull": false
2612
+ },
2613
+ "status": {
2614
+ "name": "status",
2615
+ "type": "text",
2616
+ "primaryKey": false,
2617
+ "notNull": true,
2618
+ "default": "'todo'"
2619
+ },
2620
+ "created_at": {
2621
+ "name": "created_at",
2622
+ "type": "timestamp with time zone",
2623
+ "primaryKey": false,
2624
+ "notNull": true,
2625
+ "default": "now()"
2626
+ },
2627
+ "updated_at": {
2628
+ "name": "updated_at",
2629
+ "type": "timestamp with time zone",
2630
+ "primaryKey": false,
2631
+ "notNull": true,
2632
+ "default": "now()"
2633
+ }
2634
+ },
2635
+ "indexes": {
2636
+ "plan_items_target_idx": {
2637
+ "name": "plan_items_target_idx",
2638
+ "columns": [
2639
+ {
2640
+ "expression": "workspace_id",
2641
+ "isExpression": false,
2642
+ "asc": true,
2643
+ "nulls": "last"
2644
+ },
2645
+ {
2646
+ "expression": "target_type",
2647
+ "isExpression": false,
2648
+ "asc": true,
2649
+ "nulls": "last"
2650
+ },
2651
+ {
2652
+ "expression": "target_id",
2653
+ "isExpression": false,
2654
+ "asc": true,
2655
+ "nulls": "last"
2656
+ }
2657
+ ],
2658
+ "isUnique": false,
2659
+ "concurrently": false,
2660
+ "method": "btree",
2661
+ "with": {}
2662
+ },
2663
+ "plan_items_date_idx": {
2664
+ "name": "plan_items_date_idx",
2665
+ "columns": [
2666
+ {
2667
+ "expression": "workspace_id",
2668
+ "isExpression": false,
2669
+ "asc": true,
2670
+ "nulls": "last"
2671
+ },
2672
+ {
2673
+ "expression": "date",
2674
+ "isExpression": false,
2675
+ "asc": true,
2676
+ "nulls": "last"
2677
+ }
2678
+ ],
2679
+ "isUnique": false,
2680
+ "concurrently": false,
2681
+ "method": "btree",
2682
+ "with": {}
2683
+ }
2684
+ },
2685
+ "foreignKeys": {
2686
+ "plan_items_workspace_id_workspaces_id_fk": {
2687
+ "name": "plan_items_workspace_id_workspaces_id_fk",
2688
+ "tableFrom": "plan_items",
2689
+ "tableTo": "workspaces",
2690
+ "columnsFrom": [
2691
+ "workspace_id"
2692
+ ],
2693
+ "columnsTo": [
2694
+ "id"
2695
+ ],
2696
+ "onDelete": "cascade",
2697
+ "onUpdate": "no action"
2698
+ },
2699
+ "plan_items_owner_id_workspace_members_id_fk": {
2700
+ "name": "plan_items_owner_id_workspace_members_id_fk",
2701
+ "tableFrom": "plan_items",
2702
+ "tableTo": "workspace_members",
2703
+ "columnsFrom": [
2704
+ "owner_id"
2705
+ ],
2706
+ "columnsTo": [
2707
+ "id"
2708
+ ],
2709
+ "onDelete": "restrict",
2710
+ "onUpdate": "no action"
2711
+ }
2712
+ },
2713
+ "compositePrimaryKeys": {},
2714
+ "uniqueConstraints": {},
2715
+ "policies": {},
2716
+ "checkConstraints": {
2717
+ "plan_items_target_type_check": {
2718
+ "name": "plan_items_target_type_check",
2719
+ "value": "\"plan_items\".\"target_type\" in ('deal', 'opportunity', 'raise', 'partnership')"
2720
+ },
2721
+ "plan_items_status_check": {
2722
+ "name": "plan_items_status_check",
2723
+ "value": "\"plan_items\".\"status\" in ('todo', 'in_progress', 'done')"
2724
+ }
2725
+ },
2726
+ "isRLSEnabled": false
2727
+ },
2728
+ "public.decisions": {
2729
+ "name": "decisions",
2730
+ "schema": "",
2731
+ "columns": {
2732
+ "id": {
2733
+ "name": "id",
2734
+ "type": "text",
2735
+ "primaryKey": true,
2736
+ "notNull": true
2737
+ },
2738
+ "workspace_id": {
2739
+ "name": "workspace_id",
2740
+ "type": "text",
2741
+ "primaryKey": false,
2742
+ "notNull": true
2743
+ },
2744
+ "target_type": {
2745
+ "name": "target_type",
2746
+ "type": "text",
2747
+ "primaryKey": false,
2748
+ "notNull": true
2749
+ },
2750
+ "target_id": {
2751
+ "name": "target_id",
2752
+ "type": "text",
2753
+ "primaryKey": false,
2754
+ "notNull": true
2755
+ },
2756
+ "body": {
2757
+ "name": "body",
2758
+ "type": "text",
2759
+ "primaryKey": false,
2760
+ "notNull": true
2761
+ },
2762
+ "rationale": {
2763
+ "name": "rationale",
2764
+ "type": "text",
2765
+ "primaryKey": false,
2766
+ "notNull": false
2767
+ },
2768
+ "decided_at": {
2769
+ "name": "decided_at",
2770
+ "type": "timestamp with time zone",
2771
+ "primaryKey": false,
2772
+ "notNull": true,
2773
+ "default": "now()"
2774
+ },
2775
+ "owner_id": {
2776
+ "name": "owner_id",
2777
+ "type": "text",
2778
+ "primaryKey": false,
2779
+ "notNull": false
2780
+ },
2781
+ "due_at": {
2782
+ "name": "due_at",
2783
+ "type": "timestamp with time zone",
2784
+ "primaryKey": false,
2785
+ "notNull": false
2786
+ },
2787
+ "created_at": {
2788
+ "name": "created_at",
2789
+ "type": "timestamp with time zone",
2790
+ "primaryKey": false,
2791
+ "notNull": true,
2792
+ "default": "now()"
2793
+ },
2794
+ "updated_at": {
2795
+ "name": "updated_at",
2796
+ "type": "timestamp with time zone",
2797
+ "primaryKey": false,
2798
+ "notNull": true,
2799
+ "default": "now()"
2800
+ }
2801
+ },
2802
+ "indexes": {
2803
+ "decisions_target_idx": {
2804
+ "name": "decisions_target_idx",
2805
+ "columns": [
2806
+ {
2807
+ "expression": "workspace_id",
2808
+ "isExpression": false,
2809
+ "asc": true,
2810
+ "nulls": "last"
2811
+ },
2812
+ {
2813
+ "expression": "target_type",
2814
+ "isExpression": false,
2815
+ "asc": true,
2816
+ "nulls": "last"
2817
+ },
2818
+ {
2819
+ "expression": "target_id",
2820
+ "isExpression": false,
2821
+ "asc": true,
2822
+ "nulls": "last"
2823
+ }
2824
+ ],
2825
+ "isUnique": false,
2826
+ "concurrently": false,
2827
+ "method": "btree",
2828
+ "with": {}
2829
+ }
2830
+ },
2831
+ "foreignKeys": {
2832
+ "decisions_workspace_id_workspaces_id_fk": {
2833
+ "name": "decisions_workspace_id_workspaces_id_fk",
2834
+ "tableFrom": "decisions",
2835
+ "tableTo": "workspaces",
2836
+ "columnsFrom": [
2837
+ "workspace_id"
2838
+ ],
2839
+ "columnsTo": [
2840
+ "id"
2841
+ ],
2842
+ "onDelete": "cascade",
2843
+ "onUpdate": "no action"
2844
+ },
2845
+ "decisions_owner_id_workspace_members_id_fk": {
2846
+ "name": "decisions_owner_id_workspace_members_id_fk",
2847
+ "tableFrom": "decisions",
2848
+ "tableTo": "workspace_members",
2849
+ "columnsFrom": [
2850
+ "owner_id"
2851
+ ],
2852
+ "columnsTo": [
2853
+ "id"
2854
+ ],
2855
+ "onDelete": "restrict",
2856
+ "onUpdate": "no action"
2857
+ }
2858
+ },
2859
+ "compositePrimaryKeys": {},
2860
+ "uniqueConstraints": {},
2861
+ "policies": {},
2862
+ "checkConstraints": {
2863
+ "decisions_target_type_check": {
2864
+ "name": "decisions_target_type_check",
2865
+ "value": "\"decisions\".\"target_type\" in ('person', 'company', 'deal', 'opportunity', 'partnership', 'raise', 'candidate')"
2866
+ }
2867
+ },
2868
+ "isRLSEnabled": false
2869
+ },
2870
+ "public.notes": {
2871
+ "name": "notes",
2872
+ "schema": "",
2873
+ "columns": {
2874
+ "id": {
2875
+ "name": "id",
2876
+ "type": "text",
2877
+ "primaryKey": true,
2878
+ "notNull": true
2879
+ },
2880
+ "workspace_id": {
2881
+ "name": "workspace_id",
2882
+ "type": "text",
2883
+ "primaryKey": false,
2884
+ "notNull": true
2885
+ },
2886
+ "target_type": {
2887
+ "name": "target_type",
2888
+ "type": "text",
2889
+ "primaryKey": false,
2890
+ "notNull": true
2891
+ },
2892
+ "target_id": {
2893
+ "name": "target_id",
2894
+ "type": "text",
2895
+ "primaryKey": false,
2896
+ "notNull": true
2897
+ },
2898
+ "body": {
2899
+ "name": "body",
2900
+ "type": "text",
2901
+ "primaryKey": false,
2902
+ "notNull": true
2903
+ },
2904
+ "author_id": {
2905
+ "name": "author_id",
2906
+ "type": "text",
2907
+ "primaryKey": false,
2908
+ "notNull": false
2909
+ },
2910
+ "pinned": {
2911
+ "name": "pinned",
2912
+ "type": "boolean",
2913
+ "primaryKey": false,
2914
+ "notNull": true,
2915
+ "default": false
2916
+ },
2917
+ "created_at": {
2918
+ "name": "created_at",
2919
+ "type": "timestamp with time zone",
2920
+ "primaryKey": false,
2921
+ "notNull": true,
2922
+ "default": "now()"
2923
+ },
2924
+ "updated_at": {
2925
+ "name": "updated_at",
2926
+ "type": "timestamp with time zone",
2927
+ "primaryKey": false,
2928
+ "notNull": true,
2929
+ "default": "now()"
2930
+ }
2931
+ },
2932
+ "indexes": {
2933
+ "notes_target_idx": {
2934
+ "name": "notes_target_idx",
2935
+ "columns": [
2936
+ {
2937
+ "expression": "workspace_id",
2938
+ "isExpression": false,
2939
+ "asc": true,
2940
+ "nulls": "last"
2941
+ },
2942
+ {
2943
+ "expression": "target_type",
2944
+ "isExpression": false,
2945
+ "asc": true,
2946
+ "nulls": "last"
2947
+ },
2948
+ {
2949
+ "expression": "target_id",
2950
+ "isExpression": false,
2951
+ "asc": true,
2952
+ "nulls": "last"
2953
+ }
2954
+ ],
2955
+ "isUnique": false,
2956
+ "concurrently": false,
2957
+ "method": "btree",
2958
+ "with": {}
2959
+ }
2960
+ },
2961
+ "foreignKeys": {
2962
+ "notes_workspace_id_workspaces_id_fk": {
2963
+ "name": "notes_workspace_id_workspaces_id_fk",
2964
+ "tableFrom": "notes",
2965
+ "tableTo": "workspaces",
2966
+ "columnsFrom": [
2967
+ "workspace_id"
2968
+ ],
2969
+ "columnsTo": [
2970
+ "id"
2971
+ ],
2972
+ "onDelete": "cascade",
2973
+ "onUpdate": "no action"
2974
+ },
2975
+ "notes_author_id_workspace_members_id_fk": {
2976
+ "name": "notes_author_id_workspace_members_id_fk",
2977
+ "tableFrom": "notes",
2978
+ "tableTo": "workspace_members",
2979
+ "columnsFrom": [
2980
+ "author_id"
2981
+ ],
2982
+ "columnsTo": [
2983
+ "id"
2984
+ ],
2985
+ "onDelete": "restrict",
2986
+ "onUpdate": "no action"
2987
+ }
2988
+ },
2989
+ "compositePrimaryKeys": {},
2990
+ "uniqueConstraints": {},
2991
+ "policies": {},
2992
+ "checkConstraints": {
2993
+ "notes_target_type_check": {
2994
+ "name": "notes_target_type_check",
2995
+ "value": "\"notes\".\"target_type\" in ('person', 'company', 'deal', 'opportunity', 'partnership', 'raise', 'candidate')"
2996
+ }
2997
+ },
2998
+ "isRLSEnabled": false
2999
+ },
3000
+ "public.activities": {
3001
+ "name": "activities",
3002
+ "schema": "",
3003
+ "columns": {
3004
+ "id": {
3005
+ "name": "id",
3006
+ "type": "text",
3007
+ "primaryKey": true,
3008
+ "notNull": true
3009
+ },
3010
+ "workspace_id": {
3011
+ "name": "workspace_id",
3012
+ "type": "text",
3013
+ "primaryKey": false,
3014
+ "notNull": true
3015
+ },
3016
+ "target_type": {
3017
+ "name": "target_type",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": true
3021
+ },
3022
+ "target_id": {
3023
+ "name": "target_id",
3024
+ "type": "text",
3025
+ "primaryKey": false,
3026
+ "notNull": true
3027
+ },
3028
+ "kind": {
3029
+ "name": "kind",
3030
+ "type": "text",
3031
+ "primaryKey": false,
3032
+ "notNull": true
3033
+ },
3034
+ "actor_member_id": {
3035
+ "name": "actor_member_id",
3036
+ "type": "text",
3037
+ "primaryKey": false,
3038
+ "notNull": false
3039
+ },
3040
+ "actor_label": {
3041
+ "name": "actor_label",
3042
+ "type": "text",
3043
+ "primaryKey": false,
3044
+ "notNull": false
3045
+ },
3046
+ "action": {
3047
+ "name": "action",
3048
+ "type": "text",
3049
+ "primaryKey": false,
3050
+ "notNull": true
3051
+ },
3052
+ "detail": {
3053
+ "name": "detail",
3054
+ "type": "text",
3055
+ "primaryKey": false,
3056
+ "notNull": false
3057
+ },
3058
+ "created_at": {
3059
+ "name": "created_at",
3060
+ "type": "timestamp with time zone",
3061
+ "primaryKey": false,
3062
+ "notNull": true,
3063
+ "default": "now()"
3064
+ }
3065
+ },
3066
+ "indexes": {
3067
+ "activities_target_idx": {
3068
+ "name": "activities_target_idx",
3069
+ "columns": [
3070
+ {
3071
+ "expression": "workspace_id",
3072
+ "isExpression": false,
3073
+ "asc": true,
3074
+ "nulls": "last"
3075
+ },
3076
+ {
3077
+ "expression": "target_type",
3078
+ "isExpression": false,
3079
+ "asc": true,
3080
+ "nulls": "last"
3081
+ },
3082
+ {
3083
+ "expression": "target_id",
3084
+ "isExpression": false,
3085
+ "asc": true,
3086
+ "nulls": "last"
3087
+ }
3088
+ ],
3089
+ "isUnique": false,
3090
+ "concurrently": false,
3091
+ "method": "btree",
3092
+ "with": {}
3093
+ }
3094
+ },
3095
+ "foreignKeys": {
3096
+ "activities_workspace_id_workspaces_id_fk": {
3097
+ "name": "activities_workspace_id_workspaces_id_fk",
3098
+ "tableFrom": "activities",
3099
+ "tableTo": "workspaces",
3100
+ "columnsFrom": [
3101
+ "workspace_id"
3102
+ ],
3103
+ "columnsTo": [
3104
+ "id"
3105
+ ],
3106
+ "onDelete": "cascade",
3107
+ "onUpdate": "no action"
3108
+ },
3109
+ "activities_actor_member_id_workspace_members_id_fk": {
3110
+ "name": "activities_actor_member_id_workspace_members_id_fk",
3111
+ "tableFrom": "activities",
3112
+ "tableTo": "workspace_members",
3113
+ "columnsFrom": [
3114
+ "actor_member_id"
3115
+ ],
3116
+ "columnsTo": [
3117
+ "id"
3118
+ ],
3119
+ "onDelete": "set null",
3120
+ "onUpdate": "no action"
3121
+ }
3122
+ },
3123
+ "compositePrimaryKeys": {},
3124
+ "uniqueConstraints": {},
3125
+ "policies": {},
3126
+ "checkConstraints": {
3127
+ "activities_target_type_check": {
3128
+ "name": "activities_target_type_check",
3129
+ "value": "\"activities\".\"target_type\" in ('person', 'company', 'deal', 'opportunity', 'partnership', 'raise', 'candidate')"
3130
+ },
3131
+ "activities_kind_check": {
3132
+ "name": "activities_kind_check",
3133
+ "value": "\"activities\".\"kind\" in ('created', 'updated', 'stage_changed', 'note_added', 'email', 'call', 'meeting', 'linked')"
3134
+ }
3135
+ },
3136
+ "isRLSEnabled": false
3137
+ },
3138
+ "public.handbook_pages": {
3139
+ "name": "handbook_pages",
3140
+ "schema": "",
3141
+ "columns": {
3142
+ "id": {
3143
+ "name": "id",
3144
+ "type": "text",
3145
+ "primaryKey": true,
3146
+ "notNull": true
3147
+ },
3148
+ "workspace_id": {
3149
+ "name": "workspace_id",
3150
+ "type": "text",
3151
+ "primaryKey": false,
3152
+ "notNull": true
3153
+ },
3154
+ "title": {
3155
+ "name": "title",
3156
+ "type": "text",
3157
+ "primaryKey": false,
3158
+ "notNull": true
3159
+ },
3160
+ "slug": {
3161
+ "name": "slug",
3162
+ "type": "text",
3163
+ "primaryKey": false,
3164
+ "notNull": true
3165
+ },
3166
+ "parent_id": {
3167
+ "name": "parent_id",
3168
+ "type": "text",
3169
+ "primaryKey": false,
3170
+ "notNull": false
3171
+ },
3172
+ "sort_order": {
3173
+ "name": "sort_order",
3174
+ "type": "integer",
3175
+ "primaryKey": false,
3176
+ "notNull": true
3177
+ },
3178
+ "body": {
3179
+ "name": "body",
3180
+ "type": "text",
3181
+ "primaryKey": false,
3182
+ "notNull": true,
3183
+ "default": "''"
3184
+ },
3185
+ "updated_by": {
3186
+ "name": "updated_by",
3187
+ "type": "text",
3188
+ "primaryKey": false,
3189
+ "notNull": false
3190
+ },
3191
+ "created_at": {
3192
+ "name": "created_at",
3193
+ "type": "timestamp with time zone",
3194
+ "primaryKey": false,
3195
+ "notNull": true,
3196
+ "default": "now()"
3197
+ },
3198
+ "updated_at": {
3199
+ "name": "updated_at",
3200
+ "type": "timestamp with time zone",
3201
+ "primaryKey": false,
3202
+ "notNull": true,
3203
+ "default": "now()"
3204
+ }
3205
+ },
3206
+ "indexes": {
3207
+ "handbook_pages_parent_idx": {
3208
+ "name": "handbook_pages_parent_idx",
3209
+ "columns": [
3210
+ {
3211
+ "expression": "workspace_id",
3212
+ "isExpression": false,
3213
+ "asc": true,
3214
+ "nulls": "last"
3215
+ },
3216
+ {
3217
+ "expression": "parent_id",
3218
+ "isExpression": false,
3219
+ "asc": true,
3220
+ "nulls": "last"
3221
+ }
3222
+ ],
3223
+ "isUnique": false,
3224
+ "concurrently": false,
3225
+ "method": "btree",
3226
+ "with": {}
3227
+ }
3228
+ },
3229
+ "foreignKeys": {
3230
+ "handbook_pages_workspace_id_workspaces_id_fk": {
3231
+ "name": "handbook_pages_workspace_id_workspaces_id_fk",
3232
+ "tableFrom": "handbook_pages",
3233
+ "tableTo": "workspaces",
3234
+ "columnsFrom": [
3235
+ "workspace_id"
3236
+ ],
3237
+ "columnsTo": [
3238
+ "id"
3239
+ ],
3240
+ "onDelete": "cascade",
3241
+ "onUpdate": "no action"
3242
+ },
3243
+ "handbook_pages_parent_id_handbook_pages_id_fk": {
3244
+ "name": "handbook_pages_parent_id_handbook_pages_id_fk",
3245
+ "tableFrom": "handbook_pages",
3246
+ "tableTo": "handbook_pages",
3247
+ "columnsFrom": [
3248
+ "parent_id"
3249
+ ],
3250
+ "columnsTo": [
3251
+ "id"
3252
+ ],
3253
+ "onDelete": "cascade",
3254
+ "onUpdate": "no action"
3255
+ },
3256
+ "handbook_pages_updated_by_workspace_members_id_fk": {
3257
+ "name": "handbook_pages_updated_by_workspace_members_id_fk",
3258
+ "tableFrom": "handbook_pages",
3259
+ "tableTo": "workspace_members",
3260
+ "columnsFrom": [
3261
+ "updated_by"
3262
+ ],
3263
+ "columnsTo": [
3264
+ "id"
3265
+ ],
3266
+ "onDelete": "set null",
3267
+ "onUpdate": "no action"
3268
+ }
3269
+ },
3270
+ "compositePrimaryKeys": {},
3271
+ "uniqueConstraints": {
3272
+ "handbook_pages_workspace_slug_key": {
3273
+ "name": "handbook_pages_workspace_slug_key",
3274
+ "nullsNotDistinct": false,
3275
+ "columns": [
3276
+ "workspace_id",
3277
+ "slug"
3278
+ ]
3279
+ }
3280
+ },
3281
+ "policies": {},
3282
+ "checkConstraints": {},
3283
+ "isRLSEnabled": false
3284
+ },
3285
+ "public.form_fields": {
3286
+ "name": "form_fields",
3287
+ "schema": "",
3288
+ "columns": {
3289
+ "id": {
3290
+ "name": "id",
3291
+ "type": "text",
3292
+ "primaryKey": true,
3293
+ "notNull": true
3294
+ },
3295
+ "workspace_id": {
3296
+ "name": "workspace_id",
3297
+ "type": "text",
3298
+ "primaryKey": false,
3299
+ "notNull": true
3300
+ },
3301
+ "form_id": {
3302
+ "name": "form_id",
3303
+ "type": "text",
3304
+ "primaryKey": false,
3305
+ "notNull": true
3306
+ },
3307
+ "label": {
3308
+ "name": "label",
3309
+ "type": "text",
3310
+ "primaryKey": false,
3311
+ "notNull": true
3312
+ },
3313
+ "type": {
3314
+ "name": "type",
3315
+ "type": "text",
3316
+ "primaryKey": false,
3317
+ "notNull": true
3318
+ },
3319
+ "required": {
3320
+ "name": "required",
3321
+ "type": "boolean",
3322
+ "primaryKey": false,
3323
+ "notNull": true,
3324
+ "default": false
3325
+ },
3326
+ "map_to": {
3327
+ "name": "map_to",
3328
+ "type": "text",
3329
+ "primaryKey": false,
3330
+ "notNull": true
3331
+ },
3332
+ "options": {
3333
+ "name": "options",
3334
+ "type": "jsonb",
3335
+ "primaryKey": false,
3336
+ "notNull": true,
3337
+ "default": "'[]'::jsonb"
3338
+ },
3339
+ "placeholder": {
3340
+ "name": "placeholder",
3341
+ "type": "text",
3342
+ "primaryKey": false,
3343
+ "notNull": false
3344
+ },
3345
+ "sort_order": {
3346
+ "name": "sort_order",
3347
+ "type": "integer",
3348
+ "primaryKey": false,
3349
+ "notNull": true
3350
+ },
3351
+ "created_at": {
3352
+ "name": "created_at",
3353
+ "type": "timestamp with time zone",
3354
+ "primaryKey": false,
3355
+ "notNull": true,
3356
+ "default": "now()"
3357
+ },
3358
+ "updated_at": {
3359
+ "name": "updated_at",
3360
+ "type": "timestamp with time zone",
3361
+ "primaryKey": false,
3362
+ "notNull": true,
3363
+ "default": "now()"
3364
+ }
3365
+ },
3366
+ "indexes": {
3367
+ "form_fields_form_idx": {
3368
+ "name": "form_fields_form_idx",
3369
+ "columns": [
3370
+ {
3371
+ "expression": "form_id",
3372
+ "isExpression": false,
3373
+ "asc": true,
3374
+ "nulls": "last"
3375
+ }
3376
+ ],
3377
+ "isUnique": false,
3378
+ "concurrently": false,
3379
+ "method": "btree",
3380
+ "with": {}
3381
+ }
3382
+ },
3383
+ "foreignKeys": {
3384
+ "form_fields_workspace_id_workspaces_id_fk": {
3385
+ "name": "form_fields_workspace_id_workspaces_id_fk",
3386
+ "tableFrom": "form_fields",
3387
+ "tableTo": "workspaces",
3388
+ "columnsFrom": [
3389
+ "workspace_id"
3390
+ ],
3391
+ "columnsTo": [
3392
+ "id"
3393
+ ],
3394
+ "onDelete": "cascade",
3395
+ "onUpdate": "no action"
3396
+ },
3397
+ "form_fields_form_id_forms_id_fk": {
3398
+ "name": "form_fields_form_id_forms_id_fk",
3399
+ "tableFrom": "form_fields",
3400
+ "tableTo": "forms",
3401
+ "columnsFrom": [
3402
+ "form_id"
3403
+ ],
3404
+ "columnsTo": [
3405
+ "id"
3406
+ ],
3407
+ "onDelete": "cascade",
3408
+ "onUpdate": "no action"
3409
+ }
3410
+ },
3411
+ "compositePrimaryKeys": {},
3412
+ "uniqueConstraints": {},
3413
+ "policies": {},
3414
+ "checkConstraints": {
3415
+ "form_fields_type_check": {
3416
+ "name": "form_fields_type_check",
3417
+ "value": "\"form_fields\".\"type\" in ('text', 'email', 'textarea', 'select')"
3418
+ },
3419
+ "form_fields_map_to_check": {
3420
+ "name": "form_fields_map_to_check",
3421
+ "value": "\"form_fields\".\"map_to\" in ('person.name', 'person.email', 'company.name', 'company.domain', 'position.title', 'deal.name', 'submission')"
3422
+ }
3423
+ },
3424
+ "isRLSEnabled": false
3425
+ },
3426
+ "public.form_submissions": {
3427
+ "name": "form_submissions",
3428
+ "schema": "",
3429
+ "columns": {
3430
+ "id": {
3431
+ "name": "id",
3432
+ "type": "text",
3433
+ "primaryKey": true,
3434
+ "notNull": true
3435
+ },
3436
+ "workspace_id": {
3437
+ "name": "workspace_id",
3438
+ "type": "text",
3439
+ "primaryKey": false,
3440
+ "notNull": true
3441
+ },
3442
+ "form_id": {
3443
+ "name": "form_id",
3444
+ "type": "text",
3445
+ "primaryKey": false,
3446
+ "notNull": true
3447
+ },
3448
+ "submitted_at": {
3449
+ "name": "submitted_at",
3450
+ "type": "timestamp with time zone",
3451
+ "primaryKey": false,
3452
+ "notNull": true,
3453
+ "default": "now()"
3454
+ },
3455
+ "answers": {
3456
+ "name": "answers",
3457
+ "type": "jsonb",
3458
+ "primaryKey": false,
3459
+ "notNull": true
3460
+ },
3461
+ "person_id": {
3462
+ "name": "person_id",
3463
+ "type": "text",
3464
+ "primaryKey": false,
3465
+ "notNull": false
3466
+ },
3467
+ "company_id": {
3468
+ "name": "company_id",
3469
+ "type": "text",
3470
+ "primaryKey": false,
3471
+ "notNull": false
3472
+ },
3473
+ "position_id": {
3474
+ "name": "position_id",
3475
+ "type": "text",
3476
+ "primaryKey": false,
3477
+ "notNull": false
3478
+ },
3479
+ "deal_id": {
3480
+ "name": "deal_id",
3481
+ "type": "text",
3482
+ "primaryKey": false,
3483
+ "notNull": false
3484
+ },
3485
+ "created_at": {
3486
+ "name": "created_at",
3487
+ "type": "timestamp with time zone",
3488
+ "primaryKey": false,
3489
+ "notNull": true,
3490
+ "default": "now()"
3491
+ }
3492
+ },
3493
+ "indexes": {
3494
+ "form_submissions_form_idx": {
3495
+ "name": "form_submissions_form_idx",
3496
+ "columns": [
3497
+ {
3498
+ "expression": "form_id",
3499
+ "isExpression": false,
3500
+ "asc": true,
3501
+ "nulls": "last"
3502
+ }
3503
+ ],
3504
+ "isUnique": false,
3505
+ "concurrently": false,
3506
+ "method": "btree",
3507
+ "with": {}
3508
+ }
3509
+ },
3510
+ "foreignKeys": {
3511
+ "form_submissions_workspace_id_workspaces_id_fk": {
3512
+ "name": "form_submissions_workspace_id_workspaces_id_fk",
3513
+ "tableFrom": "form_submissions",
3514
+ "tableTo": "workspaces",
3515
+ "columnsFrom": [
3516
+ "workspace_id"
3517
+ ],
3518
+ "columnsTo": [
3519
+ "id"
3520
+ ],
3521
+ "onDelete": "cascade",
3522
+ "onUpdate": "no action"
3523
+ },
3524
+ "form_submissions_form_id_forms_id_fk": {
3525
+ "name": "form_submissions_form_id_forms_id_fk",
3526
+ "tableFrom": "form_submissions",
3527
+ "tableTo": "forms",
3528
+ "columnsFrom": [
3529
+ "form_id"
3530
+ ],
3531
+ "columnsTo": [
3532
+ "id"
3533
+ ],
3534
+ "onDelete": "cascade",
3535
+ "onUpdate": "no action"
3536
+ },
3537
+ "form_submissions_person_id_people_id_fk": {
3538
+ "name": "form_submissions_person_id_people_id_fk",
3539
+ "tableFrom": "form_submissions",
3540
+ "tableTo": "people",
3541
+ "columnsFrom": [
3542
+ "person_id"
3543
+ ],
3544
+ "columnsTo": [
3545
+ "id"
3546
+ ],
3547
+ "onDelete": "set null",
3548
+ "onUpdate": "no action"
3549
+ },
3550
+ "form_submissions_company_id_companies_id_fk": {
3551
+ "name": "form_submissions_company_id_companies_id_fk",
3552
+ "tableFrom": "form_submissions",
3553
+ "tableTo": "companies",
3554
+ "columnsFrom": [
3555
+ "company_id"
3556
+ ],
3557
+ "columnsTo": [
3558
+ "id"
3559
+ ],
3560
+ "onDelete": "set null",
3561
+ "onUpdate": "no action"
3562
+ },
3563
+ "form_submissions_position_id_positions_id_fk": {
3564
+ "name": "form_submissions_position_id_positions_id_fk",
3565
+ "tableFrom": "form_submissions",
3566
+ "tableTo": "positions",
3567
+ "columnsFrom": [
3568
+ "position_id"
3569
+ ],
3570
+ "columnsTo": [
3571
+ "id"
3572
+ ],
3573
+ "onDelete": "set null",
3574
+ "onUpdate": "no action"
3575
+ },
3576
+ "form_submissions_deal_id_deals_id_fk": {
3577
+ "name": "form_submissions_deal_id_deals_id_fk",
3578
+ "tableFrom": "form_submissions",
3579
+ "tableTo": "deals",
3580
+ "columnsFrom": [
3581
+ "deal_id"
3582
+ ],
3583
+ "columnsTo": [
3584
+ "id"
3585
+ ],
3586
+ "onDelete": "set null",
3587
+ "onUpdate": "no action"
3588
+ }
3589
+ },
3590
+ "compositePrimaryKeys": {},
3591
+ "uniqueConstraints": {},
3592
+ "policies": {},
3593
+ "checkConstraints": {},
3594
+ "isRLSEnabled": false
3595
+ },
3596
+ "public.forms": {
3597
+ "name": "forms",
3598
+ "schema": "",
3599
+ "columns": {
3600
+ "id": {
3601
+ "name": "id",
3602
+ "type": "text",
3603
+ "primaryKey": true,
3604
+ "notNull": true
3605
+ },
3606
+ "workspace_id": {
3607
+ "name": "workspace_id",
3608
+ "type": "text",
3609
+ "primaryKey": false,
3610
+ "notNull": true
3611
+ },
3612
+ "name": {
3613
+ "name": "name",
3614
+ "type": "text",
3615
+ "primaryKey": false,
3616
+ "notNull": true
3617
+ },
3618
+ "description": {
3619
+ "name": "description",
3620
+ "type": "text",
3621
+ "primaryKey": false,
3622
+ "notNull": false
3623
+ },
3624
+ "status": {
3625
+ "name": "status",
3626
+ "type": "text",
3627
+ "primaryKey": false,
3628
+ "notNull": true,
3629
+ "default": "'active'"
3630
+ },
3631
+ "thank_you_message": {
3632
+ "name": "thank_you_message",
3633
+ "type": "text",
3634
+ "primaryKey": false,
3635
+ "notNull": true,
3636
+ "default": "''"
3637
+ },
3638
+ "create_deal": {
3639
+ "name": "create_deal",
3640
+ "type": "boolean",
3641
+ "primaryKey": false,
3642
+ "notNull": true,
3643
+ "default": false
3644
+ },
3645
+ "deal_stage_id": {
3646
+ "name": "deal_stage_id",
3647
+ "type": "text",
3648
+ "primaryKey": false,
3649
+ "notNull": false
3650
+ },
3651
+ "deal_name_template": {
3652
+ "name": "deal_name_template",
3653
+ "type": "text",
3654
+ "primaryKey": false,
3655
+ "notNull": false
3656
+ },
3657
+ "public_key": {
3658
+ "name": "public_key",
3659
+ "type": "text",
3660
+ "primaryKey": false,
3661
+ "notNull": true
3662
+ },
3663
+ "created_at": {
3664
+ "name": "created_at",
3665
+ "type": "timestamp with time zone",
3666
+ "primaryKey": false,
3667
+ "notNull": true,
3668
+ "default": "now()"
3669
+ },
3670
+ "updated_at": {
3671
+ "name": "updated_at",
3672
+ "type": "timestamp with time zone",
3673
+ "primaryKey": false,
3674
+ "notNull": true,
3675
+ "default": "now()"
3676
+ }
3677
+ },
3678
+ "indexes": {
3679
+ "forms_workspace_idx": {
3680
+ "name": "forms_workspace_idx",
3681
+ "columns": [
3682
+ {
3683
+ "expression": "workspace_id",
3684
+ "isExpression": false,
3685
+ "asc": true,
3686
+ "nulls": "last"
3687
+ }
3688
+ ],
3689
+ "isUnique": false,
3690
+ "concurrently": false,
3691
+ "method": "btree",
3692
+ "with": {}
3693
+ }
3694
+ },
3695
+ "foreignKeys": {
3696
+ "forms_workspace_id_workspaces_id_fk": {
3697
+ "name": "forms_workspace_id_workspaces_id_fk",
3698
+ "tableFrom": "forms",
3699
+ "tableTo": "workspaces",
3700
+ "columnsFrom": [
3701
+ "workspace_id"
3702
+ ],
3703
+ "columnsTo": [
3704
+ "id"
3705
+ ],
3706
+ "onDelete": "cascade",
3707
+ "onUpdate": "no action"
3708
+ },
3709
+ "forms_deal_stage_id_pipeline_stages_id_fk": {
3710
+ "name": "forms_deal_stage_id_pipeline_stages_id_fk",
3711
+ "tableFrom": "forms",
3712
+ "tableTo": "pipeline_stages",
3713
+ "columnsFrom": [
3714
+ "deal_stage_id"
3715
+ ],
3716
+ "columnsTo": [
3717
+ "id"
3718
+ ],
3719
+ "onDelete": "restrict",
3720
+ "onUpdate": "no action"
3721
+ }
3722
+ },
3723
+ "compositePrimaryKeys": {},
3724
+ "uniqueConstraints": {
3725
+ "forms_public_key_unique": {
3726
+ "name": "forms_public_key_unique",
3727
+ "nullsNotDistinct": false,
3728
+ "columns": [
3729
+ "public_key"
3730
+ ]
3731
+ }
3732
+ },
3733
+ "policies": {},
3734
+ "checkConstraints": {
3735
+ "forms_status_check": {
3736
+ "name": "forms_status_check",
3737
+ "value": "\"forms\".\"status\" in ('active', 'paused')"
3738
+ }
3739
+ },
3740
+ "isRLSEnabled": false
3741
+ },
3742
+ "public.import_jobs": {
3743
+ "name": "import_jobs",
3744
+ "schema": "",
3745
+ "columns": {
3746
+ "id": {
3747
+ "name": "id",
3748
+ "type": "text",
3749
+ "primaryKey": true,
3750
+ "notNull": true
3751
+ },
3752
+ "workspace_id": {
3753
+ "name": "workspace_id",
3754
+ "type": "text",
3755
+ "primaryKey": false,
3756
+ "notNull": true
3757
+ },
3758
+ "source": {
3759
+ "name": "source",
3760
+ "type": "text",
3761
+ "primaryKey": false,
3762
+ "notNull": true
3763
+ },
3764
+ "object": {
3765
+ "name": "object",
3766
+ "type": "text",
3767
+ "primaryKey": false,
3768
+ "notNull": true
3769
+ },
3770
+ "status": {
3771
+ "name": "status",
3772
+ "type": "text",
3773
+ "primaryKey": false,
3774
+ "notNull": true
3775
+ },
3776
+ "conflict_mode": {
3777
+ "name": "conflict_mode",
3778
+ "type": "text",
3779
+ "primaryKey": false,
3780
+ "notNull": true
3781
+ },
3782
+ "match_key": {
3783
+ "name": "match_key",
3784
+ "type": "text",
3785
+ "primaryKey": false,
3786
+ "notNull": true
3787
+ },
3788
+ "column_map": {
3789
+ "name": "column_map",
3790
+ "type": "jsonb",
3791
+ "primaryKey": false,
3792
+ "notNull": true,
3793
+ "default": "'{}'::jsonb"
3794
+ },
3795
+ "counts": {
3796
+ "name": "counts",
3797
+ "type": "jsonb",
3798
+ "primaryKey": false,
3799
+ "notNull": true,
3800
+ "default": "'{}'::jsonb"
3801
+ },
3802
+ "errors": {
3803
+ "name": "errors",
3804
+ "type": "jsonb",
3805
+ "primaryKey": false,
3806
+ "notNull": true,
3807
+ "default": "'[]'::jsonb"
3808
+ },
3809
+ "file_ref": {
3810
+ "name": "file_ref",
3811
+ "type": "text",
3812
+ "primaryKey": false,
3813
+ "notNull": false
3814
+ },
3815
+ "created_at": {
3816
+ "name": "created_at",
3817
+ "type": "timestamp with time zone",
3818
+ "primaryKey": false,
3819
+ "notNull": true,
3820
+ "default": "now()"
3821
+ },
3822
+ "updated_at": {
3823
+ "name": "updated_at",
3824
+ "type": "timestamp with time zone",
3825
+ "primaryKey": false,
3826
+ "notNull": true,
3827
+ "default": "now()"
3828
+ }
3829
+ },
3830
+ "indexes": {
3831
+ "import_jobs_workspace_idx": {
3832
+ "name": "import_jobs_workspace_idx",
3833
+ "columns": [
3834
+ {
3835
+ "expression": "workspace_id",
3836
+ "isExpression": false,
3837
+ "asc": true,
3838
+ "nulls": "last"
3839
+ }
3840
+ ],
3841
+ "isUnique": false,
3842
+ "concurrently": false,
3843
+ "method": "btree",
3844
+ "with": {}
3845
+ }
3846
+ },
3847
+ "foreignKeys": {
3848
+ "import_jobs_workspace_id_workspaces_id_fk": {
3849
+ "name": "import_jobs_workspace_id_workspaces_id_fk",
3850
+ "tableFrom": "import_jobs",
3851
+ "tableTo": "workspaces",
3852
+ "columnsFrom": [
3853
+ "workspace_id"
3854
+ ],
3855
+ "columnsTo": [
3856
+ "id"
3857
+ ],
3858
+ "onDelete": "cascade",
3859
+ "onUpdate": "no action"
3860
+ }
3861
+ },
3862
+ "compositePrimaryKeys": {},
3863
+ "uniqueConstraints": {},
3864
+ "policies": {},
3865
+ "checkConstraints": {
3866
+ "import_jobs_source_check": {
3867
+ "name": "import_jobs_source_check",
3868
+ "value": "\"import_jobs\".\"source\" in ('custom', 'hubspot', 'salesforce')"
3869
+ },
3870
+ "import_jobs_object_check": {
3871
+ "name": "import_jobs_object_check",
3872
+ "value": "\"import_jobs\".\"object\" in ('people', 'companies', 'positions', 'deals')"
3873
+ },
3874
+ "import_jobs_conflict_mode_check": {
3875
+ "name": "import_jobs_conflict_mode_check",
3876
+ "value": "\"import_jobs\".\"conflict_mode\" in ('skip', 'update')"
3877
+ }
3878
+ },
3879
+ "isRLSEnabled": false
3880
+ },
3881
+ "public.agent_registrations": {
3882
+ "name": "agent_registrations",
3883
+ "schema": "",
3884
+ "columns": {
3885
+ "id": {
3886
+ "name": "id",
3887
+ "type": "text",
3888
+ "primaryKey": true,
3889
+ "notNull": true
3890
+ },
3891
+ "workspace_id": {
3892
+ "name": "workspace_id",
3893
+ "type": "text",
3894
+ "primaryKey": false,
3895
+ "notNull": true
3896
+ },
3897
+ "name": {
3898
+ "name": "name",
3899
+ "type": "text",
3900
+ "primaryKey": false,
3901
+ "notNull": true
3902
+ },
3903
+ "endpoint": {
3904
+ "name": "endpoint",
3905
+ "type": "text",
3906
+ "primaryKey": false,
3907
+ "notNull": true
3908
+ },
3909
+ "auth_header_encrypted": {
3910
+ "name": "auth_header_encrypted",
3911
+ "type": "text",
3912
+ "primaryKey": false,
3913
+ "notNull": false
3914
+ },
3915
+ "last_run_at": {
3916
+ "name": "last_run_at",
3917
+ "type": "timestamp with time zone",
3918
+ "primaryKey": false,
3919
+ "notNull": false
3920
+ },
3921
+ "created_at": {
3922
+ "name": "created_at",
3923
+ "type": "timestamp with time zone",
3924
+ "primaryKey": false,
3925
+ "notNull": true,
3926
+ "default": "now()"
3927
+ },
3928
+ "updated_at": {
3929
+ "name": "updated_at",
3930
+ "type": "timestamp with time zone",
3931
+ "primaryKey": false,
3932
+ "notNull": true,
3933
+ "default": "now()"
3934
+ }
3935
+ },
3936
+ "indexes": {
3937
+ "agent_registrations_workspace_idx": {
3938
+ "name": "agent_registrations_workspace_idx",
3939
+ "columns": [
3940
+ {
3941
+ "expression": "workspace_id",
3942
+ "isExpression": false,
3943
+ "asc": true,
3944
+ "nulls": "last"
3945
+ }
3946
+ ],
3947
+ "isUnique": false,
3948
+ "concurrently": false,
3949
+ "method": "btree",
3950
+ "with": {}
3951
+ }
3952
+ },
3953
+ "foreignKeys": {
3954
+ "agent_registrations_workspace_id_workspaces_id_fk": {
3955
+ "name": "agent_registrations_workspace_id_workspaces_id_fk",
3956
+ "tableFrom": "agent_registrations",
3957
+ "tableTo": "workspaces",
3958
+ "columnsFrom": [
3959
+ "workspace_id"
3960
+ ],
3961
+ "columnsTo": [
3962
+ "id"
3963
+ ],
3964
+ "onDelete": "cascade",
3965
+ "onUpdate": "no action"
3966
+ }
3967
+ },
3968
+ "compositePrimaryKeys": {},
3969
+ "uniqueConstraints": {},
3970
+ "policies": {},
3971
+ "checkConstraints": {},
3972
+ "isRLSEnabled": false
3973
+ },
3974
+ "public.agent_runs": {
3975
+ "name": "agent_runs",
3976
+ "schema": "",
3977
+ "columns": {
3978
+ "id": {
3979
+ "name": "id",
3980
+ "type": "text",
3981
+ "primaryKey": true,
3982
+ "notNull": true
3983
+ },
3984
+ "workspace_id": {
3985
+ "name": "workspace_id",
3986
+ "type": "text",
3987
+ "primaryKey": false,
3988
+ "notNull": true
3989
+ },
3990
+ "agent_id": {
3991
+ "name": "agent_id",
3992
+ "type": "text",
3993
+ "primaryKey": false,
3994
+ "notNull": true
3995
+ },
3996
+ "task_id": {
3997
+ "name": "task_id",
3998
+ "type": "text",
3999
+ "primaryKey": false,
4000
+ "notNull": true
4001
+ },
4002
+ "target_type": {
4003
+ "name": "target_type",
4004
+ "type": "text",
4005
+ "primaryKey": false,
4006
+ "notNull": true
4007
+ },
4008
+ "target_id": {
4009
+ "name": "target_id",
4010
+ "type": "text",
4011
+ "primaryKey": false,
4012
+ "notNull": true
4013
+ },
4014
+ "status": {
4015
+ "name": "status",
4016
+ "type": "text",
4017
+ "primaryKey": false,
4018
+ "notNull": true,
4019
+ "default": "'queued'"
4020
+ },
4021
+ "prompt": {
4022
+ "name": "prompt",
4023
+ "type": "text",
4024
+ "primaryKey": false,
4025
+ "notNull": true
4026
+ },
4027
+ "created_at": {
4028
+ "name": "created_at",
4029
+ "type": "timestamp with time zone",
4030
+ "primaryKey": false,
4031
+ "notNull": true,
4032
+ "default": "now()"
4033
+ },
4034
+ "updated_at": {
4035
+ "name": "updated_at",
4036
+ "type": "timestamp with time zone",
4037
+ "primaryKey": false,
4038
+ "notNull": true,
4039
+ "default": "now()"
4040
+ }
4041
+ },
4042
+ "indexes": {
4043
+ "agent_runs_workspace_idx": {
4044
+ "name": "agent_runs_workspace_idx",
4045
+ "columns": [
4046
+ {
4047
+ "expression": "workspace_id",
4048
+ "isExpression": false,
4049
+ "asc": true,
4050
+ "nulls": "last"
4051
+ }
4052
+ ],
4053
+ "isUnique": false,
4054
+ "concurrently": false,
4055
+ "method": "btree",
4056
+ "with": {}
4057
+ },
4058
+ "agent_runs_agent_idx": {
4059
+ "name": "agent_runs_agent_idx",
4060
+ "columns": [
4061
+ {
4062
+ "expression": "agent_id",
4063
+ "isExpression": false,
4064
+ "asc": true,
4065
+ "nulls": "last"
4066
+ }
4067
+ ],
4068
+ "isUnique": false,
4069
+ "concurrently": false,
4070
+ "method": "btree",
4071
+ "with": {}
4072
+ }
4073
+ },
4074
+ "foreignKeys": {
4075
+ "agent_runs_workspace_id_workspaces_id_fk": {
4076
+ "name": "agent_runs_workspace_id_workspaces_id_fk",
4077
+ "tableFrom": "agent_runs",
4078
+ "tableTo": "workspaces",
4079
+ "columnsFrom": [
4080
+ "workspace_id"
4081
+ ],
4082
+ "columnsTo": [
4083
+ "id"
4084
+ ],
4085
+ "onDelete": "cascade",
4086
+ "onUpdate": "no action"
4087
+ },
4088
+ "agent_runs_agent_id_agent_registrations_id_fk": {
4089
+ "name": "agent_runs_agent_id_agent_registrations_id_fk",
4090
+ "tableFrom": "agent_runs",
4091
+ "tableTo": "agent_registrations",
4092
+ "columnsFrom": [
4093
+ "agent_id"
4094
+ ],
4095
+ "columnsTo": [
4096
+ "id"
4097
+ ],
4098
+ "onDelete": "cascade",
4099
+ "onUpdate": "no action"
4100
+ }
4101
+ },
4102
+ "compositePrimaryKeys": {},
4103
+ "uniqueConstraints": {},
4104
+ "policies": {},
4105
+ "checkConstraints": {
4106
+ "agent_runs_status_check": {
4107
+ "name": "agent_runs_status_check",
4108
+ "value": "\"agent_runs\".\"status\" in ('queued', 'running', 'succeeded', 'failed')"
4109
+ }
4110
+ },
4111
+ "isRLSEnabled": false
4112
+ },
4113
+ "public.webhook_deliveries": {
4114
+ "name": "webhook_deliveries",
4115
+ "schema": "",
4116
+ "columns": {
4117
+ "id": {
4118
+ "name": "id",
4119
+ "type": "text",
4120
+ "primaryKey": true,
4121
+ "notNull": true
4122
+ },
4123
+ "workspace_id": {
4124
+ "name": "workspace_id",
4125
+ "type": "text",
4126
+ "primaryKey": false,
4127
+ "notNull": true
4128
+ },
4129
+ "webhook_id": {
4130
+ "name": "webhook_id",
4131
+ "type": "text",
4132
+ "primaryKey": false,
4133
+ "notNull": true
4134
+ },
4135
+ "event": {
4136
+ "name": "event",
4137
+ "type": "text",
4138
+ "primaryKey": false,
4139
+ "notNull": true
4140
+ },
4141
+ "payload": {
4142
+ "name": "payload",
4143
+ "type": "jsonb",
4144
+ "primaryKey": false,
4145
+ "notNull": true
4146
+ },
4147
+ "status": {
4148
+ "name": "status",
4149
+ "type": "text",
4150
+ "primaryKey": false,
4151
+ "notNull": true
4152
+ },
4153
+ "attempts": {
4154
+ "name": "attempts",
4155
+ "type": "integer",
4156
+ "primaryKey": false,
4157
+ "notNull": true,
4158
+ "default": 0
4159
+ },
4160
+ "delivered_at": {
4161
+ "name": "delivered_at",
4162
+ "type": "timestamp with time zone",
4163
+ "primaryKey": false,
4164
+ "notNull": false
4165
+ },
4166
+ "created_at": {
4167
+ "name": "created_at",
4168
+ "type": "timestamp with time zone",
4169
+ "primaryKey": false,
4170
+ "notNull": true,
4171
+ "default": "now()"
4172
+ }
4173
+ },
4174
+ "indexes": {
4175
+ "webhook_deliveries_webhook_idx": {
4176
+ "name": "webhook_deliveries_webhook_idx",
4177
+ "columns": [
4178
+ {
4179
+ "expression": "webhook_id",
4180
+ "isExpression": false,
4181
+ "asc": true,
4182
+ "nulls": "last"
4183
+ }
4184
+ ],
4185
+ "isUnique": false,
4186
+ "concurrently": false,
4187
+ "method": "btree",
4188
+ "with": {}
4189
+ }
4190
+ },
4191
+ "foreignKeys": {
4192
+ "webhook_deliveries_workspace_id_workspaces_id_fk": {
4193
+ "name": "webhook_deliveries_workspace_id_workspaces_id_fk",
4194
+ "tableFrom": "webhook_deliveries",
4195
+ "tableTo": "workspaces",
4196
+ "columnsFrom": [
4197
+ "workspace_id"
4198
+ ],
4199
+ "columnsTo": [
4200
+ "id"
4201
+ ],
4202
+ "onDelete": "cascade",
4203
+ "onUpdate": "no action"
4204
+ },
4205
+ "webhook_deliveries_webhook_id_webhooks_id_fk": {
4206
+ "name": "webhook_deliveries_webhook_id_webhooks_id_fk",
4207
+ "tableFrom": "webhook_deliveries",
4208
+ "tableTo": "webhooks",
4209
+ "columnsFrom": [
4210
+ "webhook_id"
4211
+ ],
4212
+ "columnsTo": [
4213
+ "id"
4214
+ ],
4215
+ "onDelete": "cascade",
4216
+ "onUpdate": "no action"
4217
+ }
4218
+ },
4219
+ "compositePrimaryKeys": {},
4220
+ "uniqueConstraints": {},
4221
+ "policies": {},
4222
+ "checkConstraints": {
4223
+ "webhook_deliveries_status_check": {
4224
+ "name": "webhook_deliveries_status_check",
4225
+ "value": "\"webhook_deliveries\".\"status\" in ('success', 'failed')"
4226
+ }
4227
+ },
4228
+ "isRLSEnabled": false
4229
+ },
4230
+ "public.webhooks": {
4231
+ "name": "webhooks",
4232
+ "schema": "",
4233
+ "columns": {
4234
+ "id": {
4235
+ "name": "id",
4236
+ "type": "text",
4237
+ "primaryKey": true,
4238
+ "notNull": true
4239
+ },
4240
+ "workspace_id": {
4241
+ "name": "workspace_id",
4242
+ "type": "text",
4243
+ "primaryKey": false,
4244
+ "notNull": true
4245
+ },
4246
+ "url": {
4247
+ "name": "url",
4248
+ "type": "text",
4249
+ "primaryKey": false,
4250
+ "notNull": true
4251
+ },
4252
+ "events": {
4253
+ "name": "events",
4254
+ "type": "text[]",
4255
+ "primaryKey": false,
4256
+ "notNull": true,
4257
+ "default": "'{}'"
4258
+ },
4259
+ "secret_hash": {
4260
+ "name": "secret_hash",
4261
+ "type": "text",
4262
+ "primaryKey": false,
4263
+ "notNull": true
4264
+ },
4265
+ "secret_prefix": {
4266
+ "name": "secret_prefix",
4267
+ "type": "text",
4268
+ "primaryKey": false,
4269
+ "notNull": true
4270
+ },
4271
+ "status": {
4272
+ "name": "status",
4273
+ "type": "text",
4274
+ "primaryKey": false,
4275
+ "notNull": true,
4276
+ "default": "'active'"
4277
+ },
4278
+ "created_at": {
4279
+ "name": "created_at",
4280
+ "type": "timestamp with time zone",
4281
+ "primaryKey": false,
4282
+ "notNull": true,
4283
+ "default": "now()"
4284
+ },
4285
+ "updated_at": {
4286
+ "name": "updated_at",
4287
+ "type": "timestamp with time zone",
4288
+ "primaryKey": false,
4289
+ "notNull": true,
4290
+ "default": "now()"
4291
+ }
4292
+ },
4293
+ "indexes": {
4294
+ "webhooks_workspace_idx": {
4295
+ "name": "webhooks_workspace_idx",
4296
+ "columns": [
4297
+ {
4298
+ "expression": "workspace_id",
4299
+ "isExpression": false,
4300
+ "asc": true,
4301
+ "nulls": "last"
4302
+ }
4303
+ ],
4304
+ "isUnique": false,
4305
+ "concurrently": false,
4306
+ "method": "btree",
4307
+ "with": {}
4308
+ }
4309
+ },
4310
+ "foreignKeys": {
4311
+ "webhooks_workspace_id_workspaces_id_fk": {
4312
+ "name": "webhooks_workspace_id_workspaces_id_fk",
4313
+ "tableFrom": "webhooks",
4314
+ "tableTo": "workspaces",
4315
+ "columnsFrom": [
4316
+ "workspace_id"
4317
+ ],
4318
+ "columnsTo": [
4319
+ "id"
4320
+ ],
4321
+ "onDelete": "cascade",
4322
+ "onUpdate": "no action"
4323
+ }
4324
+ },
4325
+ "compositePrimaryKeys": {},
4326
+ "uniqueConstraints": {},
4327
+ "policies": {},
4328
+ "checkConstraints": {
4329
+ "webhooks_status_check": {
4330
+ "name": "webhooks_status_check",
4331
+ "value": "\"webhooks\".\"status\" in ('active', 'failing', 'paused')"
4332
+ }
4333
+ },
4334
+ "isRLSEnabled": false
4335
+ },
4336
+ "public.integration_connections": {
4337
+ "name": "integration_connections",
4338
+ "schema": "",
4339
+ "columns": {
4340
+ "id": {
4341
+ "name": "id",
4342
+ "type": "text",
4343
+ "primaryKey": true,
4344
+ "notNull": true
4345
+ },
4346
+ "workspace_id": {
4347
+ "name": "workspace_id",
4348
+ "type": "text",
4349
+ "primaryKey": false,
4350
+ "notNull": true
4351
+ },
4352
+ "provider_id": {
4353
+ "name": "provider_id",
4354
+ "type": "text",
4355
+ "primaryKey": false,
4356
+ "notNull": true
4357
+ },
4358
+ "user_id": {
4359
+ "name": "user_id",
4360
+ "type": "text",
4361
+ "primaryKey": false,
4362
+ "notNull": false
4363
+ },
4364
+ "status": {
4365
+ "name": "status",
4366
+ "type": "text",
4367
+ "primaryKey": false,
4368
+ "notNull": true
4369
+ },
4370
+ "config": {
4371
+ "name": "config",
4372
+ "type": "jsonb",
4373
+ "primaryKey": false,
4374
+ "notNull": true,
4375
+ "default": "'{}'::jsonb"
4376
+ },
4377
+ "secrets_encrypted": {
4378
+ "name": "secrets_encrypted",
4379
+ "type": "text",
4380
+ "primaryKey": false,
4381
+ "notNull": false
4382
+ },
4383
+ "last_sync_at": {
4384
+ "name": "last_sync_at",
4385
+ "type": "timestamp with time zone",
4386
+ "primaryKey": false,
4387
+ "notNull": false
4388
+ },
4389
+ "created_at": {
4390
+ "name": "created_at",
4391
+ "type": "timestamp with time zone",
4392
+ "primaryKey": false,
4393
+ "notNull": true,
4394
+ "default": "now()"
4395
+ },
4396
+ "updated_at": {
4397
+ "name": "updated_at",
4398
+ "type": "timestamp with time zone",
4399
+ "primaryKey": false,
4400
+ "notNull": true,
4401
+ "default": "now()"
4402
+ }
4403
+ },
4404
+ "indexes": {
4405
+ "integration_connections_workspace_idx": {
4406
+ "name": "integration_connections_workspace_idx",
4407
+ "columns": [
4408
+ {
4409
+ "expression": "workspace_id",
4410
+ "isExpression": false,
4411
+ "asc": true,
4412
+ "nulls": "last"
4413
+ }
4414
+ ],
4415
+ "isUnique": false,
4416
+ "concurrently": false,
4417
+ "method": "btree",
4418
+ "with": {}
4419
+ }
4420
+ },
4421
+ "foreignKeys": {
4422
+ "integration_connections_workspace_id_workspaces_id_fk": {
4423
+ "name": "integration_connections_workspace_id_workspaces_id_fk",
4424
+ "tableFrom": "integration_connections",
4425
+ "tableTo": "workspaces",
4426
+ "columnsFrom": [
4427
+ "workspace_id"
4428
+ ],
4429
+ "columnsTo": [
4430
+ "id"
4431
+ ],
4432
+ "onDelete": "cascade",
4433
+ "onUpdate": "no action"
4434
+ },
4435
+ "integration_connections_user_id_users_id_fk": {
4436
+ "name": "integration_connections_user_id_users_id_fk",
4437
+ "tableFrom": "integration_connections",
4438
+ "tableTo": "users",
4439
+ "columnsFrom": [
4440
+ "user_id"
4441
+ ],
4442
+ "columnsTo": [
4443
+ "id"
4444
+ ],
4445
+ "onDelete": "cascade",
4446
+ "onUpdate": "no action"
4447
+ }
4448
+ },
4449
+ "compositePrimaryKeys": {},
4450
+ "uniqueConstraints": {},
4451
+ "policies": {},
4452
+ "checkConstraints": {},
4453
+ "isRLSEnabled": false
4454
+ }
4455
+ },
4456
+ "enums": {},
4457
+ "schemas": {},
4458
+ "sequences": {},
4459
+ "roles": {},
4460
+ "policies": {},
4461
+ "views": {},
4462
+ "_meta": {
4463
+ "columns": {},
4464
+ "schemas": {},
4465
+ "tables": {}
4466
+ }
4467
+ }