@intelligo-dev/core 1.0.0-beta.1 → 1.0.0-beta.13

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 (355) hide show
  1. package/NOTICE +6 -0
  2. package/README.md +102 -0
  3. package/dist/attachments/errors.d.ts +7 -0
  4. package/dist/attachments/errors.d.ts.map +1 -0
  5. package/dist/attachments/errors.js +11 -0
  6. package/dist/attachments/errors.js.map +1 -0
  7. package/dist/attachments/index.d.ts +8 -0
  8. package/dist/attachments/index.d.ts.map +1 -0
  9. package/dist/attachments/index.js +7 -0
  10. package/dist/attachments/index.js.map +1 -0
  11. package/dist/attachments/service.d.ts +45 -0
  12. package/dist/attachments/service.d.ts.map +1 -0
  13. package/dist/attachments/service.js +100 -0
  14. package/dist/attachments/service.js.map +1 -0
  15. package/dist/attachments/types.d.ts +6 -0
  16. package/dist/attachments/types.d.ts.map +1 -0
  17. package/dist/attachments/types.js +2 -0
  18. package/dist/attachments/types.js.map +1 -0
  19. package/dist/conversations/errors.d.ts +2 -8
  20. package/dist/conversations/errors.d.ts.map +1 -1
  21. package/dist/conversations/errors.js +2 -8
  22. package/dist/conversations/errors.js.map +1 -1
  23. package/dist/conversations/index.d.ts +4 -12
  24. package/dist/conversations/index.d.ts.map +1 -1
  25. package/dist/conversations/index.js +2 -11
  26. package/dist/conversations/index.js.map +1 -1
  27. package/dist/conversations/service.d.ts +49 -61
  28. package/dist/conversations/service.d.ts.map +1 -1
  29. package/dist/conversations/service.js +110 -83
  30. package/dist/conversations/service.js.map +1 -1
  31. package/dist/conversations/types.d.ts +1 -4
  32. package/dist/conversations/types.d.ts.map +1 -1
  33. package/dist/conversations/types.js +0 -3
  34. package/dist/conversations/types.js.map +1 -1
  35. package/dist/db/client.d.ts +21 -10
  36. package/dist/db/client.d.ts.map +1 -1
  37. package/dist/db/client.js +43 -18
  38. package/dist/db/client.js.map +1 -1
  39. package/dist/db/index.d.ts +3 -3
  40. package/dist/db/index.d.ts.map +1 -1
  41. package/dist/db/index.js +3 -7
  42. package/dist/db/index.js.map +1 -1
  43. package/dist/db/schema/agents.d.ts +14 -51
  44. package/dist/db/schema/agents.d.ts.map +1 -1
  45. package/dist/db/schema/agents.js +9 -21
  46. package/dist/db/schema/agents.js.map +1 -1
  47. package/dist/db/schema/ai.d.ts +86 -1556
  48. package/dist/db/schema/ai.d.ts.map +1 -1
  49. package/dist/db/schema/ai.js +32 -236
  50. package/dist/db/schema/ai.js.map +1 -1
  51. package/dist/db/schema/auth.d.ts +5 -34
  52. package/dist/db/schema/auth.d.ts.map +1 -1
  53. package/dist/db/schema/auth.js +25 -56
  54. package/dist/db/schema/auth.js.map +1 -1
  55. package/dist/db/schema/billing.d.ts +136 -107
  56. package/dist/db/schema/billing.d.ts.map +1 -1
  57. package/dist/db/schema/billing.js +72 -60
  58. package/dist/db/schema/billing.js.map +1 -1
  59. package/dist/db/schema/feature-flags.d.ts +3 -12
  60. package/dist/db/schema/feature-flags.d.ts.map +1 -1
  61. package/dist/db/schema/feature-flags.js +3 -12
  62. package/dist/db/schema/feature-flags.js.map +1 -1
  63. package/dist/db/schema/identity.d.ts +12 -274
  64. package/dist/db/schema/identity.d.ts.map +1 -1
  65. package/dist/db/schema/identity.js +19 -104
  66. package/dist/db/schema/identity.js.map +1 -1
  67. package/dist/db/schema/index.d.ts +8 -15
  68. package/dist/db/schema/index.d.ts.map +1 -1
  69. package/dist/db/schema/index.js +12 -42
  70. package/dist/db/schema/index.js.map +1 -1
  71. package/dist/db/schema/notifications.d.ts +3 -17
  72. package/dist/db/schema/notifications.d.ts.map +1 -1
  73. package/dist/db/schema/notifications.js +3 -17
  74. package/dist/db/schema/notifications.js.map +1 -1
  75. package/dist/db/schema/usage.d.ts +94 -77
  76. package/dist/db/schema/usage.d.ts.map +1 -1
  77. package/dist/db/schema/usage.js +59 -89
  78. package/dist/db/schema/usage.js.map +1 -1
  79. package/dist/db/validate.d.ts +2 -11
  80. package/dist/db/validate.d.ts.map +1 -1
  81. package/dist/db/validate.js +6 -17
  82. package/dist/db/validate.js.map +1 -1
  83. package/dist/db/workspace-queries.d.ts +5 -29
  84. package/dist/db/workspace-queries.d.ts.map +1 -1
  85. package/dist/db/workspace-queries.js +5 -29
  86. package/dist/db/workspace-queries.js.map +1 -1
  87. package/dist/documents/classifier.d.ts +5 -12
  88. package/dist/documents/classifier.d.ts.map +1 -1
  89. package/dist/documents/classifier.js +16 -16
  90. package/dist/documents/classifier.js.map +1 -1
  91. package/dist/documents/errors.d.ts +2 -10
  92. package/dist/documents/errors.d.ts.map +1 -1
  93. package/dist/documents/errors.js +2 -10
  94. package/dist/documents/errors.js.map +1 -1
  95. package/dist/documents/index.d.ts +4 -13
  96. package/dist/documents/index.d.ts.map +1 -1
  97. package/dist/documents/index.js +3 -12
  98. package/dist/documents/index.js.map +1 -1
  99. package/dist/documents/service.d.ts +19 -26
  100. package/dist/documents/service.d.ts.map +1 -1
  101. package/dist/documents/service.js +44 -38
  102. package/dist/documents/service.js.map +1 -1
  103. package/dist/documents/types.d.ts +6 -10
  104. package/dist/documents/types.d.ts.map +1 -1
  105. package/dist/documents/types.js +0 -3
  106. package/dist/documents/types.js.map +1 -1
  107. package/dist/email/brand.d.ts +17 -0
  108. package/dist/email/brand.d.ts.map +1 -0
  109. package/dist/email/brand.js +9 -0
  110. package/dist/email/brand.js.map +1 -0
  111. package/dist/email/index.d.ts +4 -4
  112. package/dist/email/index.js +4 -4
  113. package/dist/email/provider.d.ts +1 -7
  114. package/dist/email/provider.d.ts.map +1 -1
  115. package/dist/email/provider.js +10 -19
  116. package/dist/email/provider.js.map +1 -1
  117. package/dist/email/send.d.ts +12 -12
  118. package/dist/email/send.d.ts.map +1 -1
  119. package/dist/email/send.js +5 -19
  120. package/dist/email/send.js.map +1 -1
  121. package/dist/email/senders.d.ts +17 -30
  122. package/dist/email/senders.d.ts.map +1 -1
  123. package/dist/email/senders.js +33 -47
  124. package/dist/email/senders.js.map +1 -1
  125. package/dist/email/templates/base-layout.d.ts +1 -1
  126. package/dist/email/templates/base-layout.d.ts.map +1 -1
  127. package/dist/email/templates/base-layout.js +4 -6
  128. package/dist/email/templates/base-layout.js.map +1 -1
  129. package/dist/email/templates/index.d.ts +10 -10
  130. package/dist/email/templates/index.d.ts.map +1 -1
  131. package/dist/email/templates/index.js +10 -16
  132. package/dist/email/templates/index.js.map +1 -1
  133. package/dist/email/templates/password-reset.d.ts +2 -2
  134. package/dist/email/templates/password-reset.d.ts.map +1 -1
  135. package/dist/email/templates/password-reset.js +10 -22
  136. package/dist/email/templates/password-reset.js.map +1 -1
  137. package/dist/email/templates/payment-failed.d.ts +2 -2
  138. package/dist/email/templates/payment-failed.d.ts.map +1 -1
  139. package/dist/email/templates/payment-failed.js +11 -24
  140. package/dist/email/templates/payment-failed.js.map +1 -1
  141. package/dist/email/templates/quota-warning.d.ts +4 -4
  142. package/dist/email/templates/quota-warning.d.ts.map +1 -1
  143. package/dist/email/templates/quota-warning.js +19 -39
  144. package/dist/email/templates/quota-warning.js.map +1 -1
  145. package/dist/email/templates/subscription-confirmed.d.ts +2 -2
  146. package/dist/email/templates/subscription-confirmed.d.ts.map +1 -1
  147. package/dist/email/templates/subscription-confirmed.js +13 -28
  148. package/dist/email/templates/subscription-confirmed.js.map +1 -1
  149. package/dist/email/templates/trial-expiry.d.ts +2 -2
  150. package/dist/email/templates/trial-expiry.d.ts.map +1 -1
  151. package/dist/email/templates/trial-expiry.js +12 -36
  152. package/dist/email/templates/trial-expiry.js.map +1 -1
  153. package/dist/email/templates/trial-warning.d.ts +2 -2
  154. package/dist/email/templates/trial-warning.d.ts.map +1 -1
  155. package/dist/email/templates/trial-warning.js +15 -32
  156. package/dist/email/templates/trial-warning.js.map +1 -1
  157. package/dist/email/templates/verify-email.d.ts +2 -2
  158. package/dist/email/templates/verify-email.d.ts.map +1 -1
  159. package/dist/email/templates/verify-email.js +10 -22
  160. package/dist/email/templates/verify-email.js.map +1 -1
  161. package/dist/email/templates/welcome.d.ts +2 -2
  162. package/dist/email/templates/welcome.d.ts.map +1 -1
  163. package/dist/email/templates/welcome.js +13 -20
  164. package/dist/email/templates/welcome.js.map +1 -1
  165. package/dist/email/templates/workspace-invitation.d.ts +2 -2
  166. package/dist/email/templates/workspace-invitation.d.ts.map +1 -1
  167. package/dist/email/templates/workspace-invitation.js +12 -26
  168. package/dist/email/templates/workspace-invitation.js.map +1 -1
  169. package/dist/env.d.ts +5 -10
  170. package/dist/env.d.ts.map +1 -1
  171. package/dist/env.js +41 -31
  172. package/dist/env.js.map +1 -1
  173. package/dist/identity/audit.d.ts +11 -24
  174. package/dist/identity/audit.d.ts.map +1 -1
  175. package/dist/identity/audit.js +13 -27
  176. package/dist/identity/audit.js.map +1 -1
  177. package/dist/identity/errors.d.ts +4 -12
  178. package/dist/identity/errors.d.ts.map +1 -1
  179. package/dist/identity/errors.js +2 -8
  180. package/dist/identity/errors.js.map +1 -1
  181. package/dist/identity/index.d.ts +5 -13
  182. package/dist/identity/index.d.ts.map +1 -1
  183. package/dist/identity/index.js +4 -12
  184. package/dist/identity/index.js.map +1 -1
  185. package/dist/identity/service.d.ts +13 -47
  186. package/dist/identity/service.d.ts.map +1 -1
  187. package/dist/identity/service.js +31 -78
  188. package/dist/identity/service.js.map +1 -1
  189. package/dist/identity/types.d.ts +1 -4
  190. package/dist/identity/types.d.ts.map +1 -1
  191. package/dist/identity/types.js +0 -3
  192. package/dist/identity/types.js.map +1 -1
  193. package/dist/index.d.ts +1 -2
  194. package/dist/index.d.ts.map +1 -1
  195. package/dist/index.js +3 -10
  196. package/dist/index.js.map +1 -1
  197. package/dist/logger.d.ts +7 -18
  198. package/dist/logger.d.ts.map +1 -1
  199. package/dist/logger.js +45 -49
  200. package/dist/logger.js.map +1 -1
  201. package/dist/money.d.ts +95 -0
  202. package/dist/money.d.ts.map +1 -0
  203. package/dist/money.js +208 -0
  204. package/dist/money.js.map +1 -0
  205. package/dist/notifications/index.d.ts +9 -43
  206. package/dist/notifications/index.d.ts.map +1 -1
  207. package/dist/notifications/index.js +9 -49
  208. package/dist/notifications/index.js.map +1 -1
  209. package/dist/notifications/triggers.d.ts +9 -32
  210. package/dist/notifications/triggers.d.ts.map +1 -1
  211. package/dist/notifications/triggers.js +21 -58
  212. package/dist/notifications/triggers.js.map +1 -1
  213. package/dist/notifications/types.d.ts +1 -10
  214. package/dist/notifications/types.d.ts.map +1 -1
  215. package/dist/notifications/types.js +0 -9
  216. package/dist/notifications/types.js.map +1 -1
  217. package/dist/prompt.d.ts +38 -0
  218. package/dist/prompt.d.ts.map +1 -0
  219. package/dist/prompt.js +118 -0
  220. package/dist/prompt.js.map +1 -0
  221. package/dist/registry.d.ts +32 -0
  222. package/dist/registry.d.ts.map +1 -0
  223. package/dist/registry.js +60 -0
  224. package/dist/registry.js.map +1 -0
  225. package/dist/request-context.d.ts +49 -0
  226. package/dist/request-context.d.ts.map +1 -0
  227. package/dist/request-context.js +100 -0
  228. package/dist/request-context.js.map +1 -0
  229. package/dist/storage/index.d.ts +65 -0
  230. package/dist/storage/index.d.ts.map +1 -0
  231. package/dist/storage/index.js +109 -0
  232. package/dist/storage/index.js.map +1 -0
  233. package/package.json +74 -24
  234. package/src/attachments/errors.ts +18 -0
  235. package/src/attachments/index.ts +22 -0
  236. package/src/attachments/service.ts +178 -0
  237. package/src/attachments/types.ts +6 -0
  238. package/src/conversations/errors.ts +45 -0
  239. package/src/conversations/index.ts +39 -0
  240. package/src/conversations/service.ts +594 -0
  241. package/src/conversations/types.ts +15 -0
  242. package/src/db/client.ts +91 -0
  243. package/src/db/index.ts +3 -0
  244. package/src/db/migrations/0000_baseline.sql +652 -0
  245. package/src/db/migrations/0001_reconcile_chain_built_databases.sql +53 -0
  246. package/src/db/migrations/0002_webhook_claim_lease.sql +1 -0
  247. package/src/db/migrations/README.md +74 -36
  248. package/src/db/migrations/legacy-chain.json +197 -0
  249. package/src/db/migrations/meta/0000_snapshot.json +4182 -157
  250. package/src/db/migrations/meta/0002_snapshot.json +2478 -368
  251. package/src/db/migrations/meta/_journal.json +6 -279
  252. package/src/db/schema/agents.ts +57 -0
  253. package/src/db/schema/ai.ts +174 -0
  254. package/src/db/schema/auth.ts +183 -0
  255. package/src/db/schema/billing.ts +209 -0
  256. package/src/db/schema/feature-flags.ts +20 -0
  257. package/src/db/schema/identity.ts +250 -0
  258. package/src/db/schema/index.ts +12 -0
  259. package/src/db/schema/notifications.ts +31 -0
  260. package/src/db/schema/usage.ts +269 -0
  261. package/src/db/validate.ts +63 -0
  262. package/src/db/workspace-queries.ts +64 -0
  263. package/src/documents/classifier.ts +61 -0
  264. package/src/documents/errors.ts +44 -0
  265. package/src/documents/index.ts +24 -0
  266. package/src/documents/service.ts +256 -0
  267. package/src/documents/types.ts +24 -0
  268. package/src/email/brand.ts +24 -0
  269. package/src/email/index.ts +19 -0
  270. package/src/email/provider.ts +278 -0
  271. package/src/email/send.ts +169 -0
  272. package/src/email/senders.ts +292 -0
  273. package/src/email/templates/base-layout.tsx +145 -0
  274. package/src/email/templates/index.ts +28 -0
  275. package/src/email/templates/password-reset.tsx +72 -0
  276. package/src/email/templates/payment-failed.tsx +77 -0
  277. package/src/email/templates/quota-warning.tsx +118 -0
  278. package/src/email/templates/subscription-confirmed.tsx +91 -0
  279. package/src/email/templates/trial-expiry.tsx +124 -0
  280. package/src/email/templates/trial-warning.tsx +104 -0
  281. package/src/email/templates/verify-email.tsx +72 -0
  282. package/src/email/templates/welcome.tsx +64 -0
  283. package/src/email/templates/workspace-invitation.tsx +105 -0
  284. package/src/env.ts +180 -0
  285. package/src/identity/audit.ts +65 -0
  286. package/src/identity/errors.ts +44 -0
  287. package/src/identity/index.ts +26 -0
  288. package/src/identity/service.ts +202 -0
  289. package/src/identity/types.ts +28 -0
  290. package/src/index.ts +4 -0
  291. package/src/logger.ts +198 -0
  292. package/src/money.ts +270 -0
  293. package/src/notifications/index.ts +108 -0
  294. package/src/notifications/triggers.ts +158 -0
  295. package/src/notifications/types.ts +18 -0
  296. package/src/prompt.ts +142 -0
  297. package/src/registry.ts +75 -0
  298. package/src/request-context.ts +137 -0
  299. package/src/storage/index.ts +153 -0
  300. package/dist/db/schema/rag.d.ts +0 -171
  301. package/dist/db/schema/rag.d.ts.map +0 -1
  302. package/dist/db/schema/rag.js +0 -42
  303. package/dist/db/schema/rag.js.map +0 -1
  304. package/src/db/migrations/0000_sharp_night_nurse.sql +0 -52
  305. package/src/db/migrations/0001_hesitant_vapor.sql +0 -40
  306. package/src/db/migrations/0002_numerous_lady_vermin.sql +0 -235
  307. package/src/db/migrations/0003_mighty_jean_grey.sql +0 -37
  308. package/src/db/migrations/0004_cynical_grandmaster.sql +0 -2
  309. package/src/db/migrations/0005_careful_switch.sql +0 -8
  310. package/src/db/migrations/0006_tense_blue_marvel.sql +0 -16
  311. package/src/db/migrations/0007_next_squadron_sinister.sql +0 -1
  312. package/src/db/migrations/0008_powerful_scream.sql +0 -39
  313. package/src/db/migrations/0009_sad_ink.sql +0 -1
  314. package/src/db/migrations/0010_shocking_omega_flight.sql +0 -2
  315. package/src/db/migrations/0011_ambiguous_otto_octavius.sql +0 -151
  316. package/src/db/migrations/0011_hnsw_vector_index.sql +0 -17
  317. package/src/db/migrations/0012_user_profiles.sql +0 -30
  318. package/src/db/migrations/0013_trending_seasonal_columns.sql +0 -9
  319. package/src/db/migrations/0014_add_product_type_to_agents.sql +0 -6
  320. package/src/db/migrations/0015_new_v1_tables.sql +0 -149
  321. package/src/db/migrations/0016_document_types.sql +0 -30
  322. package/src/db/migrations/0017_document_metadata.sql +0 -2
  323. package/src/db/migrations/0018_identity_graph.sql +0 -200
  324. package/src/db/migrations/0019_db_driven_prompts.sql +0 -20
  325. package/src/db/migrations/0020_pending_extractions.sql +0 -35
  326. package/src/db/migrations/0021_rag_documents.sql +0 -39
  327. package/src/db/migrations/0022_user_quotas_usage_jsonb.sql +0 -70
  328. package/src/db/migrations/0023_user_facts_user_scoped_unique.sql +0 -17
  329. package/src/db/migrations/0024_user_memories_hnsw.sql +0 -23
  330. package/src/db/migrations/0025_audit_trigger_errcode.sql +0 -21
  331. package/src/db/migrations/0026_user_profile_snapshots_composite_pk.sql +0 -17
  332. package/src/db/migrations/0027_billing_settings_mnt_columns.sql +0 -54
  333. package/src/db/migrations/0028_trial_credits_normalized_email.sql +0 -37
  334. package/src/db/migrations/0029_usage_records_conversation_idx.sql +0 -13
  335. package/src/db/migrations/0030_pending_extractions_composite_idx.sql +0 -11
  336. package/src/db/migrations/0031_rag_documents_hnsw.sql +0 -16
  337. package/src/db/migrations/0032_rate_limit_unique_idx.sql +0 -16
  338. package/src/db/migrations/0033_pending_extractions_partial_idx.sql +0 -18
  339. package/src/db/migrations/0034_rate_limit_count.sql +0 -9
  340. package/src/db/migrations/0035_credit_reservations.sql +0 -24
  341. package/src/db/migrations/0036_executions_audit_jobs.sql +0 -96
  342. package/src/db/migrations/0037_rate_limit_minute_bucket.sql +0 -46
  343. package/src/db/migrations/0038_user_quotas_generic_usage.sql +0 -25
  344. package/src/db/migrations/0039_platform_admin_impersonation.sql +0 -27
  345. package/src/db/migrations/0040_ee_audit_chain.sql +0 -23
  346. package/src/db/migrations/meta/0001_snapshot.json +0 -631
  347. package/src/db/migrations/meta/0003_snapshot.json +0 -2488
  348. package/src/db/migrations/meta/0004_snapshot.json +0 -2500
  349. package/src/db/migrations/meta/0005_snapshot.json +0 -2548
  350. package/src/db/migrations/meta/0006_snapshot.json +0 -2650
  351. package/src/db/migrations/meta/0007_snapshot.json +0 -2657
  352. package/src/db/migrations/meta/0008_snapshot.json +0 -2719
  353. package/src/db/migrations/meta/0009_snapshot.json +0 -2726
  354. package/src/db/migrations/meta/0010_snapshot.json +0 -2739
  355. package/src/db/migrations/meta/0011_snapshot.json +0 -3886
