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