@@ -1,2739 +0,0 @@
1
- {
2
- "id": "0dce166e-3eb7-4072-a10b-e37ad6a4900f",
3
- "prevId": "6baea64b-314f-4358-930c-7c67d79329cb",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.agents": {
8
- "name": "agents",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "text",
14
- "primaryKey": true,
15
- "notNull": true
16
- },
17
- "name": {
18
- "name": "name",
19
- "type": "jsonb",
20
- "primaryKey": false,
21
- "notNull": true
22
- },
23
- "description": {
24
- "name": "description",
25
- "type": "jsonb",
26
- "primaryKey": false,
27
- "notNull": true
28
- },
29
- "system_prompt_key": {
30
- "name": "system_prompt_key",
31
- "type": "text",
32
- "primaryKey": false,
33
- "notNull": true
34
- },
35
- "icon": {
36
- "name": "icon",
37
- "type": "text",
38
- "primaryKey": false,
39
- "notNull": true
40
- },
41
- "default_model": {
42
- "name": "default_model",
43
- "type": "text",
44
- "primaryKey": false,
45
- "notNull": true
46
- },
47
- "max_steps": {
48
- "name": "max_steps",
49
- "type": "integer",
50
- "primaryKey": false,
51
- "notNull": true
52
- },
53
- "context_window_size": {
54
- "name": "context_window_size",
55
- "type": "integer",
56
- "primaryKey": false,
57
- "notNull": true
58
- },
59
- "tools": {
60
- "name": "tools",
61
- "type": "jsonb",
62
- "primaryKey": false,
63
- "notNull": true,
64
- "default": "'[]'::jsonb"
65
- },
66
- "base_path": {
67
- "name": "base_path",
68
- "type": "text",
69
- "primaryKey": false,
70
- "notNull": true
71
- },
72
- "is_active": {
73
- "name": "is_active",
74
- "type": "boolean",
75
- "primaryKey": false,
76
- "notNull": true,
77
- "default": true
78
- },
79
- "suggestions": {
80
- "name": "suggestions",
81
- "type": "jsonb",
82
- "primaryKey": false,
83
- "notNull": true,
84
- "default": "'[]'::jsonb"
85
- },
86
- "is_system": {
87
- "name": "is_system",
88
- "type": "boolean",
89
- "primaryKey": false,
90
- "notNull": true,
91
- "default": true
92
- },
93
- "feature_key": {
94
- "name": "feature_key",
95
- "type": "text",
96
- "primaryKey": false,
97
- "notNull": false
98
- },
99
- "color": {
100
- "name": "color",
101
- "type": "text",
102
- "primaryKey": false,
103
- "notNull": true,
104
- "default": "'bg-gray-500'"
105
- },
106
- "created_at": {
107
- "name": "created_at",
108
- "type": "timestamp",
109
- "primaryKey": false,
110
- "notNull": true,
111
- "default": "now()"
112
- },
113
- "updated_at": {
114
- "name": "updated_at",
115
- "type": "timestamp",
116
- "primaryKey": false,
117
- "notNull": true,
118
- "default": "now()"
119
- }
120
- },
121
- "indexes": {},
122
- "foreignKeys": {},
123
- "compositePrimaryKeys": {},
124
- "uniqueConstraints": {},
125
- "policies": {},
126
- "checkConstraints": {},
127
- "isRLSEnabled": false
128
- },
129
- "public.conversations": {
130
- "name": "conversations",
131
- "schema": "",
132
- "columns": {
133
- "id": {
134
- "name": "id",
135
- "type": "text",
136
- "primaryKey": true,
137
- "notNull": true
138
- },
139
- "workspace_id": {
140
- "name": "workspace_id",
141
- "type": "text",
142
- "primaryKey": false,
143
- "notNull": true
144
- },
145
- "user_id": {
146
- "name": "user_id",
147
- "type": "text",
148
- "primaryKey": false,
149
- "notNull": true
150
- },
151
- "agent_id": {
152
- "name": "agent_id",
153
- "type": "text",
154
- "primaryKey": false,
155
- "notNull": true
156
- },
157
- "title": {
158
- "name": "title",
159
- "type": "text",
160
- "primaryKey": false,
161
- "notNull": false
162
- },
163
- "model_id": {
164
- "name": "model_id",
165
- "type": "text",
166
- "primaryKey": false,
167
- "notNull": false
168
- },
169
- "visibility": {
170
- "name": "visibility",
171
- "type": "text",
172
- "primaryKey": false,
173
- "notNull": true,
174
- "default": "'private'"
175
- },
176
- "metadata": {
177
- "name": "metadata",
178
- "type": "text",
179
- "primaryKey": false,
180
- "notNull": false
181
- },
182
- "created_at": {
183
- "name": "created_at",
184
- "type": "timestamp",
185
- "primaryKey": false,
186
- "notNull": true,
187
- "default": "now()"
188
- },
189
- "updated_at": {
190
- "name": "updated_at",
191
- "type": "timestamp",
192
- "primaryKey": false,
193
- "notNull": true,
194
- "default": "now()"
195
- }
196
- },
197
- "indexes": {
198
- "conversations_workspace_id_idx": {
199
- "name": "conversations_workspace_id_idx",
200
- "columns": [
201
- {
202
- "expression": "workspace_id",
203
- "isExpression": false,
204
- "asc": true,
205
- "nulls": "last"
206
- }
207
- ],
208
- "isUnique": false,
209
- "concurrently": false,
210
- "method": "btree",
211
- "with": {}
212
- },
213
- "conversations_user_id_idx": {
214
- "name": "conversations_user_id_idx",
215
- "columns": [
216
- {
217
- "expression": "user_id",
218
- "isExpression": false,
219
- "asc": true,
220
- "nulls": "last"
221
- }
222
- ],
223
- "isUnique": false,
224
- "concurrently": false,
225
- "method": "btree",
226
- "with": {}
227
- },
228
- "conversations_workspace_updated_idx": {
229
- "name": "conversations_workspace_updated_idx",
230
- "columns": [
231
- {
232
- "expression": "workspace_id",
233
- "isExpression": false,
234
- "asc": true,
235
- "nulls": "last"
236
- },
237
- {
238
- "expression": "updated_at",
239
- "isExpression": false,
240
- "asc": true,
241
- "nulls": "last"
242
- }
243
- ],
244
- "isUnique": false,
245
- "concurrently": false,
246
- "method": "btree",
247
- "with": {}
248
- }
249
- },
250
- "foreignKeys": {
251
- "conversations_workspace_id_organization_id_fk": {
252
- "name": "conversations_workspace_id_organization_id_fk",
253
- "tableFrom": "conversations",
254
- "tableTo": "organization",
255
- "columnsFrom": ["workspace_id"],
256
- "columnsTo": ["id"],
257
- "onDelete": "cascade",
258
- "onUpdate": "no action"
259
- },
260
- "conversations_user_id_users_id_fk": {
261
- "name": "conversations_user_id_users_id_fk",
262
- "tableFrom": "conversations",
263
- "tableTo": "users",
264
- "columnsFrom": ["user_id"],
265
- "columnsTo": ["id"],
266
- "onDelete": "cascade",
267
- "onUpdate": "no action"
268
- }
269
- },
270
- "compositePrimaryKeys": {},
271
- "uniqueConstraints": {},
272
- "policies": {},
273
- "checkConstraints": {},
274
- "isRLSEnabled": false
275
- },
276
- "public.documents": {
277
- "name": "documents",
278
- "schema": "",
279
- "columns": {
280
- "id": {
281
- "name": "id",
282
- "type": "text",
283
- "primaryKey": false,
284
- "notNull": true
285
- },
286
- "created_at": {
287
- "name": "created_at",
288
- "type": "timestamp",
289
- "primaryKey": false,
290
- "notNull": true,
291
- "default": "now()"
292
- },
293
- "title": {
294
- "name": "title",
295
- "type": "text",
296
- "primaryKey": false,
297
- "notNull": true
298
- },
299
- "content": {
300
- "name": "content",
301
- "type": "text",
302
- "primaryKey": false,
303
- "notNull": false
304
- },
305
- "kind": {
306
- "name": "kind",
307
- "type": "text",
308
- "primaryKey": false,
309
- "notNull": true,
310
- "default": "'text'"
311
- },
312
- "user_id": {
313
- "name": "user_id",
314
- "type": "text",
315
- "primaryKey": false,
316
- "notNull": true
317
- },
318
- "workspace_id": {
319
- "name": "workspace_id",
320
- "type": "text",
321
- "primaryKey": false,
322
- "notNull": true
323
- }
324
- },
325
- "indexes": {
326
- "documents_workspace_id_idx": {
327
- "name": "documents_workspace_id_idx",
328
- "columns": [
329
- {
330
- "expression": "workspace_id",
331
- "isExpression": false,
332
- "asc": true,
333
- "nulls": "last"
334
- }
335
- ],
336
- "isUnique": false,
337
- "concurrently": false,
338
- "method": "btree",
339
- "with": {}
340
- }
341
- },
342
- "foreignKeys": {
343
- "documents_user_id_users_id_fk": {
344
- "name": "documents_user_id_users_id_fk",
345
- "tableFrom": "documents",
346
- "tableTo": "users",
347
- "columnsFrom": ["user_id"],
348
- "columnsTo": ["id"],
349
- "onDelete": "cascade",
350
- "onUpdate": "no action"
351
- },
352
- "documents_workspace_id_organization_id_fk": {
353
- "name": "documents_workspace_id_organization_id_fk",
354
- "tableFrom": "documents",
355
- "tableTo": "organization",
356
- "columnsFrom": ["workspace_id"],
357
- "columnsTo": ["id"],
358
- "onDelete": "cascade",
359
- "onUpdate": "no action"
360
- }
361
- },
362
- "compositePrimaryKeys": {
363
- "documents_id_created_at_pk": {
364
- "name": "documents_id_created_at_pk",
365
- "columns": ["id", "created_at"]
366
- }
367
- },
368
- "uniqueConstraints": {},
369
- "policies": {},
370
- "checkConstraints": {},
371
- "isRLSEnabled": false
372
- },
373
- "public.knowledge_chunks": {
374
- "name": "knowledge_chunks",
375
- "schema": "",
376
- "columns": {
377
- "id": {
378
- "name": "id",
379
- "type": "text",
380
- "primaryKey": true,
381
- "notNull": true
382
- },
383
- "document_id": {
384
- "name": "document_id",
385
- "type": "text",
386
- "primaryKey": false,
387
- "notNull": true
388
- },
389
- "workspace_id": {
390
- "name": "workspace_id",
391
- "type": "text",
392
- "primaryKey": false,
393
- "notNull": true
394
- },
395
- "content": {
396
- "name": "content",
397
- "type": "text",
398
- "primaryKey": false,
399
- "notNull": true
400
- },
401
- "embedding": {
402
- "name": "embedding",
403
- "type": "vector(1536)",
404
- "primaryKey": false,
405
- "notNull": false
406
- },
407
- "metadata": {
408
- "name": "metadata",
409
- "type": "text",
410
- "primaryKey": false,
411
- "notNull": false
412
- },
413
- "chunk_index": {
414
- "name": "chunk_index",
415
- "type": "integer",
416
- "primaryKey": false,
417
- "notNull": true
418
- },
419
- "created_at": {
420
- "name": "created_at",
421
- "type": "timestamp",
422
- "primaryKey": false,
423
- "notNull": true,
424
- "default": "now()"
425
- }
426
- },
427
- "indexes": {
428
- "knowledge_chunks_document_id_idx": {
429
- "name": "knowledge_chunks_document_id_idx",
430
- "columns": [
431
- {
432
- "expression": "document_id",
433
- "isExpression": false,
434
- "asc": true,
435
- "nulls": "last"
436
- }
437
- ],
438
- "isUnique": false,
439
- "concurrently": false,
440
- "method": "btree",
441
- "with": {}
442
- },
443
- "knowledge_chunks_workspace_id_idx": {
444
- "name": "knowledge_chunks_workspace_id_idx",
445
- "columns": [
446
- {
447
- "expression": "workspace_id",
448
- "isExpression": false,
449
- "asc": true,
450
- "nulls": "last"
451
- }
452
- ],
453
- "isUnique": false,
454
- "concurrently": false,
455
- "method": "btree",
456
- "with": {}
457
- }
458
- },
459
- "foreignKeys": {
460
- "knowledge_chunks_document_id_knowledge_documents_id_fk": {
461
- "name": "knowledge_chunks_document_id_knowledge_documents_id_fk",
462
- "tableFrom": "knowledge_chunks",
463
- "tableTo": "knowledge_documents",
464
- "columnsFrom": ["document_id"],
465
- "columnsTo": ["id"],
466
- "onDelete": "cascade",
467
- "onUpdate": "no action"
468
- },
469
- "knowledge_chunks_workspace_id_organization_id_fk": {
470
- "name": "knowledge_chunks_workspace_id_organization_id_fk",
471
- "tableFrom": "knowledge_chunks",
472
- "tableTo": "organization",
473
- "columnsFrom": ["workspace_id"],
474
- "columnsTo": ["id"],
475
- "onDelete": "cascade",
476
- "onUpdate": "no action"
477
- }
478
- },
479
- "compositePrimaryKeys": {},
480
- "uniqueConstraints": {},
481
- "policies": {},
482
- "checkConstraints": {},
483
- "isRLSEnabled": false
484
- },
485
- "public.knowledge_documents": {
486
- "name": "knowledge_documents",
487
- "schema": "",
488
- "columns": {
489
- "id": {
490
- "name": "id",
491
- "type": "text",
492
- "primaryKey": true,
493
- "notNull": true
494
- },
495
- "workspace_id": {
496
- "name": "workspace_id",
497
- "type": "text",
498
- "primaryKey": false,
499
- "notNull": true
500
- },
501
- "filename": {
502
- "name": "filename",
503
- "type": "text",
504
- "primaryKey": false,
505
- "notNull": true
506
- },
507
- "mime_type": {
508
- "name": "mime_type",
509
- "type": "text",
510
- "primaryKey": false,
511
- "notNull": true
512
- },
513
- "size_bytes": {
514
- "name": "size_bytes",
515
- "type": "integer",
516
- "primaryKey": false,
517
- "notNull": false
518
- },
519
- "chunk_count": {
520
- "name": "chunk_count",
521
- "type": "integer",
522
- "primaryKey": false,
523
- "notNull": false,
524
- "default": 0
525
- },
526
- "status": {
527
- "name": "status",
528
- "type": "text",
529
- "primaryKey": false,
530
- "notNull": true,
531
- "default": "'processing'"
532
- },
533
- "product": {
534
- "name": "product",
535
- "type": "text",
536
- "primaryKey": false,
537
- "notNull": false
538
- },
539
- "metadata": {
540
- "name": "metadata",
541
- "type": "text",
542
- "primaryKey": false,
543
- "notNull": false
544
- },
545
- "created_at": {
546
- "name": "created_at",
547
- "type": "timestamp",
548
- "primaryKey": false,
549
- "notNull": true,
550
- "default": "now()"
551
- }
552
- },
553
- "indexes": {
554
- "knowledge_documents_workspace_id_idx": {
555
- "name": "knowledge_documents_workspace_id_idx",
556
- "columns": [
557
- {
558
- "expression": "workspace_id",
559
- "isExpression": false,
560
- "asc": true,
561
- "nulls": "last"
562
- }
563
- ],
564
- "isUnique": false,
565
- "concurrently": false,
566
- "method": "btree",
567
- "with": {}
568
- }
569
- },
570
- "foreignKeys": {
571
- "knowledge_documents_workspace_id_organization_id_fk": {
572
- "name": "knowledge_documents_workspace_id_organization_id_fk",
573
- "tableFrom": "knowledge_documents",
574
- "tableTo": "organization",
575
- "columnsFrom": ["workspace_id"],
576
- "columnsTo": ["id"],
577
- "onDelete": "cascade",
578
- "onUpdate": "no action"
579
- }
580
- },
581
- "compositePrimaryKeys": {},
582
- "uniqueConstraints": {},
583
- "policies": {},
584
- "checkConstraints": {},
585
- "isRLSEnabled": false
586
- },
587
- "public.messages": {
588
- "name": "messages",
589
- "schema": "",
590
- "columns": {
591
- "id": {
592
- "name": "id",
593
- "type": "text",
594
- "primaryKey": true,
595
- "notNull": true
596
- },
597
- "conversation_id": {
598
- "name": "conversation_id",
599
- "type": "text",
600
- "primaryKey": false,
601
- "notNull": true
602
- },
603
- "role": {
604
- "name": "role",
605
- "type": "text",
606
- "primaryKey": false,
607
- "notNull": true
608
- },
609
- "content": {
610
- "name": "content",
611
- "type": "text",
612
- "primaryKey": false,
613
- "notNull": false
614
- },
615
- "parts": {
616
- "name": "parts",
617
- "type": "text",
618
- "primaryKey": false,
619
- "notNull": true
620
- },
621
- "attachments": {
622
- "name": "attachments",
623
- "type": "text",
624
- "primaryKey": false,
625
- "notNull": false
626
- },
627
- "tool_invocations": {
628
- "name": "tool_invocations",
629
- "type": "text",
630
- "primaryKey": false,
631
- "notNull": false
632
- },
633
- "token_count": {
634
- "name": "token_count",
635
- "type": "integer",
636
- "primaryKey": false,
637
- "notNull": false
638
- },
639
- "created_at": {
640
- "name": "created_at",
641
- "type": "timestamp",
642
- "primaryKey": false,
643
- "notNull": true,
644
- "default": "now()"
645
- }
646
- },
647
- "indexes": {
648
- "messages_conversation_id_idx": {
649
- "name": "messages_conversation_id_idx",
650
- "columns": [
651
- {
652
- "expression": "conversation_id",
653
- "isExpression": false,
654
- "asc": true,
655
- "nulls": "last"
656
- }
657
- ],
658
- "isUnique": false,
659
- "concurrently": false,
660
- "method": "btree",
661
- "with": {}
662
- },
663
- "messages_conversation_created_idx": {
664
- "name": "messages_conversation_created_idx",
665
- "columns": [
666
- {
667
- "expression": "conversation_id",
668
- "isExpression": false,
669
- "asc": true,
670
- "nulls": "last"
671
- },
672
- {
673
- "expression": "created_at",
674
- "isExpression": false,
675
- "asc": true,
676
- "nulls": "last"
677
- }
678
- ],
679
- "isUnique": false,
680
- "concurrently": false,
681
- "method": "btree",
682
- "with": {}
683
- }
684
- },
685
- "foreignKeys": {
686
- "messages_conversation_id_conversations_id_fk": {
687
- "name": "messages_conversation_id_conversations_id_fk",
688
- "tableFrom": "messages",
689
- "tableTo": "conversations",
690
- "columnsFrom": ["conversation_id"],
691
- "columnsTo": ["id"],
692
- "onDelete": "cascade",
693
- "onUpdate": "no action"
694
- }
695
- },
696
- "compositePrimaryKeys": {},
697
- "uniqueConstraints": {},
698
- "policies": {},
699
- "checkConstraints": {},
700
- "isRLSEnabled": false
701
- },
702
- "public.suggestions": {
703
- "name": "suggestions",
704
- "schema": "",
705
- "columns": {
706
- "id": {
707
- "name": "id",
708
- "type": "text",
709
- "primaryKey": true,
710
- "notNull": true
711
- },
712
- "document_id": {
713
- "name": "document_id",
714
- "type": "text",
715
- "primaryKey": false,
716
- "notNull": true
717
- },
718
- "document_created_at": {
719
- "name": "document_created_at",
720
- "type": "timestamp",
721
- "primaryKey": false,
722
- "notNull": true
723
- },
724
- "original_text": {
725
- "name": "original_text",
726
- "type": "text",
727
- "primaryKey": false,
728
- "notNull": true
729
- },
730
- "suggested_text": {
731
- "name": "suggested_text",
732
- "type": "text",
733
- "primaryKey": false,
734
- "notNull": true
735
- },
736
- "description": {
737
- "name": "description",
738
- "type": "text",
739
- "primaryKey": false,
740
- "notNull": false
741
- },
742
- "is_resolved": {
743
- "name": "is_resolved",
744
- "type": "boolean",
745
- "primaryKey": false,
746
- "notNull": true,
747
- "default": false
748
- },
749
- "user_id": {
750
- "name": "user_id",
751
- "type": "text",
752
- "primaryKey": false,
753
- "notNull": true
754
- },
755
- "workspace_id": {
756
- "name": "workspace_id",
757
- "type": "text",
758
- "primaryKey": false,
759
- "notNull": true
760
- },
761
- "created_at": {
762
- "name": "created_at",
763
- "type": "timestamp",
764
- "primaryKey": false,
765
- "notNull": true,
766
- "default": "now()"
767
- }
768
- },
769
- "indexes": {
770
- "suggestions_workspace_id_idx": {
771
- "name": "suggestions_workspace_id_idx",
772
- "columns": [
773
- {
774
- "expression": "workspace_id",
775
- "isExpression": false,
776
- "asc": true,
777
- "nulls": "last"
778
- }
779
- ],
780
- "isUnique": false,
781
- "concurrently": false,
782
- "method": "btree",
783
- "with": {}
784
- }
785
- },
786
- "foreignKeys": {
787
- "suggestions_user_id_users_id_fk": {
788
- "name": "suggestions_user_id_users_id_fk",
789
- "tableFrom": "suggestions",
790
- "tableTo": "users",
791
- "columnsFrom": ["user_id"],
792
- "columnsTo": ["id"],
793
- "onDelete": "cascade",
794
- "onUpdate": "no action"
795
- },
796
- "suggestions_workspace_id_organization_id_fk": {
797
- "name": "suggestions_workspace_id_organization_id_fk",
798
- "tableFrom": "suggestions",
799
- "tableTo": "organization",
800
- "columnsFrom": ["workspace_id"],
801
- "columnsTo": ["id"],
802
- "onDelete": "cascade",
803
- "onUpdate": "no action"
804
- }
805
- },
806
- "compositePrimaryKeys": {},
807
- "uniqueConstraints": {},
808
- "policies": {},
809
- "checkConstraints": {},
810
- "isRLSEnabled": false
811
- },
812
- "public.votes": {
813
- "name": "votes",
814
- "schema": "",
815
- "columns": {
816
- "chat_id": {
817
- "name": "chat_id",
818
- "type": "text",
819
- "primaryKey": false,
820
- "notNull": true
821
- },
822
- "message_id": {
823
- "name": "message_id",
824
- "type": "text",
825
- "primaryKey": false,
826
- "notNull": true
827
- },
828
- "is_upvoted": {
829
- "name": "is_upvoted",
830
- "type": "boolean",
831
- "primaryKey": false,
832
- "notNull": true
833
- }
834
- },
835
- "indexes": {},
836
- "foreignKeys": {
837
- "votes_chat_id_conversations_id_fk": {
838
- "name": "votes_chat_id_conversations_id_fk",
839
- "tableFrom": "votes",
840
- "tableTo": "conversations",
841
- "columnsFrom": ["chat_id"],
842
- "columnsTo": ["id"],
843
- "onDelete": "cascade",
844
- "onUpdate": "no action"
845
- },
846
- "votes_message_id_messages_id_fk": {
847
- "name": "votes_message_id_messages_id_fk",
848
- "tableFrom": "votes",
849
- "tableTo": "messages",
850
- "columnsFrom": ["message_id"],
851
- "columnsTo": ["id"],
852
- "onDelete": "cascade",
853
- "onUpdate": "no action"
854
- }
855
- },
856
- "compositePrimaryKeys": {
857
- "votes_chat_id_message_id_pk": {
858
- "name": "votes_chat_id_message_id_pk",
859
- "columns": ["chat_id", "message_id"]
860
- }
861
- },
862
- "uniqueConstraints": {},
863
- "policies": {},
864
- "checkConstraints": {},
865
- "isRLSEnabled": false
866
- },
867
- "public.accounts": {
868
- "name": "accounts",
869
- "schema": "",
870
- "columns": {
871
- "id": {
872
- "name": "id",
873
- "type": "text",
874
- "primaryKey": true,
875
- "notNull": true
876
- },
877
- "user_id": {
878
- "name": "user_id",
879
- "type": "text",
880
- "primaryKey": false,
881
- "notNull": true
882
- },
883
- "account_id": {
884
- "name": "account_id",
885
- "type": "text",
886
- "primaryKey": false,
887
- "notNull": true
888
- },
889
- "provider_id": {
890
- "name": "provider_id",
891
- "type": "text",
892
- "primaryKey": false,
893
- "notNull": true
894
- },
895
- "access_token": {
896
- "name": "access_token",
897
- "type": "text",
898
- "primaryKey": false,
899
- "notNull": false
900
- },
901
- "refresh_token": {
902
- "name": "refresh_token",
903
- "type": "text",
904
- "primaryKey": false,
905
- "notNull": false
906
- },
907
- "access_token_expires_at": {
908
- "name": "access_token_expires_at",
909
- "type": "timestamp",
910
- "primaryKey": false,
911
- "notNull": false
912
- },
913
- "refresh_token_expires_at": {
914
- "name": "refresh_token_expires_at",
915
- "type": "timestamp",
916
- "primaryKey": false,
917
- "notNull": false
918
- },
919
- "scope": {
920
- "name": "scope",
921
- "type": "text",
922
- "primaryKey": false,
923
- "notNull": false
924
- },
925
- "id_token": {
926
- "name": "id_token",
927
- "type": "text",
928
- "primaryKey": false,
929
- "notNull": false
930
- },
931
- "password": {
932
- "name": "password",
933
- "type": "text",
934
- "primaryKey": false,
935
- "notNull": false
936
- },
937
- "created_at": {
938
- "name": "created_at",
939
- "type": "timestamp",
940
- "primaryKey": false,
941
- "notNull": true,
942
- "default": "now()"
943
- },
944
- "updated_at": {
945
- "name": "updated_at",
946
- "type": "timestamp",
947
- "primaryKey": false,
948
- "notNull": true,
949
- "default": "now()"
950
- }
951
- },
952
- "indexes": {
953
- "accounts_user_id_idx": {
954
- "name": "accounts_user_id_idx",
955
- "columns": [
956
- {
957
- "expression": "user_id",
958
- "isExpression": false,
959
- "asc": true,
960
- "nulls": "last"
961
- }
962
- ],
963
- "isUnique": false,
964
- "concurrently": false,
965
- "method": "btree",
966
- "with": {}
967
- }
968
- },
969
- "foreignKeys": {
970
- "accounts_user_id_users_id_fk": {
971
- "name": "accounts_user_id_users_id_fk",
972
- "tableFrom": "accounts",
973
- "tableTo": "users",
974
- "columnsFrom": ["user_id"],
975
- "columnsTo": ["id"],
976
- "onDelete": "cascade",
977
- "onUpdate": "no action"
978
- }
979
- },
980
- "compositePrimaryKeys": {},
981
- "uniqueConstraints": {},
982
- "policies": {},
983
- "checkConstraints": {},
984
- "isRLSEnabled": false
985
- },
986
- "public.invitation": {
987
- "name": "invitation",
988
- "schema": "",
989
- "columns": {
990
- "id": {
991
- "name": "id",
992
- "type": "text",
993
- "primaryKey": true,
994
- "notNull": true
995
- },
996
- "organization_id": {
997
- "name": "organization_id",
998
- "type": "text",
999
- "primaryKey": false,
1000
- "notNull": true
1001
- },
1002
- "email": {
1003
- "name": "email",
1004
- "type": "text",
1005
- "primaryKey": false,
1006
- "notNull": true
1007
- },
1008
- "role": {
1009
- "name": "role",
1010
- "type": "text",
1011
- "primaryKey": false,
1012
- "notNull": true
1013
- },
1014
- "status": {
1015
- "name": "status",
1016
- "type": "text",
1017
- "primaryKey": false,
1018
- "notNull": true
1019
- },
1020
- "expires_at": {
1021
- "name": "expires_at",
1022
- "type": "timestamp",
1023
- "primaryKey": false,
1024
- "notNull": true
1025
- },
1026
- "inviter_id": {
1027
- "name": "inviter_id",
1028
- "type": "text",
1029
- "primaryKey": false,
1030
- "notNull": true
1031
- },
1032
- "created_at": {
1033
- "name": "created_at",
1034
- "type": "timestamp",
1035
- "primaryKey": false,
1036
- "notNull": true,
1037
- "default": "now()"
1038
- },
1039
- "updated_at": {
1040
- "name": "updated_at",
1041
- "type": "timestamp",
1042
- "primaryKey": false,
1043
- "notNull": true,
1044
- "default": "now()"
1045
- }
1046
- },
1047
- "indexes": {
1048
- "invitation_organization_id_idx": {
1049
- "name": "invitation_organization_id_idx",
1050
- "columns": [
1051
- {
1052
- "expression": "organization_id",
1053
- "isExpression": false,
1054
- "asc": true,
1055
- "nulls": "last"
1056
- }
1057
- ],
1058
- "isUnique": false,
1059
- "concurrently": false,
1060
- "method": "btree",
1061
- "with": {}
1062
- },
1063
- "invitation_email_idx": {
1064
- "name": "invitation_email_idx",
1065
- "columns": [
1066
- {
1067
- "expression": "email",
1068
- "isExpression": false,
1069
- "asc": true,
1070
- "nulls": "last"
1071
- }
1072
- ],
1073
- "isUnique": false,
1074
- "concurrently": false,
1075
- "method": "btree",
1076
- "with": {}
1077
- }
1078
- },
1079
- "foreignKeys": {
1080
- "invitation_organization_id_organization_id_fk": {
1081
- "name": "invitation_organization_id_organization_id_fk",
1082
- "tableFrom": "invitation",
1083
- "tableTo": "organization",
1084
- "columnsFrom": ["organization_id"],
1085
- "columnsTo": ["id"],
1086
- "onDelete": "cascade",
1087
- "onUpdate": "no action"
1088
- },
1089
- "invitation_inviter_id_users_id_fk": {
1090
- "name": "invitation_inviter_id_users_id_fk",
1091
- "tableFrom": "invitation",
1092
- "tableTo": "users",
1093
- "columnsFrom": ["inviter_id"],
1094
- "columnsTo": ["id"],
1095
- "onDelete": "no action",
1096
- "onUpdate": "no action"
1097
- }
1098
- },
1099
- "compositePrimaryKeys": {},
1100
- "uniqueConstraints": {},
1101
- "policies": {},
1102
- "checkConstraints": {},
1103
- "isRLSEnabled": false
1104
- },
1105
- "public.member": {
1106
- "name": "member",
1107
- "schema": "",
1108
- "columns": {
1109
- "id": {
1110
- "name": "id",
1111
- "type": "text",
1112
- "primaryKey": true,
1113
- "notNull": true
1114
- },
1115
- "organization_id": {
1116
- "name": "organization_id",
1117
- "type": "text",
1118
- "primaryKey": false,
1119
- "notNull": true
1120
- },
1121
- "user_id": {
1122
- "name": "user_id",
1123
- "type": "text",
1124
- "primaryKey": false,
1125
- "notNull": true
1126
- },
1127
- "role": {
1128
- "name": "role",
1129
- "type": "text",
1130
- "primaryKey": false,
1131
- "notNull": true
1132
- },
1133
- "created_at": {
1134
- "name": "created_at",
1135
- "type": "timestamp",
1136
- "primaryKey": false,
1137
- "notNull": true,
1138
- "default": "now()"
1139
- },
1140
- "updated_at": {
1141
- "name": "updated_at",
1142
- "type": "timestamp",
1143
- "primaryKey": false,
1144
- "notNull": true,
1145
- "default": "now()"
1146
- }
1147
- },
1148
- "indexes": {
1149
- "member_organization_id_idx": {
1150
- "name": "member_organization_id_idx",
1151
- "columns": [
1152
- {
1153
- "expression": "organization_id",
1154
- "isExpression": false,
1155
- "asc": true,
1156
- "nulls": "last"
1157
- }
1158
- ],
1159
- "isUnique": false,
1160
- "concurrently": false,
1161
- "method": "btree",
1162
- "with": {}
1163
- },
1164
- "member_user_id_idx": {
1165
- "name": "member_user_id_idx",
1166
- "columns": [
1167
- {
1168
- "expression": "user_id",
1169
- "isExpression": false,
1170
- "asc": true,
1171
- "nulls": "last"
1172
- }
1173
- ],
1174
- "isUnique": false,
1175
- "concurrently": false,
1176
- "method": "btree",
1177
- "with": {}
1178
- }
1179
- },
1180
- "foreignKeys": {
1181
- "member_organization_id_organization_id_fk": {
1182
- "name": "member_organization_id_organization_id_fk",
1183
- "tableFrom": "member",
1184
- "tableTo": "organization",
1185
- "columnsFrom": ["organization_id"],
1186
- "columnsTo": ["id"],
1187
- "onDelete": "cascade",
1188
- "onUpdate": "no action"
1189
- },
1190
- "member_user_id_users_id_fk": {
1191
- "name": "member_user_id_users_id_fk",
1192
- "tableFrom": "member",
1193
- "tableTo": "users",
1194
- "columnsFrom": ["user_id"],
1195
- "columnsTo": ["id"],
1196
- "onDelete": "cascade",
1197
- "onUpdate": "no action"
1198
- }
1199
- },
1200
- "compositePrimaryKeys": {},
1201
- "uniqueConstraints": {},
1202
- "policies": {},
1203
- "checkConstraints": {},
1204
- "isRLSEnabled": false
1205
- },
1206
- "public.organization": {
1207
- "name": "organization",
1208
- "schema": "",
1209
- "columns": {
1210
- "id": {
1211
- "name": "id",
1212
- "type": "text",
1213
- "primaryKey": true,
1214
- "notNull": true
1215
- },
1216
- "name": {
1217
- "name": "name",
1218
- "type": "text",
1219
- "primaryKey": false,
1220
- "notNull": true
1221
- },
1222
- "slug": {
1223
- "name": "slug",
1224
- "type": "text",
1225
- "primaryKey": false,
1226
- "notNull": false
1227
- },
1228
- "logo": {
1229
- "name": "logo",
1230
- "type": "text",
1231
- "primaryKey": false,
1232
- "notNull": false
1233
- },
1234
- "metadata": {
1235
- "name": "metadata",
1236
- "type": "text",
1237
- "primaryKey": false,
1238
- "notNull": false
1239
- },
1240
- "created_at": {
1241
- "name": "created_at",
1242
- "type": "timestamp",
1243
- "primaryKey": false,
1244
- "notNull": true,
1245
- "default": "now()"
1246
- },
1247
- "updated_at": {
1248
- "name": "updated_at",
1249
- "type": "timestamp",
1250
- "primaryKey": false,
1251
- "notNull": true,
1252
- "default": "now()"
1253
- }
1254
- },
1255
- "indexes": {},
1256
- "foreignKeys": {},
1257
- "compositePrimaryKeys": {},
1258
- "uniqueConstraints": {
1259
- "organization_slug_unique": {
1260
- "name": "organization_slug_unique",
1261
- "nullsNotDistinct": false,
1262
- "columns": ["slug"]
1263
- }
1264
- },
1265
- "policies": {},
1266
- "checkConstraints": {},
1267
- "isRLSEnabled": false
1268
- },
1269
- "public.sessions": {
1270
- "name": "sessions",
1271
- "schema": "",
1272
- "columns": {
1273
- "id": {
1274
- "name": "id",
1275
- "type": "text",
1276
- "primaryKey": true,
1277
- "notNull": true
1278
- },
1279
- "user_id": {
1280
- "name": "user_id",
1281
- "type": "text",
1282
- "primaryKey": false,
1283
- "notNull": true
1284
- },
1285
- "token": {
1286
- "name": "token",
1287
- "type": "text",
1288
- "primaryKey": false,
1289
- "notNull": true
1290
- },
1291
- "expires_at": {
1292
- "name": "expires_at",
1293
- "type": "timestamp",
1294
- "primaryKey": false,
1295
- "notNull": true
1296
- },
1297
- "ip_address": {
1298
- "name": "ip_address",
1299
- "type": "text",
1300
- "primaryKey": false,
1301
- "notNull": false
1302
- },
1303
- "user_agent": {
1304
- "name": "user_agent",
1305
- "type": "text",
1306
- "primaryKey": false,
1307
- "notNull": false
1308
- },
1309
- "created_at": {
1310
- "name": "created_at",
1311
- "type": "timestamp",
1312
- "primaryKey": false,
1313
- "notNull": true,
1314
- "default": "now()"
1315
- },
1316
- "updated_at": {
1317
- "name": "updated_at",
1318
- "type": "timestamp",
1319
- "primaryKey": false,
1320
- "notNull": true,
1321
- "default": "now()"
1322
- }
1323
- },
1324
- "indexes": {
1325
- "sessions_user_id_idx": {
1326
- "name": "sessions_user_id_idx",
1327
- "columns": [
1328
- {
1329
- "expression": "user_id",
1330
- "isExpression": false,
1331
- "asc": true,
1332
- "nulls": "last"
1333
- }
1334
- ],
1335
- "isUnique": false,
1336
- "concurrently": false,
1337
- "method": "btree",
1338
- "with": {}
1339
- }
1340
- },
1341
- "foreignKeys": {
1342
- "sessions_user_id_users_id_fk": {
1343
- "name": "sessions_user_id_users_id_fk",
1344
- "tableFrom": "sessions",
1345
- "tableTo": "users",
1346
- "columnsFrom": ["user_id"],
1347
- "columnsTo": ["id"],
1348
- "onDelete": "cascade",
1349
- "onUpdate": "no action"
1350
- }
1351
- },
1352
- "compositePrimaryKeys": {},
1353
- "uniqueConstraints": {
1354
- "sessions_token_unique": {
1355
- "name": "sessions_token_unique",
1356
- "nullsNotDistinct": false,
1357
- "columns": ["token"]
1358
- }
1359
- },
1360
- "policies": {},
1361
- "checkConstraints": {},
1362
- "isRLSEnabled": false
1363
- },
1364
- "public.users": {
1365
- "name": "users",
1366
- "schema": "",
1367
- "columns": {
1368
- "id": {
1369
- "name": "id",
1370
- "type": "text",
1371
- "primaryKey": true,
1372
- "notNull": true
1373
- },
1374
- "name": {
1375
- "name": "name",
1376
- "type": "text",
1377
- "primaryKey": false,
1378
- "notNull": true
1379
- },
1380
- "email": {
1381
- "name": "email",
1382
- "type": "text",
1383
- "primaryKey": false,
1384
- "notNull": true
1385
- },
1386
- "email_verified": {
1387
- "name": "email_verified",
1388
- "type": "boolean",
1389
- "primaryKey": false,
1390
- "notNull": true,
1391
- "default": false
1392
- },
1393
- "image": {
1394
- "name": "image",
1395
- "type": "text",
1396
- "primaryKey": false,
1397
- "notNull": false
1398
- },
1399
- "deleted_at": {
1400
- "name": "deleted_at",
1401
- "type": "timestamp",
1402
- "primaryKey": false,
1403
- "notNull": false
1404
- },
1405
- "created_at": {
1406
- "name": "created_at",
1407
- "type": "timestamp",
1408
- "primaryKey": false,
1409
- "notNull": true,
1410
- "default": "now()"
1411
- },
1412
- "updated_at": {
1413
- "name": "updated_at",
1414
- "type": "timestamp",
1415
- "primaryKey": false,
1416
- "notNull": true,
1417
- "default": "now()"
1418
- },
1419
- "onboarding_completed": {
1420
- "name": "onboarding_completed",
1421
- "type": "boolean",
1422
- "primaryKey": false,
1423
- "notNull": true,
1424
- "default": false
1425
- },
1426
- "onboarding_step": {
1427
- "name": "onboarding_step",
1428
- "type": "text",
1429
- "primaryKey": false,
1430
- "notNull": false
1431
- },
1432
- "preferred_language": {
1433
- "name": "preferred_language",
1434
- "type": "text",
1435
- "primaryKey": false,
1436
- "notNull": true,
1437
- "default": "'en'"
1438
- }
1439
- },
1440
- "indexes": {},
1441
- "foreignKeys": {},
1442
- "compositePrimaryKeys": {},
1443
- "uniqueConstraints": {
1444
- "users_email_unique": {
1445
- "name": "users_email_unique",
1446
- "nullsNotDistinct": false,
1447
- "columns": ["email"]
1448
- }
1449
- },
1450
- "policies": {},
1451
- "checkConstraints": {},
1452
- "isRLSEnabled": false
1453
- },
1454
- "public.verifications": {
1455
- "name": "verifications",
1456
- "schema": "",
1457
- "columns": {
1458
- "id": {
1459
- "name": "id",
1460
- "type": "text",
1461
- "primaryKey": true,
1462
- "notNull": true
1463
- },
1464
- "identifier": {
1465
- "name": "identifier",
1466
- "type": "text",
1467
- "primaryKey": false,
1468
- "notNull": true
1469
- },
1470
- "value": {
1471
- "name": "value",
1472
- "type": "text",
1473
- "primaryKey": false,
1474
- "notNull": true
1475
- },
1476
- "expires_at": {
1477
- "name": "expires_at",
1478
- "type": "timestamp",
1479
- "primaryKey": false,
1480
- "notNull": true
1481
- },
1482
- "created_at": {
1483
- "name": "created_at",
1484
- "type": "timestamp",
1485
- "primaryKey": false,
1486
- "notNull": true,
1487
- "default": "now()"
1488
- },
1489
- "updated_at": {
1490
- "name": "updated_at",
1491
- "type": "timestamp",
1492
- "primaryKey": false,
1493
- "notNull": true,
1494
- "default": "now()"
1495
- }
1496
- },
1497
- "indexes": {},
1498
- "foreignKeys": {},
1499
- "compositePrimaryKeys": {},
1500
- "uniqueConstraints": {},
1501
- "policies": {},
1502
- "checkConstraints": {},
1503
- "isRLSEnabled": false
1504
- },
1505
- "public.credit_balances": {
1506
- "name": "credit_balances",
1507
- "schema": "",
1508
- "columns": {
1509
- "id": {
1510
- "name": "id",
1511
- "type": "text",
1512
- "primaryKey": true,
1513
- "notNull": true
1514
- },
1515
- "workspace_id": {
1516
- "name": "workspace_id",
1517
- "type": "text",
1518
- "primaryKey": false,
1519
- "notNull": true
1520
- },
1521
- "balance": {
1522
- "name": "balance",
1523
- "type": "integer",
1524
- "primaryKey": false,
1525
- "notNull": true,
1526
- "default": 0
1527
- },
1528
- "total_purchased": {
1529
- "name": "total_purchased",
1530
- "type": "integer",
1531
- "primaryKey": false,
1532
- "notNull": true,
1533
- "default": 0
1534
- },
1535
- "total_used": {
1536
- "name": "total_used",
1537
- "type": "integer",
1538
- "primaryKey": false,
1539
- "notNull": true,
1540
- "default": 0
1541
- },
1542
- "updated_at": {
1543
- "name": "updated_at",
1544
- "type": "timestamp",
1545
- "primaryKey": false,
1546
- "notNull": true,
1547
- "default": "now()"
1548
- }
1549
- },
1550
- "indexes": {},
1551
- "foreignKeys": {
1552
- "credit_balances_workspace_id_organization_id_fk": {
1553
- "name": "credit_balances_workspace_id_organization_id_fk",
1554
- "tableFrom": "credit_balances",
1555
- "tableTo": "organization",
1556
- "columnsFrom": ["workspace_id"],
1557
- "columnsTo": ["id"],
1558
- "onDelete": "cascade",
1559
- "onUpdate": "no action"
1560
- }
1561
- },
1562
- "compositePrimaryKeys": {},
1563
- "uniqueConstraints": {
1564
- "credit_balances_workspace_id_unique": {
1565
- "name": "credit_balances_workspace_id_unique",
1566
- "nullsNotDistinct": false,
1567
- "columns": ["workspace_id"]
1568
- }
1569
- },
1570
- "policies": {},
1571
- "checkConstraints": {},
1572
- "isRLSEnabled": false
1573
- },
1574
- "public.credit_purchases": {
1575
- "name": "credit_purchases",
1576
- "schema": "",
1577
- "columns": {
1578
- "id": {
1579
- "name": "id",
1580
- "type": "text",
1581
- "primaryKey": true,
1582
- "notNull": true
1583
- },
1584
- "workspace_id": {
1585
- "name": "workspace_id",
1586
- "type": "text",
1587
- "primaryKey": false,
1588
- "notNull": true
1589
- },
1590
- "amount": {
1591
- "name": "amount",
1592
- "type": "integer",
1593
- "primaryKey": false,
1594
- "notNull": true
1595
- },
1596
- "credits": {
1597
- "name": "credits",
1598
- "type": "integer",
1599
- "primaryKey": false,
1600
- "notNull": true
1601
- },
1602
- "stripe_payment_intent_id": {
1603
- "name": "stripe_payment_intent_id",
1604
- "type": "text",
1605
- "primaryKey": false,
1606
- "notNull": false
1607
- },
1608
- "stripe_checkout_session_id": {
1609
- "name": "stripe_checkout_session_id",
1610
- "type": "text",
1611
- "primaryKey": false,
1612
- "notNull": false
1613
- },
1614
- "status": {
1615
- "name": "status",
1616
- "type": "text",
1617
- "primaryKey": false,
1618
- "notNull": true,
1619
- "default": "'pending'"
1620
- },
1621
- "created_at": {
1622
- "name": "created_at",
1623
- "type": "timestamp",
1624
- "primaryKey": false,
1625
- "notNull": true,
1626
- "default": "now()"
1627
- }
1628
- },
1629
- "indexes": {
1630
- "credit_purchases_workspace_id_idx": {
1631
- "name": "credit_purchases_workspace_id_idx",
1632
- "columns": [
1633
- {
1634
- "expression": "workspace_id",
1635
- "isExpression": false,
1636
- "asc": true,
1637
- "nulls": "last"
1638
- }
1639
- ],
1640
- "isUnique": false,
1641
- "concurrently": false,
1642
- "method": "btree",
1643
- "with": {}
1644
- }
1645
- },
1646
- "foreignKeys": {
1647
- "credit_purchases_workspace_id_organization_id_fk": {
1648
- "name": "credit_purchases_workspace_id_organization_id_fk",
1649
- "tableFrom": "credit_purchases",
1650
- "tableTo": "organization",
1651
- "columnsFrom": ["workspace_id"],
1652
- "columnsTo": ["id"],
1653
- "onDelete": "cascade",
1654
- "onUpdate": "no action"
1655
- }
1656
- },
1657
- "compositePrimaryKeys": {},
1658
- "uniqueConstraints": {},
1659
- "policies": {},
1660
- "checkConstraints": {},
1661
- "isRLSEnabled": false
1662
- },
1663
- "public.finance_events": {
1664
- "name": "finance_events",
1665
- "schema": "",
1666
- "columns": {
1667
- "id": {
1668
- "name": "id",
1669
- "type": "text",
1670
- "primaryKey": true,
1671
- "notNull": true
1672
- },
1673
- "workspace_id": {
1674
- "name": "workspace_id",
1675
- "type": "text",
1676
- "primaryKey": false,
1677
- "notNull": false
1678
- },
1679
- "stripe_event_id": {
1680
- "name": "stripe_event_id",
1681
- "type": "text",
1682
- "primaryKey": false,
1683
- "notNull": true
1684
- },
1685
- "type": {
1686
- "name": "type",
1687
- "type": "text",
1688
- "primaryKey": false,
1689
- "notNull": true
1690
- },
1691
- "amount": {
1692
- "name": "amount",
1693
- "type": "integer",
1694
- "primaryKey": false,
1695
- "notNull": false
1696
- },
1697
- "currency": {
1698
- "name": "currency",
1699
- "type": "text",
1700
- "primaryKey": false,
1701
- "notNull": false,
1702
- "default": "'usd'"
1703
- },
1704
- "metadata": {
1705
- "name": "metadata",
1706
- "type": "text",
1707
- "primaryKey": false,
1708
- "notNull": false
1709
- },
1710
- "processed_at": {
1711
- "name": "processed_at",
1712
- "type": "timestamp",
1713
- "primaryKey": false,
1714
- "notNull": false
1715
- },
1716
- "created_at": {
1717
- "name": "created_at",
1718
- "type": "timestamp",
1719
- "primaryKey": false,
1720
- "notNull": true,
1721
- "default": "now()"
1722
- }
1723
- },
1724
- "indexes": {},
1725
- "foreignKeys": {
1726
- "finance_events_workspace_id_organization_id_fk": {
1727
- "name": "finance_events_workspace_id_organization_id_fk",
1728
- "tableFrom": "finance_events",
1729
- "tableTo": "organization",
1730
- "columnsFrom": ["workspace_id"],
1731
- "columnsTo": ["id"],
1732
- "onDelete": "no action",
1733
- "onUpdate": "no action"
1734
- }
1735
- },
1736
- "compositePrimaryKeys": {},
1737
- "uniqueConstraints": {
1738
- "finance_events_stripe_event_id_unique": {
1739
- "name": "finance_events_stripe_event_id_unique",
1740
- "nullsNotDistinct": false,
1741
- "columns": ["stripe_event_id"]
1742
- }
1743
- },
1744
- "policies": {},
1745
- "checkConstraints": {},
1746
- "isRLSEnabled": false
1747
- },
1748
- "public.plans": {
1749
- "name": "plans",
1750
- "schema": "",
1751
- "columns": {
1752
- "id": {
1753
- "name": "id",
1754
- "type": "text",
1755
- "primaryKey": true,
1756
- "notNull": true
1757
- },
1758
- "name": {
1759
- "name": "name",
1760
- "type": "text",
1761
- "primaryKey": false,
1762
- "notNull": true
1763
- },
1764
- "slug": {
1765
- "name": "slug",
1766
- "type": "text",
1767
- "primaryKey": false,
1768
- "notNull": true
1769
- },
1770
- "description": {
1771
- "name": "description",
1772
- "type": "text",
1773
- "primaryKey": false,
1774
- "notNull": false
1775
- },
1776
- "price_monthly": {
1777
- "name": "price_monthly",
1778
- "type": "integer",
1779
- "primaryKey": false,
1780
- "notNull": true
1781
- },
1782
- "price_yearly": {
1783
- "name": "price_yearly",
1784
- "type": "integer",
1785
- "primaryKey": false,
1786
- "notNull": true
1787
- },
1788
- "stripe_price_id_monthly": {
1789
- "name": "stripe_price_id_monthly",
1790
- "type": "text",
1791
- "primaryKey": false,
1792
- "notNull": false
1793
- },
1794
- "stripe_price_id_yearly": {
1795
- "name": "stripe_price_id_yearly",
1796
- "type": "text",
1797
- "primaryKey": false,
1798
- "notNull": false
1799
- },
1800
- "features": {
1801
- "name": "features",
1802
- "type": "text",
1803
- "primaryKey": false,
1804
- "notNull": true
1805
- },
1806
- "limits": {
1807
- "name": "limits",
1808
- "type": "text",
1809
- "primaryKey": false,
1810
- "notNull": true
1811
- },
1812
- "is_active": {
1813
- "name": "is_active",
1814
- "type": "boolean",
1815
- "primaryKey": false,
1816
- "notNull": true,
1817
- "default": true
1818
- },
1819
- "sort_order": {
1820
- "name": "sort_order",
1821
- "type": "integer",
1822
- "primaryKey": false,
1823
- "notNull": true,
1824
- "default": 0
1825
- },
1826
- "created_at": {
1827
- "name": "created_at",
1828
- "type": "timestamp",
1829
- "primaryKey": false,
1830
- "notNull": true,
1831
- "default": "now()"
1832
- },
1833
- "updated_at": {
1834
- "name": "updated_at",
1835
- "type": "timestamp",
1836
- "primaryKey": false,
1837
- "notNull": true,
1838
- "default": "now()"
1839
- }
1840
- },
1841
- "indexes": {},
1842
- "foreignKeys": {},
1843
- "compositePrimaryKeys": {},
1844
- "uniqueConstraints": {
1845
- "plans_slug_unique": {
1846
- "name": "plans_slug_unique",
1847
- "nullsNotDistinct": false,
1848
- "columns": ["slug"]
1849
- }
1850
- },
1851
- "policies": {},
1852
- "checkConstraints": {},
1853
- "isRLSEnabled": false
1854
- },
1855
- "public.subscriptions": {
1856
- "name": "subscriptions",
1857
- "schema": "",
1858
- "columns": {
1859
- "id": {
1860
- "name": "id",
1861
- "type": "text",
1862
- "primaryKey": true,
1863
- "notNull": true
1864
- },
1865
- "workspace_id": {
1866
- "name": "workspace_id",
1867
- "type": "text",
1868
- "primaryKey": false,
1869
- "notNull": true
1870
- },
1871
- "plan_id": {
1872
- "name": "plan_id",
1873
- "type": "text",
1874
- "primaryKey": false,
1875
- "notNull": true
1876
- },
1877
- "stripe_customer_id": {
1878
- "name": "stripe_customer_id",
1879
- "type": "text",
1880
- "primaryKey": false,
1881
- "notNull": false
1882
- },
1883
- "stripe_subscription_id": {
1884
- "name": "stripe_subscription_id",
1885
- "type": "text",
1886
- "primaryKey": false,
1887
- "notNull": false
1888
- },
1889
- "status": {
1890
- "name": "status",
1891
- "type": "text",
1892
- "primaryKey": false,
1893
- "notNull": true,
1894
- "default": "'active'"
1895
- },
1896
- "billing_mode": {
1897
- "name": "billing_mode",
1898
- "type": "text",
1899
- "primaryKey": false,
1900
- "notNull": true,
1901
- "default": "'subscription'"
1902
- },
1903
- "current_period_start": {
1904
- "name": "current_period_start",
1905
- "type": "timestamp",
1906
- "primaryKey": false,
1907
- "notNull": false
1908
- },
1909
- "current_period_end": {
1910
- "name": "current_period_end",
1911
- "type": "timestamp",
1912
- "primaryKey": false,
1913
- "notNull": false
1914
- },
1915
- "cancel_at_period_end": {
1916
- "name": "cancel_at_period_end",
1917
- "type": "boolean",
1918
- "primaryKey": false,
1919
- "notNull": true,
1920
- "default": false
1921
- },
1922
- "created_at": {
1923
- "name": "created_at",
1924
- "type": "timestamp",
1925
- "primaryKey": false,
1926
- "notNull": true,
1927
- "default": "now()"
1928
- },
1929
- "updated_at": {
1930
- "name": "updated_at",
1931
- "type": "timestamp",
1932
- "primaryKey": false,
1933
- "notNull": true,
1934
- "default": "now()"
1935
- }
1936
- },
1937
- "indexes": {
1938
- "subscriptions_workspace_id_idx": {
1939
- "name": "subscriptions_workspace_id_idx",
1940
- "columns": [
1941
- {
1942
- "expression": "workspace_id",
1943
- "isExpression": false,
1944
- "asc": true,
1945
- "nulls": "last"
1946
- }
1947
- ],
1948
- "isUnique": false,
1949
- "concurrently": false,
1950
- "method": "btree",
1951
- "with": {}
1952
- }
1953
- },
1954
- "foreignKeys": {
1955
- "subscriptions_workspace_id_organization_id_fk": {
1956
- "name": "subscriptions_workspace_id_organization_id_fk",
1957
- "tableFrom": "subscriptions",
1958
- "tableTo": "organization",
1959
- "columnsFrom": ["workspace_id"],
1960
- "columnsTo": ["id"],
1961
- "onDelete": "cascade",
1962
- "onUpdate": "no action"
1963
- },
1964
- "subscriptions_plan_id_plans_id_fk": {
1965
- "name": "subscriptions_plan_id_plans_id_fk",
1966
- "tableFrom": "subscriptions",
1967
- "tableTo": "plans",
1968
- "columnsFrom": ["plan_id"],
1969
- "columnsTo": ["id"],
1970
- "onDelete": "restrict",
1971
- "onUpdate": "no action"
1972
- }
1973
- },
1974
- "compositePrimaryKeys": {},
1975
- "uniqueConstraints": {
1976
- "subscriptions_stripe_subscription_id_unique": {
1977
- "name": "subscriptions_stripe_subscription_id_unique",
1978
- "nullsNotDistinct": false,
1979
- "columns": ["stripe_subscription_id"]
1980
- },
1981
- "subscriptions_workspace_id_unique": {
1982
- "name": "subscriptions_workspace_id_unique",
1983
- "nullsNotDistinct": false,
1984
- "columns": ["workspace_id"]
1985
- }
1986
- },
1987
- "policies": {},
1988
- "checkConstraints": {},
1989
- "isRLSEnabled": false
1990
- },
1991
- "public.feature_flags": {
1992
- "name": "feature_flags",
1993
- "schema": "",
1994
- "columns": {
1995
- "id": {
1996
- "name": "id",
1997
- "type": "text",
1998
- "primaryKey": true,
1999
- "notNull": true
2000
- },
2001
- "name": {
2002
- "name": "name",
2003
- "type": "text",
2004
- "primaryKey": false,
2005
- "notNull": true
2006
- },
2007
- "description": {
2008
- "name": "description",
2009
- "type": "text",
2010
- "primaryKey": false,
2011
- "notNull": false
2012
- },
2013
- "enabled_plans": {
2014
- "name": "enabled_plans",
2015
- "type": "text",
2016
- "primaryKey": false,
2017
- "notNull": true
2018
- },
2019
- "is_active": {
2020
- "name": "is_active",
2021
- "type": "boolean",
2022
- "primaryKey": false,
2023
- "notNull": true,
2024
- "default": true
2025
- },
2026
- "created_at": {
2027
- "name": "created_at",
2028
- "type": "timestamp",
2029
- "primaryKey": false,
2030
- "notNull": true,
2031
- "default": "now()"
2032
- },
2033
- "updated_at": {
2034
- "name": "updated_at",
2035
- "type": "timestamp",
2036
- "primaryKey": false,
2037
- "notNull": true,
2038
- "default": "now()"
2039
- }
2040
- },
2041
- "indexes": {},
2042
- "foreignKeys": {},
2043
- "compositePrimaryKeys": {},
2044
- "uniqueConstraints": {
2045
- "feature_flags_name_unique": {
2046
- "name": "feature_flags_name_unique",
2047
- "nullsNotDistinct": false,
2048
- "columns": ["name"]
2049
- }
2050
- },
2051
- "policies": {},
2052
- "checkConstraints": {},
2053
- "isRLSEnabled": false
2054
- },
2055
- "public.monthly_usage": {
2056
- "name": "monthly_usage",
2057
- "schema": "",
2058
- "columns": {
2059
- "id": {
2060
- "name": "id",
2061
- "type": "text",
2062
- "primaryKey": true,
2063
- "notNull": true
2064
- },
2065
- "workspace_id": {
2066
- "name": "workspace_id",
2067
- "type": "text",
2068
- "primaryKey": false,
2069
- "notNull": true
2070
- },
2071
- "period_start": {
2072
- "name": "period_start",
2073
- "type": "timestamp",
2074
- "primaryKey": false,
2075
- "notNull": true
2076
- },
2077
- "period_end": {
2078
- "name": "period_end",
2079
- "type": "timestamp",
2080
- "primaryKey": false,
2081
- "notNull": true
2082
- },
2083
- "tokens_used": {
2084
- "name": "tokens_used",
2085
- "type": "integer",
2086
- "primaryKey": false,
2087
- "notNull": true,
2088
- "default": 0
2089
- },
2090
- "request_count": {
2091
- "name": "request_count",
2092
- "type": "integer",
2093
- "primaryKey": false,
2094
- "notNull": true,
2095
- "default": 0
2096
- },
2097
- "updated_at": {
2098
- "name": "updated_at",
2099
- "type": "timestamp",
2100
- "primaryKey": false,
2101
- "notNull": true,
2102
- "default": "now()"
2103
- }
2104
- },
2105
- "indexes": {
2106
- "monthly_usage_workspace_id_idx": {
2107
- "name": "monthly_usage_workspace_id_idx",
2108
- "columns": [
2109
- {
2110
- "expression": "workspace_id",
2111
- "isExpression": false,
2112
- "asc": true,
2113
- "nulls": "last"
2114
- }
2115
- ],
2116
- "isUnique": false,
2117
- "concurrently": false,
2118
- "method": "btree",
2119
- "with": {}
2120
- }
2121
- },
2122
- "foreignKeys": {
2123
- "monthly_usage_workspace_id_organization_id_fk": {
2124
- "name": "monthly_usage_workspace_id_organization_id_fk",
2125
- "tableFrom": "monthly_usage",
2126
- "tableTo": "organization",
2127
- "columnsFrom": ["workspace_id"],
2128
- "columnsTo": ["id"],
2129
- "onDelete": "cascade",
2130
- "onUpdate": "no action"
2131
- }
2132
- },
2133
- "compositePrimaryKeys": {},
2134
- "uniqueConstraints": {
2135
- "monthly_usage_workspace_period_unique": {
2136
- "name": "monthly_usage_workspace_period_unique",
2137
- "nullsNotDistinct": false,
2138
- "columns": ["workspace_id", "period_start"]
2139
- }
2140
- },
2141
- "policies": {},
2142
- "checkConstraints": {},
2143
- "isRLSEnabled": false
2144
- },
2145
- "public.notification_history": {
2146
- "name": "notification_history",
2147
- "schema": "",
2148
- "columns": {
2149
- "id": {
2150
- "name": "id",
2151
- "type": "text",
2152
- "primaryKey": true,
2153
- "notNull": true
2154
- },
2155
- "workspace_id": {
2156
- "name": "workspace_id",
2157
- "type": "text",
2158
- "primaryKey": false,
2159
- "notNull": true
2160
- },
2161
- "type": {
2162
- "name": "type",
2163
- "type": "text",
2164
- "primaryKey": false,
2165
- "notNull": true
2166
- },
2167
- "period_key": {
2168
- "name": "period_key",
2169
- "type": "text",
2170
- "primaryKey": false,
2171
- "notNull": true
2172
- },
2173
- "sent_at": {
2174
- "name": "sent_at",
2175
- "type": "timestamp",
2176
- "primaryKey": false,
2177
- "notNull": true,
2178
- "default": "now()"
2179
- },
2180
- "channel": {
2181
- "name": "channel",
2182
- "type": "text",
2183
- "primaryKey": false,
2184
- "notNull": true,
2185
- "default": "'console'"
2186
- },
2187
- "metadata": {
2188
- "name": "metadata",
2189
- "type": "text",
2190
- "primaryKey": false,
2191
- "notNull": false
2192
- }
2193
- },
2194
- "indexes": {
2195
- "notification_history_workspace_id_idx": {
2196
- "name": "notification_history_workspace_id_idx",
2197
- "columns": [
2198
- {
2199
- "expression": "workspace_id",
2200
- "isExpression": false,
2201
- "asc": true,
2202
- "nulls": "last"
2203
- }
2204
- ],
2205
- "isUnique": false,
2206
- "concurrently": false,
2207
- "method": "btree",
2208
- "with": {}
2209
- }
2210
- },
2211
- "foreignKeys": {
2212
- "notification_history_workspace_id_organization_id_fk": {
2213
- "name": "notification_history_workspace_id_organization_id_fk",
2214
- "tableFrom": "notification_history",
2215
- "tableTo": "organization",
2216
- "columnsFrom": ["workspace_id"],
2217
- "columnsTo": ["id"],
2218
- "onDelete": "cascade",
2219
- "onUpdate": "no action"
2220
- }
2221
- },
2222
- "compositePrimaryKeys": {},
2223
- "uniqueConstraints": {
2224
- "notification_history_dedup_unique": {
2225
- "name": "notification_history_dedup_unique",
2226
- "nullsNotDistinct": false,
2227
- "columns": ["workspace_id", "type", "period_key"]
2228
- }
2229
- },
2230
- "policies": {},
2231
- "checkConstraints": {},
2232
- "isRLSEnabled": false
2233
- },
2234
- "public.rate_limit_entries": {
2235
- "name": "rate_limit_entries",
2236
- "schema": "",
2237
- "columns": {
2238
- "id": {
2239
- "name": "id",
2240
- "type": "text",
2241
- "primaryKey": true,
2242
- "notNull": true
2243
- },
2244
- "workspace_id": {
2245
- "name": "workspace_id",
2246
- "type": "text",
2247
- "primaryKey": false,
2248
- "notNull": true
2249
- },
2250
- "endpoint": {
2251
- "name": "endpoint",
2252
- "type": "text",
2253
- "primaryKey": false,
2254
- "notNull": true,
2255
- "default": "'chat'"
2256
- },
2257
- "requested_at": {
2258
- "name": "requested_at",
2259
- "type": "timestamp",
2260
- "primaryKey": false,
2261
- "notNull": true,
2262
- "default": "now()"
2263
- }
2264
- },
2265
- "indexes": {
2266
- "rate_limit_entries_window_idx": {
2267
- "name": "rate_limit_entries_window_idx",
2268
- "columns": [
2269
- {
2270
- "expression": "workspace_id",
2271
- "isExpression": false,
2272
- "asc": true,
2273
- "nulls": "last"
2274
- },
2275
- {
2276
- "expression": "endpoint",
2277
- "isExpression": false,
2278
- "asc": true,
2279
- "nulls": "last"
2280
- },
2281
- {
2282
- "expression": "requested_at",
2283
- "isExpression": false,
2284
- "asc": true,
2285
- "nulls": "last"
2286
- }
2287
- ],
2288
- "isUnique": false,
2289
- "concurrently": false,
2290
- "method": "btree",
2291
- "with": {}
2292
- }
2293
- },
2294
- "foreignKeys": {
2295
- "rate_limit_entries_workspace_id_organization_id_fk": {
2296
- "name": "rate_limit_entries_workspace_id_organization_id_fk",
2297
- "tableFrom": "rate_limit_entries",
2298
- "tableTo": "organization",
2299
- "columnsFrom": ["workspace_id"],
2300
- "columnsTo": ["id"],
2301
- "onDelete": "cascade",
2302
- "onUpdate": "no action"
2303
- }
2304
- },
2305
- "compositePrimaryKeys": {},
2306
- "uniqueConstraints": {},
2307
- "policies": {},
2308
- "checkConstraints": {},
2309
- "isRLSEnabled": false
2310
- },
2311
- "public.trial_credits": {
2312
- "name": "trial_credits",
2313
- "schema": "",
2314
- "columns": {
2315
- "id": {
2316
- "name": "id",
2317
- "type": "text",
2318
- "primaryKey": true,
2319
- "notNull": true
2320
- },
2321
- "workspace_id": {
2322
- "name": "workspace_id",
2323
- "type": "text",
2324
- "primaryKey": false,
2325
- "notNull": true
2326
- },
2327
- "initial_credits": {
2328
- "name": "initial_credits",
2329
- "type": "integer",
2330
- "primaryKey": false,
2331
- "notNull": true,
2332
- "default": 100000
2333
- },
2334
- "credits_used": {
2335
- "name": "credits_used",
2336
- "type": "integer",
2337
- "primaryKey": false,
2338
- "notNull": true,
2339
- "default": 0
2340
- },
2341
- "credits_remaining": {
2342
- "name": "credits_remaining",
2343
- "type": "integer",
2344
- "primaryKey": false,
2345
- "notNull": true,
2346
- "default": 100000
2347
- },
2348
- "status": {
2349
- "name": "status",
2350
- "type": "text",
2351
- "primaryKey": false,
2352
- "notNull": true,
2353
- "default": "'active'"
2354
- },
2355
- "provisioned_at": {
2356
- "name": "provisioned_at",
2357
- "type": "timestamp",
2358
- "primaryKey": false,
2359
- "notNull": true,
2360
- "default": "now()"
2361
- },
2362
- "trial_end_date": {
2363
- "name": "trial_end_date",
2364
- "type": "timestamp",
2365
- "primaryKey": false,
2366
- "notNull": false
2367
- },
2368
- "depleted_at": {
2369
- "name": "depleted_at",
2370
- "type": "timestamp",
2371
- "primaryKey": false,
2372
- "notNull": false
2373
- },
2374
- "converted_at": {
2375
- "name": "converted_at",
2376
- "type": "timestamp",
2377
- "primaryKey": false,
2378
- "notNull": false
2379
- },
2380
- "created_by_ip": {
2381
- "name": "created_by_ip",
2382
- "type": "text",
2383
- "primaryKey": false,
2384
- "notNull": false
2385
- },
2386
- "created_by_email": {
2387
- "name": "created_by_email",
2388
- "type": "text",
2389
- "primaryKey": false,
2390
- "notNull": false
2391
- }
2392
- },
2393
- "indexes": {
2394
- "trial_credits_expiry_idx": {
2395
- "name": "trial_credits_expiry_idx",
2396
- "columns": [
2397
- {
2398
- "expression": "status",
2399
- "isExpression": false,
2400
- "asc": true,
2401
- "nulls": "last"
2402
- },
2403
- {
2404
- "expression": "trial_end_date",
2405
- "isExpression": false,
2406
- "asc": true,
2407
- "nulls": "last"
2408
- }
2409
- ],
2410
- "isUnique": false,
2411
- "concurrently": false,
2412
- "method": "btree",
2413
- "with": {}
2414
- }
2415
- },
2416
- "foreignKeys": {
2417
- "trial_credits_workspace_id_organization_id_fk": {
2418
- "name": "trial_credits_workspace_id_organization_id_fk",
2419
- "tableFrom": "trial_credits",
2420
- "tableTo": "organization",
2421
- "columnsFrom": ["workspace_id"],
2422
- "columnsTo": ["id"],
2423
- "onDelete": "cascade",
2424
- "onUpdate": "no action"
2425
- }
2426
- },
2427
- "compositePrimaryKeys": {},
2428
- "uniqueConstraints": {
2429
- "trial_credits_workspace_id_unique": {
2430
- "name": "trial_credits_workspace_id_unique",
2431
- "nullsNotDistinct": false,
2432
- "columns": ["workspace_id"]
2433
- }
2434
- },
2435
- "policies": {},
2436
- "checkConstraints": {},
2437
- "isRLSEnabled": false
2438
- },
2439
- "public.usage_records": {
2440
- "name": "usage_records",
2441
- "schema": "",
2442
- "columns": {
2443
- "id": {
2444
- "name": "id",
2445
- "type": "text",
2446
- "primaryKey": true,
2447
- "notNull": true
2448
- },
2449
- "workspace_id": {
2450
- "name": "workspace_id",
2451
- "type": "text",
2452
- "primaryKey": false,
2453
- "notNull": true
2454
- },
2455
- "user_id": {
2456
- "name": "user_id",
2457
- "type": "text",
2458
- "primaryKey": false,
2459
- "notNull": true
2460
- },
2461
- "type": {
2462
- "name": "type",
2463
- "type": "text",
2464
- "primaryKey": false,
2465
- "notNull": true
2466
- },
2467
- "model": {
2468
- "name": "model",
2469
- "type": "text",
2470
- "primaryKey": false,
2471
- "notNull": false
2472
- },
2473
- "agent": {
2474
- "name": "agent",
2475
- "type": "text",
2476
- "primaryKey": false,
2477
- "notNull": false
2478
- },
2479
- "input_tokens": {
2480
- "name": "input_tokens",
2481
- "type": "integer",
2482
- "primaryKey": false,
2483
- "notNull": true,
2484
- "default": 0
2485
- },
2486
- "output_tokens": {
2487
- "name": "output_tokens",
2488
- "type": "integer",
2489
- "primaryKey": false,
2490
- "notNull": true,
2491
- "default": 0
2492
- },
2493
- "total_tokens": {
2494
- "name": "total_tokens",
2495
- "type": "integer",
2496
- "primaryKey": false,
2497
- "notNull": true,
2498
- "default": 0
2499
- },
2500
- "cost": {
2501
- "name": "cost",
2502
- "type": "real",
2503
- "primaryKey": false,
2504
- "notNull": true,
2505
- "default": 0
2506
- },
2507
- "metadata": {
2508
- "name": "metadata",
2509
- "type": "text",
2510
- "primaryKey": false,
2511
- "notNull": false
2512
- },
2513
- "recorded_at": {
2514
- "name": "recorded_at",
2515
- "type": "timestamp",
2516
- "primaryKey": false,
2517
- "notNull": true,
2518
- "default": "now()"
2519
- }
2520
- },
2521
- "indexes": {
2522
- "usage_records_workspace_id_idx": {
2523
- "name": "usage_records_workspace_id_idx",
2524
- "columns": [
2525
- {
2526
- "expression": "workspace_id",
2527
- "isExpression": false,
2528
- "asc": true,
2529
- "nulls": "last"
2530
- }
2531
- ],
2532
- "isUnique": false,
2533
- "concurrently": false,
2534
- "method": "btree",
2535
- "with": {}
2536
- },
2537
- "usage_records_workspace_recorded_at_idx": {
2538
- "name": "usage_records_workspace_recorded_at_idx",
2539
- "columns": [
2540
- {
2541
- "expression": "workspace_id",
2542
- "isExpression": false,
2543
- "asc": true,
2544
- "nulls": "last"
2545
- },
2546
- {
2547
- "expression": "recorded_at",
2548
- "isExpression": false,
2549
- "asc": true,
2550
- "nulls": "last"
2551
- }
2552
- ],
2553
- "isUnique": false,
2554
- "concurrently": false,
2555
- "method": "btree",
2556
- "with": {}
2557
- },
2558
- "usage_records_workspace_type_idx": {
2559
- "name": "usage_records_workspace_type_idx",
2560
- "columns": [
2561
- {
2562
- "expression": "workspace_id",
2563
- "isExpression": false,
2564
- "asc": true,
2565
- "nulls": "last"
2566
- },
2567
- {
2568
- "expression": "type",
2569
- "isExpression": false,
2570
- "asc": true,
2571
- "nulls": "last"
2572
- }
2573
- ],
2574
- "isUnique": false,
2575
- "concurrently": false,
2576
- "method": "btree",
2577
- "with": {}
2578
- }
2579
- },
2580
- "foreignKeys": {
2581
- "usage_records_workspace_id_organization_id_fk": {
2582
- "name": "usage_records_workspace_id_organization_id_fk",
2583
- "tableFrom": "usage_records",
2584
- "tableTo": "organization",
2585
- "columnsFrom": ["workspace_id"],
2586
- "columnsTo": ["id"],
2587
- "onDelete": "cascade",
2588
- "onUpdate": "no action"
2589
- },
2590
- "usage_records_user_id_users_id_fk": {
2591
- "name": "usage_records_user_id_users_id_fk",
2592
- "tableFrom": "usage_records",
2593
- "tableTo": "users",
2594
- "columnsFrom": ["user_id"],
2595
- "columnsTo": ["id"],
2596
- "onDelete": "cascade",
2597
- "onUpdate": "no action"
2598
- }
2599
- },
2600
- "compositePrimaryKeys": {},
2601
- "uniqueConstraints": {},
2602
- "policies": {},
2603
- "checkConstraints": {},
2604
- "isRLSEnabled": false
2605
- },
2606
- "public.notifications": {
2607
- "name": "notifications",
2608
- "schema": "",
2609
- "columns": {
2610
- "id": {
2611
- "name": "id",
2612
- "type": "text",
2613
- "primaryKey": true,
2614
- "notNull": true
2615
- },
2616
- "user_id": {
2617
- "name": "user_id",
2618
- "type": "text",
2619
- "primaryKey": false,
2620
- "notNull": true
2621
- },
2622
- "workspace_id": {
2623
- "name": "workspace_id",
2624
- "type": "text",
2625
- "primaryKey": false,
2626
- "notNull": false
2627
- },
2628
- "type": {
2629
- "name": "type",
2630
- "type": "text",
2631
- "primaryKey": false,
2632
- "notNull": true
2633
- },
2634
- "title": {
2635
- "name": "title",
2636
- "type": "text",
2637
- "primaryKey": false,
2638
- "notNull": true
2639
- },
2640
- "message": {
2641
- "name": "message",
2642
- "type": "text",
2643
- "primaryKey": false,
2644
- "notNull": true
2645
- },
2646
- "is_read": {
2647
- "name": "is_read",
2648
- "type": "boolean",
2649
- "primaryKey": false,
2650
- "notNull": true,
2651
- "default": false
2652
- },
2653
- "metadata": {
2654
- "name": "metadata",
2655
- "type": "text",
2656
- "primaryKey": false,
2657
- "notNull": false
2658
- },
2659
- "created_at": {
2660
- "name": "created_at",
2661
- "type": "timestamp",
2662
- "primaryKey": false,
2663
- "notNull": true,
2664
- "default": "now()"
2665
- }
2666
- },
2667
- "indexes": {
2668
- "notifications_user_id_idx": {
2669
- "name": "notifications_user_id_idx",
2670
- "columns": [
2671
- {
2672
- "expression": "user_id",
2673
- "isExpression": false,
2674
- "asc": true,
2675
- "nulls": "last"
2676
- }
2677
- ],
2678
- "isUnique": false,
2679
- "concurrently": false,
2680
- "method": "btree",
2681
- "with": {}
2682
- },
2683
- "notifications_user_id_is_read_idx": {
2684
- "name": "notifications_user_id_is_read_idx",
2685
- "columns": [
2686
- {
2687
- "expression": "user_id",
2688
- "isExpression": false,
2689
- "asc": true,
2690
- "nulls": "last"
2691
- },
2692
- {
2693
- "expression": "is_read",
2694
- "isExpression": false,
2695
- "asc": true,
2696
- "nulls": "last"
2697
- }
2698
- ],
2699
- "isUnique": false,
2700
- "concurrently": false,
2701
- "method": "btree",
2702
- "with": {}
2703
- },
2704
- "notifications_created_at_idx": {
2705
- "name": "notifications_created_at_idx",
2706
- "columns": [
2707
- {
2708
- "expression": "created_at",
2709
- "isExpression": false,
2710
- "asc": true,
2711
- "nulls": "last"
2712
- }
2713
- ],
2714
- "isUnique": false,
2715
- "concurrently": false,
2716
- "method": "btree",
2717
- "with": {}
2718
- }
2719
- },
2720
- "foreignKeys": {},
2721
- "compositePrimaryKeys": {},
2722
- "uniqueConstraints": {},
2723
- "policies": {},
2724
- "checkConstraints": {},
2725
- "isRLSEnabled": false
2726
- }
2727
- },
2728
- "enums": {},
2729
- "schemas": {},
2730
- "sequences": {},
2731
- "roles": {},
2732
- "policies": {},
2733
- "views": {},
2734
- "_meta": {
2735
- "columns": {},
2736
- "schemas": {},
2737
- "tables": {}
2738
- }
2739
- }