@aopslab/aops-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 (185) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +6 -0
  3. package/README.md +21 -0
  4. package/aops-server-runtime.json +11 -0
  5. package/build/client/_app/immutable/chunks/2_TffmqH.js +1 -0
  6. package/build/client/_app/immutable/chunks/3DOfIKW0.js +1 -0
  7. package/build/client/_app/immutable/chunks/B2EkC-sy.js +1 -0
  8. package/build/client/_app/immutable/chunks/CMkIcmi1.js +2 -0
  9. package/build/client/_app/immutable/chunks/rqnVXeyB.js +1 -0
  10. package/build/client/_app/immutable/chunks/sZYZbj9W.js +1 -0
  11. package/build/client/_app/immutable/chunks/wbPk3Yxo.js +81 -0
  12. package/build/client/_app/immutable/entry/app.C7STLTX8.js +2 -0
  13. package/build/client/_app/immutable/entry/start.BC94hOaC.js +1 -0
  14. package/build/client/_app/immutable/nodes/0.BYBfjxZ5.js +1 -0
  15. package/build/client/_app/immutable/nodes/1.BNXFXajG.js +1 -0
  16. package/build/client/_app/version.json +1 -0
  17. package/build/env.js +70 -0
  18. package/build/env.js.map +1 -0
  19. package/build/handler.js +16 -0
  20. package/build/handler.js.map +1 -0
  21. package/build/index.js +139 -0
  22. package/build/index.js.map +1 -0
  23. package/build/server/chunks/0-RfB6m2nq.js +7 -0
  24. package/build/server/chunks/0-RfB6m2nq.js.map +1 -0
  25. package/build/server/chunks/1-_gg8Q0UT.js +9 -0
  26. package/build/server/chunks/1-_gg8Q0UT.js.map +1 -0
  27. package/build/server/chunks/_server.ts-6276EQIF.js +44 -0
  28. package/build/server/chunks/_server.ts-6276EQIF.js.map +1 -0
  29. package/build/server/chunks/_server.ts-B59WFQzX.js +174 -0
  30. package/build/server/chunks/_server.ts-B59WFQzX.js.map +1 -0
  31. package/build/server/chunks/_server.ts-BauJsLZI.js +40 -0
  32. package/build/server/chunks/_server.ts-BauJsLZI.js.map +1 -0
  33. package/build/server/chunks/_server.ts-BnGzJw2-.js +81 -0
  34. package/build/server/chunks/_server.ts-BnGzJw2-.js.map +1 -0
  35. package/build/server/chunks/_server.ts-CP7qM24V.js +34 -0
  36. package/build/server/chunks/_server.ts-CP7qM24V.js.map +1 -0
  37. package/build/server/chunks/_server.ts-Cbq_u99d.js +9 -0
  38. package/build/server/chunks/_server.ts-Cbq_u99d.js.map +1 -0
  39. package/build/server/chunks/_server.ts-Ch8fPT-o.js +92 -0
  40. package/build/server/chunks/_server.ts-Ch8fPT-o.js.map +1 -0
  41. package/build/server/chunks/_server.ts-Cv-yaXZI.js +7 -0
  42. package/build/server/chunks/_server.ts-Cv-yaXZI.js.map +1 -0
  43. package/build/server/chunks/_server.ts-D6lBwOON.js +34 -0
  44. package/build/server/chunks/_server.ts-D6lBwOON.js.map +1 -0
  45. package/build/server/chunks/_server.ts-D84K3pp9.js +11 -0
  46. package/build/server/chunks/_server.ts-D84K3pp9.js.map +1 -0
  47. package/build/server/chunks/_server.ts-DNzU1ToA.js +277 -0
  48. package/build/server/chunks/_server.ts-DNzU1ToA.js.map +1 -0
  49. package/build/server/chunks/_server.ts-DQQnw77t.js +17 -0
  50. package/build/server/chunks/_server.ts-DQQnw77t.js.map +1 -0
  51. package/build/server/chunks/_server.ts-DSxr5l15.js +18 -0
  52. package/build/server/chunks/_server.ts-DSxr5l15.js.map +1 -0
  53. package/build/server/chunks/_server.ts-DZYokvuR.js +80 -0
  54. package/build/server/chunks/_server.ts-DZYokvuR.js.map +1 -0
  55. package/build/server/chunks/_server.ts-Dcqwpz2t.js +144 -0
  56. package/build/server/chunks/_server.ts-Dcqwpz2t.js.map +1 -0
  57. package/build/server/chunks/_server.ts-Di9VJnF4.js +81 -0
  58. package/build/server/chunks/_server.ts-Di9VJnF4.js.map +1 -0
  59. package/build/server/chunks/_server.ts-FBEHFT8b.js +33 -0
  60. package/build/server/chunks/_server.ts-FBEHFT8b.js.map +1 -0
  61. package/build/server/chunks/_server.ts-gZytCuiJ.js +10 -0
  62. package/build/server/chunks/_server.ts-gZytCuiJ.js.map +1 -0
  63. package/build/server/chunks/_server.ts-tNULLyEO.js +261 -0
  64. package/build/server/chunks/_server.ts-tNULLyEO.js.map +1 -0
  65. package/build/server/chunks/agent-gateway-runtime-DTZ4SxaC.js +2598 -0
  66. package/build/server/chunks/agent-gateway-runtime-DTZ4SxaC.js.map +1 -0
  67. package/build/server/chunks/aops-runtime-config-wpVmg7T-.js +179 -0
  68. package/build/server/chunks/aops-runtime-config-wpVmg7T-.js.map +1 -0
  69. package/build/server/chunks/discovery-D9JnSgfu.js +894 -0
  70. package/build/server/chunks/discovery-D9JnSgfu.js.map +1 -0
  71. package/build/server/chunks/error.svelte-DgUOqi-L.js +45 -0
  72. package/build/server/chunks/error.svelte-DgUOqi-L.js.map +1 -0
  73. package/build/server/chunks/handler-BN3-p5rP.js +1733 -0
  74. package/build/server/chunks/handler-BN3-p5rP.js.map +1 -0
  75. package/build/server/chunks/hooks.server-C4wxiH5m.js +52 -0
  76. package/build/server/chunks/hooks.server-C4wxiH5m.js.map +1 -0
  77. package/build/server/chunks/index.js-nbqdVuWC.js +10698 -0
  78. package/build/server/chunks/index.js-nbqdVuWC.js.map +1 -0
  79. package/build/server/chunks/manifest.js-_Re-Wj-y.js +167 -0
  80. package/build/server/chunks/manifest.js-_Re-Wj-y.js.map +1 -0
  81. package/build/server/chunks/plugin-error-normalize-Bq14Qbz3.js +297 -0
  82. package/build/server/chunks/plugin-error-normalize-Bq14Qbz3.js.map +1 -0
  83. package/build/server/chunks/project-alias-DqE2v58Q.js +29 -0
  84. package/build/server/chunks/project-alias-DqE2v58Q.js.map +1 -0
  85. package/build/server/chunks/registry-5amIZito.js +289 -0
  86. package/build/server/chunks/registry-5amIZito.js.map +1 -0
  87. package/build/server/chunks/request-base-url-BDdrsaga.js +24 -0
  88. package/build/server/chunks/request-base-url-BDdrsaga.js.map +1 -0
  89. package/build/server/chunks/request-context-tNeFQjgb.js +422 -0
  90. package/build/server/chunks/request-context-tNeFQjgb.js.map +1 -0
  91. package/build/server/chunks/xf-result-BRDjvftr.js +17 -0
  92. package/build/server/chunks/xf-result-BRDjvftr.js.map +1 -0
  93. package/build/shims.js +33 -0
  94. package/build/shims.js.map +1 -0
  95. package/cockpit/.vite/manifest.json +198 -0
  96. package/cockpit/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
  97. package/cockpit/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
  98. package/cockpit/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
  99. package/cockpit/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
  100. package/cockpit/assets/dm-sans-latin-700-normal-CUSSCpQX.woff +0 -0
  101. package/cockpit/assets/dm-sans-latin-700-normal-DvUfVpUG.woff2 +0 -0
  102. package/cockpit/assets/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
  103. package/cockpit/assets/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
  104. package/cockpit/assets/dm-sans-latin-ext-500-normal-BJfUCQsA.woff2 +0 -0
  105. package/cockpit/assets/dm-sans-latin-ext-500-normal-DR84L5F-.woff +0 -0
  106. package/cockpit/assets/dm-sans-latin-ext-700-normal-BLI3TTWz.woff +0 -0
  107. package/cockpit/assets/dm-sans-latin-ext-700-normal-CJIcxD6K.woff2 +0 -0
  108. package/cockpit/assets/index-DDswO4B1.css +1 -0
  109. package/cockpit/assets/index-bovtnZ98.js +18 -0
  110. package/cockpit/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  111. package/cockpit/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  112. package/cockpit/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  113. package/cockpit/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  114. package/cockpit/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  115. package/cockpit/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  116. package/cockpit/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  117. package/cockpit/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  118. package/cockpit/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  119. package/cockpit/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
  120. package/cockpit/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
  121. package/cockpit/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
  122. package/cockpit/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
  123. package/cockpit/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
  124. package/cockpit/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
  125. package/cockpit/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
  126. package/cockpit/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
  127. package/cockpit/assets/unbounded-cyrillic-600-normal-B-s5c2Kn.woff +0 -0
  128. package/cockpit/assets/unbounded-cyrillic-600-normal-DW6uzIMB.woff2 +0 -0
  129. package/cockpit/assets/unbounded-latin-600-normal-BPdB_PEv.woff +0 -0
  130. package/cockpit/assets/unbounded-latin-600-normal-oRSANpZr.woff2 +0 -0
  131. package/cockpit/assets/unbounded-latin-ext-600-normal-0iZLtTDV.woff2 +0 -0
  132. package/cockpit/assets/unbounded-latin-ext-600-normal-ClMPf-bu.woff +0 -0
  133. package/cockpit/assets/unbounded-vietnamese-600-normal-BzfrgZ_C.woff +0 -0
  134. package/cockpit/assets/unbounded-vietnamese-600-normal-Cx2bTSHN.woff2 +0 -0
  135. package/cockpit/community.module-inventory.json +2389 -0
  136. package/cockpit/index.html +14 -0
  137. package/community-postgres.json +13 -0
  138. package/migrations/agentspace/0000_thin_carlie_cooper.sql +764 -0
  139. package/migrations/agentspace/meta/0000_snapshot.json +6885 -0
  140. package/migrations/agentspace/meta/_journal.json +13 -0
  141. package/migrations/chatv3/0000_dry_ego.sql +218 -0
  142. package/migrations/chatv3/0001_nosy_obadiah_stane.sql +35 -0
  143. package/migrations/chatv3/0002_narrow_darkhawk.sql +4 -0
  144. package/migrations/chatv3/0003_damp_zarek.sql +2 -0
  145. package/migrations/chatv3/0004_nervous_martin_li.sql +60 -0
  146. package/migrations/chatv3/0005_chatv3_server_encrypted_mode.sql +1 -0
  147. package/migrations/chatv3/meta/0000_snapshot.json +1887 -0
  148. package/migrations/chatv3/meta/0001_snapshot.json +2175 -0
  149. package/migrations/chatv3/meta/0002_snapshot.json +2229 -0
  150. package/migrations/chatv3/meta/0003_snapshot.json +2241 -0
  151. package/migrations/chatv3/meta/0004_snapshot.json +2746 -0
  152. package/migrations/chatv3/meta/_journal.json +48 -0
  153. package/migrations/docman/0000_curvy_valeria_richards.sql +257 -0
  154. package/migrations/docman/0001_massive_risque.sql +2 -0
  155. package/migrations/docman/0002_simple_logan.sql +50 -0
  156. package/migrations/docman/0003_quick_index.sql +45 -0
  157. package/migrations/docman/0004_known_summary.sql +9 -0
  158. package/migrations/docman/0005_vector_signal.sql +9 -0
  159. package/migrations/docman/0006_document_version_current_invariant.sql +15 -0
  160. package/migrations/docman/meta/_journal.json +55 -0
  161. package/migrations/projectman/0000_smooth_klaw.sql +257 -0
  162. package/migrations/projectman/0001_worthless_zodiak.sql +9 -0
  163. package/migrations/projectman/0002_board_rename.sql +108 -0
  164. package/migrations/projectman/0003_review_request.sql +62 -0
  165. package/migrations/projectman/0004_review_request_idempotency.sql +3 -0
  166. package/migrations/projectman/0005_allow_multi_sprint_per_task.sql +1 -0
  167. package/migrations/projectman/meta/_journal.json +48 -0
  168. package/migrations/sys/0000_loose_praxagora.sql +31 -0
  169. package/migrations/sys/0001_awesome_ronan.sql +2 -0
  170. package/migrations/sys/0002_steady_maximus.sql +2 -0
  171. package/migrations/sys/0003_escalating_rate_limiter.sql +2 -0
  172. package/migrations/sys/0004_rate_limiter_timestamptz.sql +22 -0
  173. package/migrations/sys/0005_sys_counters.sql +21 -0
  174. package/migrations/sys/meta/_journal.json +48 -0
  175. package/npm-shrinkwrap.json +4375 -0
  176. package/package.json +62 -0
  177. package/runtime/agentspace-host-adapter.mjs +64 -0
  178. package/runtime/agentspace-tooling.mjs +389 -0
  179. package/runtime/docman-host-adapter.mjs +177 -0
  180. package/runtime/docman-policy.mjs +450 -0
  181. package/runtime/docman-tooling.mjs +20 -0
  182. package/runtime/projectman-host-adapter.mjs +597 -0
  183. package/runtime/scope-context.mjs +99 -0
  184. package/scripts/community-host.mjs +626 -0
  185. package/scripts/community-migration-policy-v1.json +296 -0
@@ -0,0 +1,2746 @@
1
+ {
2
+ "id": "80c181b3-f82a-479b-9676-0c62c7a154c5",
3
+ "prevId": "f065931a-51d7-4236-8c4b-a5cc06afc629",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.chatv3-spaces": {
8
+ "name": "chatv3-spaces",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "tenantId": {
19
+ "name": "tenantId",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "default": "'default'"
24
+ },
25
+ "slug": {
26
+ "name": "slug",
27
+ "type": "text",
28
+ "primaryKey": false,
29
+ "notNull": true
30
+ },
31
+ "title": {
32
+ "name": "title",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true
36
+ },
37
+ "description": {
38
+ "name": "description",
39
+ "type": "text",
40
+ "primaryKey": false,
41
+ "notNull": false
42
+ },
43
+ "externalRefs": {
44
+ "name": "externalRefs",
45
+ "type": "jsonb",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "'[]'::jsonb"
49
+ },
50
+ "status": {
51
+ "name": "status",
52
+ "type": "text",
53
+ "primaryKey": false,
54
+ "notNull": true,
55
+ "default": "'active'"
56
+ },
57
+ "createdBy": {
58
+ "name": "createdBy",
59
+ "type": "text",
60
+ "primaryKey": false,
61
+ "notNull": false
62
+ },
63
+ "updatedBy": {
64
+ "name": "updatedBy",
65
+ "type": "text",
66
+ "primaryKey": false,
67
+ "notNull": false
68
+ },
69
+ "createdAt": {
70
+ "name": "createdAt",
71
+ "type": "timestamp with time zone",
72
+ "primaryKey": false,
73
+ "notNull": true,
74
+ "default": "now()"
75
+ },
76
+ "updatedAt": {
77
+ "name": "updatedAt",
78
+ "type": "timestamp with time zone",
79
+ "primaryKey": false,
80
+ "notNull": true,
81
+ "default": "now()"
82
+ }
83
+ },
84
+ "indexes": {
85
+ "chatv3_space_tenant_slug_unique": {
86
+ "name": "chatv3_space_tenant_slug_unique",
87
+ "columns": [
88
+ {
89
+ "expression": "tenantId",
90
+ "isExpression": false,
91
+ "asc": true,
92
+ "nulls": "last"
93
+ },
94
+ {
95
+ "expression": "slug",
96
+ "isExpression": false,
97
+ "asc": true,
98
+ "nulls": "last"
99
+ }
100
+ ],
101
+ "isUnique": true,
102
+ "concurrently": false,
103
+ "method": "btree",
104
+ "with": {}
105
+ },
106
+ "chatv3_space_idx_tenant_status": {
107
+ "name": "chatv3_space_idx_tenant_status",
108
+ "columns": [
109
+ {
110
+ "expression": "tenantId",
111
+ "isExpression": false,
112
+ "asc": true,
113
+ "nulls": "last"
114
+ },
115
+ {
116
+ "expression": "status",
117
+ "isExpression": false,
118
+ "asc": true,
119
+ "nulls": "last"
120
+ }
121
+ ],
122
+ "isUnique": false,
123
+ "concurrently": false,
124
+ "method": "btree",
125
+ "with": {}
126
+ }
127
+ },
128
+ "foreignKeys": {},
129
+ "compositePrimaryKeys": {},
130
+ "uniqueConstraints": {},
131
+ "policies": {},
132
+ "checkConstraints": {},
133
+ "isRLSEnabled": false
134
+ },
135
+ "public.chatv3-channels": {
136
+ "name": "chatv3-channels",
137
+ "schema": "",
138
+ "columns": {
139
+ "id": {
140
+ "name": "id",
141
+ "type": "uuid",
142
+ "primaryKey": true,
143
+ "notNull": true,
144
+ "default": "gen_random_uuid()"
145
+ },
146
+ "tenantId": {
147
+ "name": "tenantId",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": true,
151
+ "default": "'default'"
152
+ },
153
+ "spaceId": {
154
+ "name": "spaceId",
155
+ "type": "uuid",
156
+ "primaryKey": false,
157
+ "notNull": true
158
+ },
159
+ "slug": {
160
+ "name": "slug",
161
+ "type": "text",
162
+ "primaryKey": false,
163
+ "notNull": true
164
+ },
165
+ "title": {
166
+ "name": "title",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true
170
+ },
171
+ "purpose": {
172
+ "name": "purpose",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": false
176
+ },
177
+ "guidanceMarkdown": {
178
+ "name": "guidanceMarkdown",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false
182
+ },
183
+ "status": {
184
+ "name": "status",
185
+ "type": "text",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "default": "'active'"
189
+ },
190
+ "generalRoomId": {
191
+ "name": "generalRoomId",
192
+ "type": "uuid",
193
+ "primaryKey": false,
194
+ "notNull": false
195
+ },
196
+ "createdBy": {
197
+ "name": "createdBy",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": false
201
+ },
202
+ "updatedBy": {
203
+ "name": "updatedBy",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": false
207
+ },
208
+ "ownerUserId": {
209
+ "name": "ownerUserId",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": false
213
+ },
214
+ "createdAt": {
215
+ "name": "createdAt",
216
+ "type": "timestamp with time zone",
217
+ "primaryKey": false,
218
+ "notNull": true,
219
+ "default": "now()"
220
+ },
221
+ "updatedAt": {
222
+ "name": "updatedAt",
223
+ "type": "timestamp with time zone",
224
+ "primaryKey": false,
225
+ "notNull": true,
226
+ "default": "now()"
227
+ },
228
+ "archivedAt": {
229
+ "name": "archivedAt",
230
+ "type": "timestamp with time zone",
231
+ "primaryKey": false,
232
+ "notNull": false
233
+ }
234
+ },
235
+ "indexes": {
236
+ "chatv3_channel_tenant_space_slug_unique": {
237
+ "name": "chatv3_channel_tenant_space_slug_unique",
238
+ "columns": [
239
+ {
240
+ "expression": "tenantId",
241
+ "isExpression": false,
242
+ "asc": true,
243
+ "nulls": "last"
244
+ },
245
+ {
246
+ "expression": "spaceId",
247
+ "isExpression": false,
248
+ "asc": true,
249
+ "nulls": "last"
250
+ },
251
+ {
252
+ "expression": "slug",
253
+ "isExpression": false,
254
+ "asc": true,
255
+ "nulls": "last"
256
+ }
257
+ ],
258
+ "isUnique": true,
259
+ "concurrently": false,
260
+ "method": "btree",
261
+ "with": {}
262
+ },
263
+ "chatv3_channel_idx_tenant_space_status": {
264
+ "name": "chatv3_channel_idx_tenant_space_status",
265
+ "columns": [
266
+ {
267
+ "expression": "tenantId",
268
+ "isExpression": false,
269
+ "asc": true,
270
+ "nulls": "last"
271
+ },
272
+ {
273
+ "expression": "spaceId",
274
+ "isExpression": false,
275
+ "asc": true,
276
+ "nulls": "last"
277
+ },
278
+ {
279
+ "expression": "status",
280
+ "isExpression": false,
281
+ "asc": true,
282
+ "nulls": "last"
283
+ }
284
+ ],
285
+ "isUnique": false,
286
+ "concurrently": false,
287
+ "method": "btree",
288
+ "with": {}
289
+ },
290
+ "chatv3_channel_idx_tenant_owner": {
291
+ "name": "chatv3_channel_idx_tenant_owner",
292
+ "columns": [
293
+ {
294
+ "expression": "tenantId",
295
+ "isExpression": false,
296
+ "asc": true,
297
+ "nulls": "last"
298
+ },
299
+ {
300
+ "expression": "ownerUserId",
301
+ "isExpression": false,
302
+ "asc": true,
303
+ "nulls": "last"
304
+ }
305
+ ],
306
+ "isUnique": false,
307
+ "concurrently": false,
308
+ "method": "btree",
309
+ "with": {}
310
+ }
311
+ },
312
+ "foreignKeys": {
313
+ "chatv3-channels_spaceId_chatv3-spaces_id_fk": {
314
+ "name": "chatv3-channels_spaceId_chatv3-spaces_id_fk",
315
+ "tableFrom": "chatv3-channels",
316
+ "tableTo": "chatv3-spaces",
317
+ "columnsFrom": [
318
+ "spaceId"
319
+ ],
320
+ "columnsTo": [
321
+ "id"
322
+ ],
323
+ "onDelete": "cascade",
324
+ "onUpdate": "no action"
325
+ }
326
+ },
327
+ "compositePrimaryKeys": {},
328
+ "uniqueConstraints": {},
329
+ "policies": {},
330
+ "checkConstraints": {},
331
+ "isRLSEnabled": false
332
+ },
333
+ "public.chatv3-rooms": {
334
+ "name": "chatv3-rooms",
335
+ "schema": "",
336
+ "columns": {
337
+ "id": {
338
+ "name": "id",
339
+ "type": "uuid",
340
+ "primaryKey": true,
341
+ "notNull": true,
342
+ "default": "gen_random_uuid()"
343
+ },
344
+ "tenantId": {
345
+ "name": "tenantId",
346
+ "type": "text",
347
+ "primaryKey": false,
348
+ "notNull": true,
349
+ "default": "'default'"
350
+ },
351
+ "channelId": {
352
+ "name": "channelId",
353
+ "type": "uuid",
354
+ "primaryKey": false,
355
+ "notNull": true
356
+ },
357
+ "slug": {
358
+ "name": "slug",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": true
362
+ },
363
+ "title": {
364
+ "name": "title",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "kind": {
370
+ "name": "kind",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true,
374
+ "default": "'session'"
375
+ },
376
+ "purpose": {
377
+ "name": "purpose",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": false
381
+ },
382
+ "guidanceMarkdown": {
383
+ "name": "guidanceMarkdown",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": false
387
+ },
388
+ "status": {
389
+ "name": "status",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true,
393
+ "default": "'active'"
394
+ },
395
+ "lastSeq": {
396
+ "name": "lastSeq",
397
+ "type": "integer",
398
+ "primaryKey": false,
399
+ "notNull": true,
400
+ "default": 0
401
+ },
402
+ "lastMessageAt": {
403
+ "name": "lastMessageAt",
404
+ "type": "timestamp with time zone",
405
+ "primaryKey": false,
406
+ "notNull": false
407
+ },
408
+ "currentEpoch": {
409
+ "name": "currentEpoch",
410
+ "type": "integer",
411
+ "primaryKey": false,
412
+ "notNull": true,
413
+ "default": 0
414
+ },
415
+ "createdBy": {
416
+ "name": "createdBy",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": false
420
+ },
421
+ "updatedBy": {
422
+ "name": "updatedBy",
423
+ "type": "text",
424
+ "primaryKey": false,
425
+ "notNull": false
426
+ },
427
+ "createdAt": {
428
+ "name": "createdAt",
429
+ "type": "timestamp with time zone",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "default": "now()"
433
+ },
434
+ "updatedAt": {
435
+ "name": "updatedAt",
436
+ "type": "timestamp with time zone",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "default": "now()"
440
+ },
441
+ "archivedAt": {
442
+ "name": "archivedAt",
443
+ "type": "timestamp with time zone",
444
+ "primaryKey": false,
445
+ "notNull": false
446
+ }
447
+ },
448
+ "indexes": {
449
+ "chatv3_room_tenant_channel_slug_unique": {
450
+ "name": "chatv3_room_tenant_channel_slug_unique",
451
+ "columns": [
452
+ {
453
+ "expression": "tenantId",
454
+ "isExpression": false,
455
+ "asc": true,
456
+ "nulls": "last"
457
+ },
458
+ {
459
+ "expression": "channelId",
460
+ "isExpression": false,
461
+ "asc": true,
462
+ "nulls": "last"
463
+ },
464
+ {
465
+ "expression": "slug",
466
+ "isExpression": false,
467
+ "asc": true,
468
+ "nulls": "last"
469
+ }
470
+ ],
471
+ "isUnique": true,
472
+ "concurrently": false,
473
+ "method": "btree",
474
+ "with": {}
475
+ },
476
+ "chatv3_room_idx_tenant_channel_status": {
477
+ "name": "chatv3_room_idx_tenant_channel_status",
478
+ "columns": [
479
+ {
480
+ "expression": "tenantId",
481
+ "isExpression": false,
482
+ "asc": true,
483
+ "nulls": "last"
484
+ },
485
+ {
486
+ "expression": "channelId",
487
+ "isExpression": false,
488
+ "asc": true,
489
+ "nulls": "last"
490
+ },
491
+ {
492
+ "expression": "status",
493
+ "isExpression": false,
494
+ "asc": true,
495
+ "nulls": "last"
496
+ }
497
+ ],
498
+ "isUnique": false,
499
+ "concurrently": false,
500
+ "method": "btree",
501
+ "with": {}
502
+ },
503
+ "chatv3_room_idx_tenant_last_message": {
504
+ "name": "chatv3_room_idx_tenant_last_message",
505
+ "columns": [
506
+ {
507
+ "expression": "tenantId",
508
+ "isExpression": false,
509
+ "asc": true,
510
+ "nulls": "last"
511
+ },
512
+ {
513
+ "expression": "lastMessageAt",
514
+ "isExpression": false,
515
+ "asc": true,
516
+ "nulls": "last"
517
+ }
518
+ ],
519
+ "isUnique": false,
520
+ "concurrently": false,
521
+ "method": "btree",
522
+ "with": {}
523
+ }
524
+ },
525
+ "foreignKeys": {
526
+ "chatv3-rooms_channelId_chatv3-channels_id_fk": {
527
+ "name": "chatv3-rooms_channelId_chatv3-channels_id_fk",
528
+ "tableFrom": "chatv3-rooms",
529
+ "tableTo": "chatv3-channels",
530
+ "columnsFrom": [
531
+ "channelId"
532
+ ],
533
+ "columnsTo": [
534
+ "id"
535
+ ],
536
+ "onDelete": "cascade",
537
+ "onUpdate": "no action"
538
+ }
539
+ },
540
+ "compositePrimaryKeys": {},
541
+ "uniqueConstraints": {},
542
+ "policies": {},
543
+ "checkConstraints": {},
544
+ "isRLSEnabled": false
545
+ },
546
+ "public.chatv3-members": {
547
+ "name": "chatv3-members",
548
+ "schema": "",
549
+ "columns": {
550
+ "id": {
551
+ "name": "id",
552
+ "type": "uuid",
553
+ "primaryKey": true,
554
+ "notNull": true,
555
+ "default": "gen_random_uuid()"
556
+ },
557
+ "tenantId": {
558
+ "name": "tenantId",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": true,
562
+ "default": "'default'"
563
+ },
564
+ "channelId": {
565
+ "name": "channelId",
566
+ "type": "uuid",
567
+ "primaryKey": false,
568
+ "notNull": true
569
+ },
570
+ "handle": {
571
+ "name": "handle",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true
575
+ },
576
+ "displayName": {
577
+ "name": "displayName",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": false
581
+ },
582
+ "actorKind": {
583
+ "name": "actorKind",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "default": "'agent'"
588
+ },
589
+ "roleKey": {
590
+ "name": "roleKey",
591
+ "type": "text",
592
+ "primaryKey": false,
593
+ "notNull": true,
594
+ "default": "'member'"
595
+ },
596
+ "status": {
597
+ "name": "status",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": true,
601
+ "default": "'active'"
602
+ },
603
+ "tokenHash": {
604
+ "name": "tokenHash",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "joinedViaKeyId": {
610
+ "name": "joinedViaKeyId",
611
+ "type": "uuid",
612
+ "primaryKey": false,
613
+ "notNull": false
614
+ },
615
+ "userId": {
616
+ "name": "userId",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false
620
+ },
621
+ "lastSeenAt": {
622
+ "name": "lastSeenAt",
623
+ "type": "timestamp with time zone",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "joinedAt": {
628
+ "name": "joinedAt",
629
+ "type": "timestamp with time zone",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "default": "now()"
633
+ },
634
+ "removedAt": {
635
+ "name": "removedAt",
636
+ "type": "timestamp with time zone",
637
+ "primaryKey": false,
638
+ "notNull": false
639
+ },
640
+ "updatedAt": {
641
+ "name": "updatedAt",
642
+ "type": "timestamp with time zone",
643
+ "primaryKey": false,
644
+ "notNull": true,
645
+ "default": "now()"
646
+ }
647
+ },
648
+ "indexes": {
649
+ "chatv3_member_tenant_channel_handle_unique": {
650
+ "name": "chatv3_member_tenant_channel_handle_unique",
651
+ "columns": [
652
+ {
653
+ "expression": "tenantId",
654
+ "isExpression": false,
655
+ "asc": true,
656
+ "nulls": "last"
657
+ },
658
+ {
659
+ "expression": "channelId",
660
+ "isExpression": false,
661
+ "asc": true,
662
+ "nulls": "last"
663
+ },
664
+ {
665
+ "expression": "handle",
666
+ "isExpression": false,
667
+ "asc": true,
668
+ "nulls": "last"
669
+ }
670
+ ],
671
+ "isUnique": true,
672
+ "concurrently": false,
673
+ "method": "btree",
674
+ "with": {}
675
+ },
676
+ "chatv3_member_idx_tenant_channel_status": {
677
+ "name": "chatv3_member_idx_tenant_channel_status",
678
+ "columns": [
679
+ {
680
+ "expression": "tenantId",
681
+ "isExpression": false,
682
+ "asc": true,
683
+ "nulls": "last"
684
+ },
685
+ {
686
+ "expression": "channelId",
687
+ "isExpression": false,
688
+ "asc": true,
689
+ "nulls": "last"
690
+ },
691
+ {
692
+ "expression": "status",
693
+ "isExpression": false,
694
+ "asc": true,
695
+ "nulls": "last"
696
+ }
697
+ ],
698
+ "isUnique": false,
699
+ "concurrently": false,
700
+ "method": "btree",
701
+ "with": {}
702
+ },
703
+ "chatv3_member_idx_tenant_user": {
704
+ "name": "chatv3_member_idx_tenant_user",
705
+ "columns": [
706
+ {
707
+ "expression": "tenantId",
708
+ "isExpression": false,
709
+ "asc": true,
710
+ "nulls": "last"
711
+ },
712
+ {
713
+ "expression": "userId",
714
+ "isExpression": false,
715
+ "asc": true,
716
+ "nulls": "last"
717
+ }
718
+ ],
719
+ "isUnique": false,
720
+ "concurrently": false,
721
+ "method": "btree",
722
+ "with": {}
723
+ }
724
+ },
725
+ "foreignKeys": {
726
+ "chatv3-members_channelId_chatv3-channels_id_fk": {
727
+ "name": "chatv3-members_channelId_chatv3-channels_id_fk",
728
+ "tableFrom": "chatv3-members",
729
+ "tableTo": "chatv3-channels",
730
+ "columnsFrom": [
731
+ "channelId"
732
+ ],
733
+ "columnsTo": [
734
+ "id"
735
+ ],
736
+ "onDelete": "cascade",
737
+ "onUpdate": "no action"
738
+ }
739
+ },
740
+ "compositePrimaryKeys": {},
741
+ "uniqueConstraints": {},
742
+ "policies": {},
743
+ "checkConstraints": {},
744
+ "isRLSEnabled": false
745
+ },
746
+ "public.chatv3-room-cursors": {
747
+ "name": "chatv3-room-cursors",
748
+ "schema": "",
749
+ "columns": {
750
+ "id": {
751
+ "name": "id",
752
+ "type": "uuid",
753
+ "primaryKey": true,
754
+ "notNull": true,
755
+ "default": "gen_random_uuid()"
756
+ },
757
+ "tenantId": {
758
+ "name": "tenantId",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": true,
762
+ "default": "'default'"
763
+ },
764
+ "roomId": {
765
+ "name": "roomId",
766
+ "type": "uuid",
767
+ "primaryKey": false,
768
+ "notNull": true
769
+ },
770
+ "memberId": {
771
+ "name": "memberId",
772
+ "type": "uuid",
773
+ "primaryKey": false,
774
+ "notNull": true
775
+ },
776
+ "lastReadSeq": {
777
+ "name": "lastReadSeq",
778
+ "type": "integer",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "default": 0
782
+ },
783
+ "deliveredSeq": {
784
+ "name": "deliveredSeq",
785
+ "type": "integer",
786
+ "primaryKey": false,
787
+ "notNull": true,
788
+ "default": 0
789
+ },
790
+ "ackSeq": {
791
+ "name": "ackSeq",
792
+ "type": "integer",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "default": 0
796
+ },
797
+ "lastReadAt": {
798
+ "name": "lastReadAt",
799
+ "type": "timestamp with time zone",
800
+ "primaryKey": false,
801
+ "notNull": false
802
+ },
803
+ "updatedAt": {
804
+ "name": "updatedAt",
805
+ "type": "timestamp with time zone",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "default": "now()"
809
+ }
810
+ },
811
+ "indexes": {
812
+ "chatv3_room_cursor_room_member_unique": {
813
+ "name": "chatv3_room_cursor_room_member_unique",
814
+ "columns": [
815
+ {
816
+ "expression": "roomId",
817
+ "isExpression": false,
818
+ "asc": true,
819
+ "nulls": "last"
820
+ },
821
+ {
822
+ "expression": "memberId",
823
+ "isExpression": false,
824
+ "asc": true,
825
+ "nulls": "last"
826
+ }
827
+ ],
828
+ "isUnique": true,
829
+ "concurrently": false,
830
+ "method": "btree",
831
+ "with": {}
832
+ },
833
+ "chatv3_room_cursor_idx_member": {
834
+ "name": "chatv3_room_cursor_idx_member",
835
+ "columns": [
836
+ {
837
+ "expression": "tenantId",
838
+ "isExpression": false,
839
+ "asc": true,
840
+ "nulls": "last"
841
+ },
842
+ {
843
+ "expression": "memberId",
844
+ "isExpression": false,
845
+ "asc": true,
846
+ "nulls": "last"
847
+ }
848
+ ],
849
+ "isUnique": false,
850
+ "concurrently": false,
851
+ "method": "btree",
852
+ "with": {}
853
+ }
854
+ },
855
+ "foreignKeys": {
856
+ "chatv3-room-cursors_roomId_chatv3-rooms_id_fk": {
857
+ "name": "chatv3-room-cursors_roomId_chatv3-rooms_id_fk",
858
+ "tableFrom": "chatv3-room-cursors",
859
+ "tableTo": "chatv3-rooms",
860
+ "columnsFrom": [
861
+ "roomId"
862
+ ],
863
+ "columnsTo": [
864
+ "id"
865
+ ],
866
+ "onDelete": "cascade",
867
+ "onUpdate": "no action"
868
+ },
869
+ "chatv3-room-cursors_memberId_chatv3-members_id_fk": {
870
+ "name": "chatv3-room-cursors_memberId_chatv3-members_id_fk",
871
+ "tableFrom": "chatv3-room-cursors",
872
+ "tableTo": "chatv3-members",
873
+ "columnsFrom": [
874
+ "memberId"
875
+ ],
876
+ "columnsTo": [
877
+ "id"
878
+ ],
879
+ "onDelete": "cascade",
880
+ "onUpdate": "no action"
881
+ }
882
+ },
883
+ "compositePrimaryKeys": {},
884
+ "uniqueConstraints": {},
885
+ "policies": {},
886
+ "checkConstraints": {},
887
+ "isRLSEnabled": false
888
+ },
889
+ "public.chatv3-access-keys": {
890
+ "name": "chatv3-access-keys",
891
+ "schema": "",
892
+ "columns": {
893
+ "id": {
894
+ "name": "id",
895
+ "type": "uuid",
896
+ "primaryKey": true,
897
+ "notNull": true,
898
+ "default": "gen_random_uuid()"
899
+ },
900
+ "tenantId": {
901
+ "name": "tenantId",
902
+ "type": "text",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "default": "'default'"
906
+ },
907
+ "channelId": {
908
+ "name": "channelId",
909
+ "type": "uuid",
910
+ "primaryKey": false,
911
+ "notNull": true
912
+ },
913
+ "keyId": {
914
+ "name": "keyId",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": true
918
+ },
919
+ "verifierHash": {
920
+ "name": "verifierHash",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true
924
+ },
925
+ "label": {
926
+ "name": "label",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": false
930
+ },
931
+ "roleKey": {
932
+ "name": "roleKey",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "default": "'member'"
937
+ },
938
+ "status": {
939
+ "name": "status",
940
+ "type": "text",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "default": "'active'"
944
+ },
945
+ "epoch": {
946
+ "name": "epoch",
947
+ "type": "integer",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "default": 1
951
+ },
952
+ "createdBy": {
953
+ "name": "createdBy",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": false
957
+ },
958
+ "createdAt": {
959
+ "name": "createdAt",
960
+ "type": "timestamp with time zone",
961
+ "primaryKey": false,
962
+ "notNull": true,
963
+ "default": "now()"
964
+ },
965
+ "revokedAt": {
966
+ "name": "revokedAt",
967
+ "type": "timestamp with time zone",
968
+ "primaryKey": false,
969
+ "notNull": false
970
+ },
971
+ "lastUsedAt": {
972
+ "name": "lastUsedAt",
973
+ "type": "timestamp with time zone",
974
+ "primaryKey": false,
975
+ "notNull": false
976
+ }
977
+ },
978
+ "indexes": {
979
+ "chatv3_access_key_tenant_key_id_unique": {
980
+ "name": "chatv3_access_key_tenant_key_id_unique",
981
+ "columns": [
982
+ {
983
+ "expression": "tenantId",
984
+ "isExpression": false,
985
+ "asc": true,
986
+ "nulls": "last"
987
+ },
988
+ {
989
+ "expression": "keyId",
990
+ "isExpression": false,
991
+ "asc": true,
992
+ "nulls": "last"
993
+ }
994
+ ],
995
+ "isUnique": true,
996
+ "concurrently": false,
997
+ "method": "btree",
998
+ "with": {}
999
+ },
1000
+ "chatv3_access_key_idx_channel_status": {
1001
+ "name": "chatv3_access_key_idx_channel_status",
1002
+ "columns": [
1003
+ {
1004
+ "expression": "tenantId",
1005
+ "isExpression": false,
1006
+ "asc": true,
1007
+ "nulls": "last"
1008
+ },
1009
+ {
1010
+ "expression": "channelId",
1011
+ "isExpression": false,
1012
+ "asc": true,
1013
+ "nulls": "last"
1014
+ },
1015
+ {
1016
+ "expression": "status",
1017
+ "isExpression": false,
1018
+ "asc": true,
1019
+ "nulls": "last"
1020
+ }
1021
+ ],
1022
+ "isUnique": false,
1023
+ "concurrently": false,
1024
+ "method": "btree",
1025
+ "with": {}
1026
+ }
1027
+ },
1028
+ "foreignKeys": {
1029
+ "chatv3-access-keys_channelId_chatv3-channels_id_fk": {
1030
+ "name": "chatv3-access-keys_channelId_chatv3-channels_id_fk",
1031
+ "tableFrom": "chatv3-access-keys",
1032
+ "tableTo": "chatv3-channels",
1033
+ "columnsFrom": [
1034
+ "channelId"
1035
+ ],
1036
+ "columnsTo": [
1037
+ "id"
1038
+ ],
1039
+ "onDelete": "cascade",
1040
+ "onUpdate": "no action"
1041
+ }
1042
+ },
1043
+ "compositePrimaryKeys": {},
1044
+ "uniqueConstraints": {},
1045
+ "policies": {},
1046
+ "checkConstraints": {},
1047
+ "isRLSEnabled": false
1048
+ },
1049
+ "public.chatv3-room-epochs": {
1050
+ "name": "chatv3-room-epochs",
1051
+ "schema": "",
1052
+ "columns": {
1053
+ "id": {
1054
+ "name": "id",
1055
+ "type": "uuid",
1056
+ "primaryKey": true,
1057
+ "notNull": true,
1058
+ "default": "gen_random_uuid()"
1059
+ },
1060
+ "tenantId": {
1061
+ "name": "tenantId",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": true,
1065
+ "default": "'default'"
1066
+ },
1067
+ "roomId": {
1068
+ "name": "roomId",
1069
+ "type": "uuid",
1070
+ "primaryKey": false,
1071
+ "notNull": true
1072
+ },
1073
+ "epoch": {
1074
+ "name": "epoch",
1075
+ "type": "integer",
1076
+ "primaryKey": false,
1077
+ "notNull": true
1078
+ },
1079
+ "cipherSuite": {
1080
+ "name": "cipherSuite",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": true
1084
+ },
1085
+ "wrappedKeyBlob": {
1086
+ "name": "wrappedKeyBlob",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": true
1090
+ },
1091
+ "kdfMeta": {
1092
+ "name": "kdfMeta",
1093
+ "type": "jsonb",
1094
+ "primaryKey": false,
1095
+ "notNull": true,
1096
+ "default": "'{}'::jsonb"
1097
+ },
1098
+ "status": {
1099
+ "name": "status",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": true,
1103
+ "default": "'active'"
1104
+ },
1105
+ "createdBy": {
1106
+ "name": "createdBy",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": false
1110
+ },
1111
+ "createdAt": {
1112
+ "name": "createdAt",
1113
+ "type": "timestamp with time zone",
1114
+ "primaryKey": false,
1115
+ "notNull": true,
1116
+ "default": "now()"
1117
+ },
1118
+ "retiredAt": {
1119
+ "name": "retiredAt",
1120
+ "type": "timestamp with time zone",
1121
+ "primaryKey": false,
1122
+ "notNull": false
1123
+ }
1124
+ },
1125
+ "indexes": {
1126
+ "chatv3_room_epoch_room_epoch_unique": {
1127
+ "name": "chatv3_room_epoch_room_epoch_unique",
1128
+ "columns": [
1129
+ {
1130
+ "expression": "roomId",
1131
+ "isExpression": false,
1132
+ "asc": true,
1133
+ "nulls": "last"
1134
+ },
1135
+ {
1136
+ "expression": "epoch",
1137
+ "isExpression": false,
1138
+ "asc": true,
1139
+ "nulls": "last"
1140
+ }
1141
+ ],
1142
+ "isUnique": true,
1143
+ "concurrently": false,
1144
+ "method": "btree",
1145
+ "with": {}
1146
+ },
1147
+ "chatv3_room_epoch_idx_room_status": {
1148
+ "name": "chatv3_room_epoch_idx_room_status",
1149
+ "columns": [
1150
+ {
1151
+ "expression": "tenantId",
1152
+ "isExpression": false,
1153
+ "asc": true,
1154
+ "nulls": "last"
1155
+ },
1156
+ {
1157
+ "expression": "roomId",
1158
+ "isExpression": false,
1159
+ "asc": true,
1160
+ "nulls": "last"
1161
+ },
1162
+ {
1163
+ "expression": "status",
1164
+ "isExpression": false,
1165
+ "asc": true,
1166
+ "nulls": "last"
1167
+ }
1168
+ ],
1169
+ "isUnique": false,
1170
+ "concurrently": false,
1171
+ "method": "btree",
1172
+ "with": {}
1173
+ }
1174
+ },
1175
+ "foreignKeys": {
1176
+ "chatv3-room-epochs_roomId_chatv3-rooms_id_fk": {
1177
+ "name": "chatv3-room-epochs_roomId_chatv3-rooms_id_fk",
1178
+ "tableFrom": "chatv3-room-epochs",
1179
+ "tableTo": "chatv3-rooms",
1180
+ "columnsFrom": [
1181
+ "roomId"
1182
+ ],
1183
+ "columnsTo": [
1184
+ "id"
1185
+ ],
1186
+ "onDelete": "cascade",
1187
+ "onUpdate": "no action"
1188
+ }
1189
+ },
1190
+ "compositePrimaryKeys": {},
1191
+ "uniqueConstraints": {},
1192
+ "policies": {},
1193
+ "checkConstraints": {},
1194
+ "isRLSEnabled": false
1195
+ },
1196
+ "public.chatv3-member-devices": {
1197
+ "name": "chatv3-member-devices",
1198
+ "schema": "",
1199
+ "columns": {
1200
+ "id": {
1201
+ "name": "id",
1202
+ "type": "uuid",
1203
+ "primaryKey": true,
1204
+ "notNull": true,
1205
+ "default": "gen_random_uuid()"
1206
+ },
1207
+ "tenantId": {
1208
+ "name": "tenantId",
1209
+ "type": "text",
1210
+ "primaryKey": false,
1211
+ "notNull": true,
1212
+ "default": "'default'"
1213
+ },
1214
+ "memberId": {
1215
+ "name": "memberId",
1216
+ "type": "uuid",
1217
+ "primaryKey": false,
1218
+ "notNull": true
1219
+ },
1220
+ "deviceLabel": {
1221
+ "name": "deviceLabel",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": false
1225
+ },
1226
+ "identityPublicKey": {
1227
+ "name": "identityPublicKey",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true
1231
+ },
1232
+ "signingPublicKey": {
1233
+ "name": "signingPublicKey",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": false
1237
+ },
1238
+ "status": {
1239
+ "name": "status",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true,
1243
+ "default": "'active'"
1244
+ },
1245
+ "createdAt": {
1246
+ "name": "createdAt",
1247
+ "type": "timestamp with time zone",
1248
+ "primaryKey": false,
1249
+ "notNull": true,
1250
+ "default": "now()"
1251
+ },
1252
+ "lastSeenAt": {
1253
+ "name": "lastSeenAt",
1254
+ "type": "timestamp with time zone",
1255
+ "primaryKey": false,
1256
+ "notNull": false
1257
+ },
1258
+ "revokedAt": {
1259
+ "name": "revokedAt",
1260
+ "type": "timestamp with time zone",
1261
+ "primaryKey": false,
1262
+ "notNull": false
1263
+ }
1264
+ },
1265
+ "indexes": {
1266
+ "chatv3_member_device_idx_member_status": {
1267
+ "name": "chatv3_member_device_idx_member_status",
1268
+ "columns": [
1269
+ {
1270
+ "expression": "tenantId",
1271
+ "isExpression": false,
1272
+ "asc": true,
1273
+ "nulls": "last"
1274
+ },
1275
+ {
1276
+ "expression": "memberId",
1277
+ "isExpression": false,
1278
+ "asc": true,
1279
+ "nulls": "last"
1280
+ },
1281
+ {
1282
+ "expression": "status",
1283
+ "isExpression": false,
1284
+ "asc": true,
1285
+ "nulls": "last"
1286
+ }
1287
+ ],
1288
+ "isUnique": false,
1289
+ "concurrently": false,
1290
+ "method": "btree",
1291
+ "with": {}
1292
+ }
1293
+ },
1294
+ "foreignKeys": {
1295
+ "chatv3-member-devices_memberId_chatv3-members_id_fk": {
1296
+ "name": "chatv3-member-devices_memberId_chatv3-members_id_fk",
1297
+ "tableFrom": "chatv3-member-devices",
1298
+ "tableTo": "chatv3-members",
1299
+ "columnsFrom": [
1300
+ "memberId"
1301
+ ],
1302
+ "columnsTo": [
1303
+ "id"
1304
+ ],
1305
+ "onDelete": "cascade",
1306
+ "onUpdate": "no action"
1307
+ }
1308
+ },
1309
+ "compositePrimaryKeys": {},
1310
+ "uniqueConstraints": {},
1311
+ "policies": {},
1312
+ "checkConstraints": {},
1313
+ "isRLSEnabled": false
1314
+ },
1315
+ "public.chatv3-device-key-packages": {
1316
+ "name": "chatv3-device-key-packages",
1317
+ "schema": "",
1318
+ "columns": {
1319
+ "id": {
1320
+ "name": "id",
1321
+ "type": "uuid",
1322
+ "primaryKey": true,
1323
+ "notNull": true,
1324
+ "default": "gen_random_uuid()"
1325
+ },
1326
+ "tenantId": {
1327
+ "name": "tenantId",
1328
+ "type": "text",
1329
+ "primaryKey": false,
1330
+ "notNull": true,
1331
+ "default": "'default'"
1332
+ },
1333
+ "deviceId": {
1334
+ "name": "deviceId",
1335
+ "type": "uuid",
1336
+ "primaryKey": false,
1337
+ "notNull": true
1338
+ },
1339
+ "kind": {
1340
+ "name": "kind",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true,
1344
+ "default": "'v0'"
1345
+ },
1346
+ "packageBlob": {
1347
+ "name": "packageBlob",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": true
1351
+ },
1352
+ "status": {
1353
+ "name": "status",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": true,
1357
+ "default": "'available'"
1358
+ },
1359
+ "createdAt": {
1360
+ "name": "createdAt",
1361
+ "type": "timestamp with time zone",
1362
+ "primaryKey": false,
1363
+ "notNull": true,
1364
+ "default": "now()"
1365
+ },
1366
+ "consumedAt": {
1367
+ "name": "consumedAt",
1368
+ "type": "timestamp with time zone",
1369
+ "primaryKey": false,
1370
+ "notNull": false
1371
+ }
1372
+ },
1373
+ "indexes": {
1374
+ "chatv3_device_key_package_idx_device_status": {
1375
+ "name": "chatv3_device_key_package_idx_device_status",
1376
+ "columns": [
1377
+ {
1378
+ "expression": "deviceId",
1379
+ "isExpression": false,
1380
+ "asc": true,
1381
+ "nulls": "last"
1382
+ },
1383
+ {
1384
+ "expression": "status",
1385
+ "isExpression": false,
1386
+ "asc": true,
1387
+ "nulls": "last"
1388
+ }
1389
+ ],
1390
+ "isUnique": false,
1391
+ "concurrently": false,
1392
+ "method": "btree",
1393
+ "with": {}
1394
+ }
1395
+ },
1396
+ "foreignKeys": {
1397
+ "chatv3-device-key-packages_deviceId_chatv3-member-devices_id_fk": {
1398
+ "name": "chatv3-device-key-packages_deviceId_chatv3-member-devices_id_fk",
1399
+ "tableFrom": "chatv3-device-key-packages",
1400
+ "tableTo": "chatv3-member-devices",
1401
+ "columnsFrom": [
1402
+ "deviceId"
1403
+ ],
1404
+ "columnsTo": [
1405
+ "id"
1406
+ ],
1407
+ "onDelete": "cascade",
1408
+ "onUpdate": "no action"
1409
+ }
1410
+ },
1411
+ "compositePrimaryKeys": {},
1412
+ "uniqueConstraints": {},
1413
+ "policies": {},
1414
+ "checkConstraints": {},
1415
+ "isRLSEnabled": false
1416
+ },
1417
+ "public.chatv3-user-key-backups": {
1418
+ "name": "chatv3-user-key-backups",
1419
+ "schema": "",
1420
+ "columns": {
1421
+ "id": {
1422
+ "name": "id",
1423
+ "type": "uuid",
1424
+ "primaryKey": true,
1425
+ "notNull": true,
1426
+ "default": "gen_random_uuid()"
1427
+ },
1428
+ "tenantId": {
1429
+ "name": "tenantId",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "default": "'default'"
1434
+ },
1435
+ "userId": {
1436
+ "name": "userId",
1437
+ "type": "text",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "keyVersion": {
1442
+ "name": "keyVersion",
1443
+ "type": "integer",
1444
+ "primaryKey": false,
1445
+ "notNull": true,
1446
+ "default": 1
1447
+ },
1448
+ "publicKeyAlgorithm": {
1449
+ "name": "publicKeyAlgorithm",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": true
1453
+ },
1454
+ "publicKeyFormat": {
1455
+ "name": "publicKeyFormat",
1456
+ "type": "text",
1457
+ "primaryKey": false,
1458
+ "notNull": true
1459
+ },
1460
+ "publicKey": {
1461
+ "name": "publicKey",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": true
1465
+ },
1466
+ "backupPackageVersion": {
1467
+ "name": "backupPackageVersion",
1468
+ "type": "integer",
1469
+ "primaryKey": false,
1470
+ "notNull": true,
1471
+ "default": 1
1472
+ },
1473
+ "kekSource": {
1474
+ "name": "kekSource",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": true
1478
+ },
1479
+ "kdfName": {
1480
+ "name": "kdfName",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": true
1484
+ },
1485
+ "kdfVersion": {
1486
+ "name": "kdfVersion",
1487
+ "type": "integer",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "default": 1
1491
+ },
1492
+ "kdfSalt": {
1493
+ "name": "kdfSalt",
1494
+ "type": "text",
1495
+ "primaryKey": false,
1496
+ "notNull": true
1497
+ },
1498
+ "kdfMemoryKiB": {
1499
+ "name": "kdfMemoryKiB",
1500
+ "type": "integer",
1501
+ "primaryKey": false,
1502
+ "notNull": false
1503
+ },
1504
+ "kdfIterations": {
1505
+ "name": "kdfIterations",
1506
+ "type": "integer",
1507
+ "primaryKey": false,
1508
+ "notNull": true
1509
+ },
1510
+ "kdfParallelism": {
1511
+ "name": "kdfParallelism",
1512
+ "type": "integer",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "default": 1
1516
+ },
1517
+ "wrapAlg": {
1518
+ "name": "wrapAlg",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "default": "'aes-256-gcm'"
1523
+ },
1524
+ "nonce": {
1525
+ "name": "nonce",
1526
+ "type": "text",
1527
+ "primaryKey": false,
1528
+ "notNull": true
1529
+ },
1530
+ "ciphertext": {
1531
+ "name": "ciphertext",
1532
+ "type": "text",
1533
+ "primaryKey": false,
1534
+ "notNull": true
1535
+ },
1536
+ "aad": {
1537
+ "name": "aad",
1538
+ "type": "text",
1539
+ "primaryKey": false,
1540
+ "notNull": false
1541
+ },
1542
+ "authTag": {
1543
+ "name": "authTag",
1544
+ "type": "text",
1545
+ "primaryKey": false,
1546
+ "notNull": false
1547
+ },
1548
+ "threatModelLabel": {
1549
+ "name": "threatModelLabel",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": true
1553
+ },
1554
+ "status": {
1555
+ "name": "status",
1556
+ "type": "text",
1557
+ "primaryKey": false,
1558
+ "notNull": true,
1559
+ "default": "'active'"
1560
+ },
1561
+ "createdAt": {
1562
+ "name": "createdAt",
1563
+ "type": "timestamp with time zone",
1564
+ "primaryKey": false,
1565
+ "notNull": true,
1566
+ "default": "now()"
1567
+ },
1568
+ "updatedAt": {
1569
+ "name": "updatedAt",
1570
+ "type": "timestamp with time zone",
1571
+ "primaryKey": false,
1572
+ "notNull": true,
1573
+ "default": "now()"
1574
+ }
1575
+ },
1576
+ "indexes": {
1577
+ "chatv3_user_key_backup_tenant_user_unique": {
1578
+ "name": "chatv3_user_key_backup_tenant_user_unique",
1579
+ "columns": [
1580
+ {
1581
+ "expression": "tenantId",
1582
+ "isExpression": false,
1583
+ "asc": true,
1584
+ "nulls": "last"
1585
+ },
1586
+ {
1587
+ "expression": "userId",
1588
+ "isExpression": false,
1589
+ "asc": true,
1590
+ "nulls": "last"
1591
+ }
1592
+ ],
1593
+ "isUnique": true,
1594
+ "concurrently": false,
1595
+ "method": "btree",
1596
+ "with": {}
1597
+ },
1598
+ "chatv3_user_key_backup_tenant_user_version_unique": {
1599
+ "name": "chatv3_user_key_backup_tenant_user_version_unique",
1600
+ "columns": [
1601
+ {
1602
+ "expression": "tenantId",
1603
+ "isExpression": false,
1604
+ "asc": true,
1605
+ "nulls": "last"
1606
+ },
1607
+ {
1608
+ "expression": "userId",
1609
+ "isExpression": false,
1610
+ "asc": true,
1611
+ "nulls": "last"
1612
+ },
1613
+ {
1614
+ "expression": "keyVersion",
1615
+ "isExpression": false,
1616
+ "asc": true,
1617
+ "nulls": "last"
1618
+ }
1619
+ ],
1620
+ "isUnique": true,
1621
+ "concurrently": false,
1622
+ "method": "btree",
1623
+ "with": {}
1624
+ },
1625
+ "chatv3_user_key_backup_idx_tenant_status": {
1626
+ "name": "chatv3_user_key_backup_idx_tenant_status",
1627
+ "columns": [
1628
+ {
1629
+ "expression": "tenantId",
1630
+ "isExpression": false,
1631
+ "asc": true,
1632
+ "nulls": "last"
1633
+ },
1634
+ {
1635
+ "expression": "status",
1636
+ "isExpression": false,
1637
+ "asc": true,
1638
+ "nulls": "last"
1639
+ }
1640
+ ],
1641
+ "isUnique": false,
1642
+ "concurrently": false,
1643
+ "method": "btree",
1644
+ "with": {}
1645
+ }
1646
+ },
1647
+ "foreignKeys": {},
1648
+ "compositePrimaryKeys": {},
1649
+ "uniqueConstraints": {},
1650
+ "policies": {},
1651
+ "checkConstraints": {},
1652
+ "isRLSEnabled": false
1653
+ },
1654
+ "public.chatv3-member-key-packages": {
1655
+ "name": "chatv3-member-key-packages",
1656
+ "schema": "",
1657
+ "columns": {
1658
+ "id": {
1659
+ "name": "id",
1660
+ "type": "uuid",
1661
+ "primaryKey": true,
1662
+ "notNull": true,
1663
+ "default": "gen_random_uuid()"
1664
+ },
1665
+ "tenantId": {
1666
+ "name": "tenantId",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "default": "'default'"
1671
+ },
1672
+ "channelId": {
1673
+ "name": "channelId",
1674
+ "type": "uuid",
1675
+ "primaryKey": false,
1676
+ "notNull": true
1677
+ },
1678
+ "memberId": {
1679
+ "name": "memberId",
1680
+ "type": "uuid",
1681
+ "primaryKey": false,
1682
+ "notNull": true
1683
+ },
1684
+ "recipientUserId": {
1685
+ "name": "recipientUserId",
1686
+ "type": "text",
1687
+ "primaryKey": false,
1688
+ "notNull": true
1689
+ },
1690
+ "recipientUserKeyId": {
1691
+ "name": "recipientUserKeyId",
1692
+ "type": "uuid",
1693
+ "primaryKey": false,
1694
+ "notNull": true
1695
+ },
1696
+ "recipientKeyVersion": {
1697
+ "name": "recipientKeyVersion",
1698
+ "type": "integer",
1699
+ "primaryKey": false,
1700
+ "notNull": true
1701
+ },
1702
+ "packageVersion": {
1703
+ "name": "packageVersion",
1704
+ "type": "integer",
1705
+ "primaryKey": false,
1706
+ "notNull": true,
1707
+ "default": 1
1708
+ },
1709
+ "packageAlg": {
1710
+ "name": "packageAlg",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": true
1714
+ },
1715
+ "ephemeralPublicKeyAlgorithm": {
1716
+ "name": "ephemeralPublicKeyAlgorithm",
1717
+ "type": "text",
1718
+ "primaryKey": false,
1719
+ "notNull": true
1720
+ },
1721
+ "ephemeralPublicKeyFormat": {
1722
+ "name": "ephemeralPublicKeyFormat",
1723
+ "type": "text",
1724
+ "primaryKey": false,
1725
+ "notNull": true
1726
+ },
1727
+ "ephemeralPublicKey": {
1728
+ "name": "ephemeralPublicKey",
1729
+ "type": "text",
1730
+ "primaryKey": false,
1731
+ "notNull": true
1732
+ },
1733
+ "nonce": {
1734
+ "name": "nonce",
1735
+ "type": "text",
1736
+ "primaryKey": false,
1737
+ "notNull": true
1738
+ },
1739
+ "ciphertext": {
1740
+ "name": "ciphertext",
1741
+ "type": "text",
1742
+ "primaryKey": false,
1743
+ "notNull": true
1744
+ },
1745
+ "aad": {
1746
+ "name": "aad",
1747
+ "type": "text",
1748
+ "primaryKey": false,
1749
+ "notNull": false
1750
+ },
1751
+ "authTag": {
1752
+ "name": "authTag",
1753
+ "type": "text",
1754
+ "primaryKey": false,
1755
+ "notNull": false
1756
+ },
1757
+ "sourceEpoch": {
1758
+ "name": "sourceEpoch",
1759
+ "type": "integer",
1760
+ "primaryKey": false,
1761
+ "notNull": true,
1762
+ "default": 1
1763
+ },
1764
+ "status": {
1765
+ "name": "status",
1766
+ "type": "text",
1767
+ "primaryKey": false,
1768
+ "notNull": true,
1769
+ "default": "'usable'"
1770
+ },
1771
+ "staleReason": {
1772
+ "name": "staleReason",
1773
+ "type": "text",
1774
+ "primaryKey": false,
1775
+ "notNull": false
1776
+ },
1777
+ "createdAt": {
1778
+ "name": "createdAt",
1779
+ "type": "timestamp with time zone",
1780
+ "primaryKey": false,
1781
+ "notNull": true,
1782
+ "default": "now()"
1783
+ },
1784
+ "updatedAt": {
1785
+ "name": "updatedAt",
1786
+ "type": "timestamp with time zone",
1787
+ "primaryKey": false,
1788
+ "notNull": true,
1789
+ "default": "now()"
1790
+ }
1791
+ },
1792
+ "indexes": {
1793
+ "chatv3_member_key_package_tenant_channel_member_unique": {
1794
+ "name": "chatv3_member_key_package_tenant_channel_member_unique",
1795
+ "columns": [
1796
+ {
1797
+ "expression": "tenantId",
1798
+ "isExpression": false,
1799
+ "asc": true,
1800
+ "nulls": "last"
1801
+ },
1802
+ {
1803
+ "expression": "channelId",
1804
+ "isExpression": false,
1805
+ "asc": true,
1806
+ "nulls": "last"
1807
+ },
1808
+ {
1809
+ "expression": "memberId",
1810
+ "isExpression": false,
1811
+ "asc": true,
1812
+ "nulls": "last"
1813
+ }
1814
+ ],
1815
+ "isUnique": true,
1816
+ "concurrently": false,
1817
+ "method": "btree",
1818
+ "with": {}
1819
+ },
1820
+ "chatv3_member_key_package_idx_recipient": {
1821
+ "name": "chatv3_member_key_package_idx_recipient",
1822
+ "columns": [
1823
+ {
1824
+ "expression": "tenantId",
1825
+ "isExpression": false,
1826
+ "asc": true,
1827
+ "nulls": "last"
1828
+ },
1829
+ {
1830
+ "expression": "recipientUserId",
1831
+ "isExpression": false,
1832
+ "asc": true,
1833
+ "nulls": "last"
1834
+ },
1835
+ {
1836
+ "expression": "status",
1837
+ "isExpression": false,
1838
+ "asc": true,
1839
+ "nulls": "last"
1840
+ }
1841
+ ],
1842
+ "isUnique": false,
1843
+ "concurrently": false,
1844
+ "method": "btree",
1845
+ "with": {}
1846
+ },
1847
+ "chatv3_member_key_package_idx_channel_status": {
1848
+ "name": "chatv3_member_key_package_idx_channel_status",
1849
+ "columns": [
1850
+ {
1851
+ "expression": "tenantId",
1852
+ "isExpression": false,
1853
+ "asc": true,
1854
+ "nulls": "last"
1855
+ },
1856
+ {
1857
+ "expression": "channelId",
1858
+ "isExpression": false,
1859
+ "asc": true,
1860
+ "nulls": "last"
1861
+ },
1862
+ {
1863
+ "expression": "status",
1864
+ "isExpression": false,
1865
+ "asc": true,
1866
+ "nulls": "last"
1867
+ }
1868
+ ],
1869
+ "isUnique": false,
1870
+ "concurrently": false,
1871
+ "method": "btree",
1872
+ "with": {}
1873
+ }
1874
+ },
1875
+ "foreignKeys": {
1876
+ "chatv3-member-key-packages_channelId_chatv3-channels_id_fk": {
1877
+ "name": "chatv3-member-key-packages_channelId_chatv3-channels_id_fk",
1878
+ "tableFrom": "chatv3-member-key-packages",
1879
+ "tableTo": "chatv3-channels",
1880
+ "columnsFrom": [
1881
+ "channelId"
1882
+ ],
1883
+ "columnsTo": [
1884
+ "id"
1885
+ ],
1886
+ "onDelete": "cascade",
1887
+ "onUpdate": "no action"
1888
+ },
1889
+ "chatv3-member-key-packages_memberId_chatv3-members_id_fk": {
1890
+ "name": "chatv3-member-key-packages_memberId_chatv3-members_id_fk",
1891
+ "tableFrom": "chatv3-member-key-packages",
1892
+ "tableTo": "chatv3-members",
1893
+ "columnsFrom": [
1894
+ "memberId"
1895
+ ],
1896
+ "columnsTo": [
1897
+ "id"
1898
+ ],
1899
+ "onDelete": "cascade",
1900
+ "onUpdate": "no action"
1901
+ },
1902
+ "chatv3-member-key-packages_recipientUserKeyId_chatv3-user-key-backups_id_fk": {
1903
+ "name": "chatv3-member-key-packages_recipientUserKeyId_chatv3-user-key-backups_id_fk",
1904
+ "tableFrom": "chatv3-member-key-packages",
1905
+ "tableTo": "chatv3-user-key-backups",
1906
+ "columnsFrom": [
1907
+ "recipientUserKeyId"
1908
+ ],
1909
+ "columnsTo": [
1910
+ "id"
1911
+ ],
1912
+ "onDelete": "restrict",
1913
+ "onUpdate": "no action"
1914
+ }
1915
+ },
1916
+ "compositePrimaryKeys": {},
1917
+ "uniqueConstraints": {},
1918
+ "policies": {},
1919
+ "checkConstraints": {},
1920
+ "isRLSEnabled": false
1921
+ },
1922
+ "public.chatv3-welcome-envelopes": {
1923
+ "name": "chatv3-welcome-envelopes",
1924
+ "schema": "",
1925
+ "columns": {
1926
+ "id": {
1927
+ "name": "id",
1928
+ "type": "uuid",
1929
+ "primaryKey": true,
1930
+ "notNull": true,
1931
+ "default": "gen_random_uuid()"
1932
+ },
1933
+ "tenantId": {
1934
+ "name": "tenantId",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true,
1938
+ "default": "'default'"
1939
+ },
1940
+ "roomId": {
1941
+ "name": "roomId",
1942
+ "type": "uuid",
1943
+ "primaryKey": false,
1944
+ "notNull": true
1945
+ },
1946
+ "epoch": {
1947
+ "name": "epoch",
1948
+ "type": "integer",
1949
+ "primaryKey": false,
1950
+ "notNull": true
1951
+ },
1952
+ "targetDeviceId": {
1953
+ "name": "targetDeviceId",
1954
+ "type": "uuid",
1955
+ "primaryKey": false,
1956
+ "notNull": true
1957
+ },
1958
+ "envelopeBlob": {
1959
+ "name": "envelopeBlob",
1960
+ "type": "text",
1961
+ "primaryKey": false,
1962
+ "notNull": true
1963
+ },
1964
+ "status": {
1965
+ "name": "status",
1966
+ "type": "text",
1967
+ "primaryKey": false,
1968
+ "notNull": true,
1969
+ "default": "'pending'"
1970
+ },
1971
+ "createdBy": {
1972
+ "name": "createdBy",
1973
+ "type": "text",
1974
+ "primaryKey": false,
1975
+ "notNull": false
1976
+ },
1977
+ "createdAt": {
1978
+ "name": "createdAt",
1979
+ "type": "timestamp with time zone",
1980
+ "primaryKey": false,
1981
+ "notNull": true,
1982
+ "default": "now()"
1983
+ },
1984
+ "claimedAt": {
1985
+ "name": "claimedAt",
1986
+ "type": "timestamp with time zone",
1987
+ "primaryKey": false,
1988
+ "notNull": false
1989
+ }
1990
+ },
1991
+ "indexes": {
1992
+ "chatv3_welcome_envelope_idx_target_status": {
1993
+ "name": "chatv3_welcome_envelope_idx_target_status",
1994
+ "columns": [
1995
+ {
1996
+ "expression": "targetDeviceId",
1997
+ "isExpression": false,
1998
+ "asc": true,
1999
+ "nulls": "last"
2000
+ },
2001
+ {
2002
+ "expression": "status",
2003
+ "isExpression": false,
2004
+ "asc": true,
2005
+ "nulls": "last"
2006
+ }
2007
+ ],
2008
+ "isUnique": false,
2009
+ "concurrently": false,
2010
+ "method": "btree",
2011
+ "with": {}
2012
+ },
2013
+ "chatv3_welcome_envelope_idx_room_epoch": {
2014
+ "name": "chatv3_welcome_envelope_idx_room_epoch",
2015
+ "columns": [
2016
+ {
2017
+ "expression": "roomId",
2018
+ "isExpression": false,
2019
+ "asc": true,
2020
+ "nulls": "last"
2021
+ },
2022
+ {
2023
+ "expression": "epoch",
2024
+ "isExpression": false,
2025
+ "asc": true,
2026
+ "nulls": "last"
2027
+ }
2028
+ ],
2029
+ "isUnique": false,
2030
+ "concurrently": false,
2031
+ "method": "btree",
2032
+ "with": {}
2033
+ }
2034
+ },
2035
+ "foreignKeys": {
2036
+ "chatv3-welcome-envelopes_roomId_chatv3-rooms_id_fk": {
2037
+ "name": "chatv3-welcome-envelopes_roomId_chatv3-rooms_id_fk",
2038
+ "tableFrom": "chatv3-welcome-envelopes",
2039
+ "tableTo": "chatv3-rooms",
2040
+ "columnsFrom": [
2041
+ "roomId"
2042
+ ],
2043
+ "columnsTo": [
2044
+ "id"
2045
+ ],
2046
+ "onDelete": "cascade",
2047
+ "onUpdate": "no action"
2048
+ },
2049
+ "chatv3-welcome-envelopes_targetDeviceId_chatv3-member-devices_id_fk": {
2050
+ "name": "chatv3-welcome-envelopes_targetDeviceId_chatv3-member-devices_id_fk",
2051
+ "tableFrom": "chatv3-welcome-envelopes",
2052
+ "tableTo": "chatv3-member-devices",
2053
+ "columnsFrom": [
2054
+ "targetDeviceId"
2055
+ ],
2056
+ "columnsTo": [
2057
+ "id"
2058
+ ],
2059
+ "onDelete": "cascade",
2060
+ "onUpdate": "no action"
2061
+ }
2062
+ },
2063
+ "compositePrimaryKeys": {},
2064
+ "uniqueConstraints": {},
2065
+ "policies": {},
2066
+ "checkConstraints": {},
2067
+ "isRLSEnabled": false
2068
+ },
2069
+ "public.chatv3-messages": {
2070
+ "name": "chatv3-messages",
2071
+ "schema": "",
2072
+ "columns": {
2073
+ "id": {
2074
+ "name": "id",
2075
+ "type": "uuid",
2076
+ "primaryKey": true,
2077
+ "notNull": true,
2078
+ "default": "gen_random_uuid()"
2079
+ },
2080
+ "tenantId": {
2081
+ "name": "tenantId",
2082
+ "type": "text",
2083
+ "primaryKey": false,
2084
+ "notNull": true,
2085
+ "default": "'default'"
2086
+ },
2087
+ "roomId": {
2088
+ "name": "roomId",
2089
+ "type": "uuid",
2090
+ "primaryKey": false,
2091
+ "notNull": true
2092
+ },
2093
+ "seq": {
2094
+ "name": "seq",
2095
+ "type": "integer",
2096
+ "primaryKey": false,
2097
+ "notNull": true
2098
+ },
2099
+ "senderMemberId": {
2100
+ "name": "senderMemberId",
2101
+ "type": "uuid",
2102
+ "primaryKey": false,
2103
+ "notNull": true
2104
+ },
2105
+ "senderDeviceId": {
2106
+ "name": "senderDeviceId",
2107
+ "type": "uuid",
2108
+ "primaryKey": false,
2109
+ "notNull": false
2110
+ },
2111
+ "kind": {
2112
+ "name": "kind",
2113
+ "type": "text",
2114
+ "primaryKey": false,
2115
+ "notNull": true,
2116
+ "default": "'message'"
2117
+ },
2118
+ "protocolVersion": {
2119
+ "name": "protocolVersion",
2120
+ "type": "integer",
2121
+ "primaryKey": false,
2122
+ "notNull": true,
2123
+ "default": 1
2124
+ },
2125
+ "cipherSuite": {
2126
+ "name": "cipherSuite",
2127
+ "type": "text",
2128
+ "primaryKey": false,
2129
+ "notNull": true
2130
+ },
2131
+ "epoch": {
2132
+ "name": "epoch",
2133
+ "type": "integer",
2134
+ "primaryKey": false,
2135
+ "notNull": true
2136
+ },
2137
+ "ciphertext": {
2138
+ "name": "ciphertext",
2139
+ "type": "text",
2140
+ "primaryKey": false,
2141
+ "notNull": true
2142
+ },
2143
+ "nonce": {
2144
+ "name": "nonce",
2145
+ "type": "text",
2146
+ "primaryKey": false,
2147
+ "notNull": true
2148
+ },
2149
+ "aad": {
2150
+ "name": "aad",
2151
+ "type": "text",
2152
+ "primaryKey": false,
2153
+ "notNull": false
2154
+ },
2155
+ "authTag": {
2156
+ "name": "authTag",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": false
2160
+ },
2161
+ "mentions": {
2162
+ "name": "mentions",
2163
+ "type": "jsonb",
2164
+ "primaryKey": false,
2165
+ "notNull": true,
2166
+ "default": "'[]'::jsonb"
2167
+ },
2168
+ "replyToSeq": {
2169
+ "name": "replyToSeq",
2170
+ "type": "integer",
2171
+ "primaryKey": false,
2172
+ "notNull": false
2173
+ },
2174
+ "idempotencyKey": {
2175
+ "name": "idempotencyKey",
2176
+ "type": "text",
2177
+ "primaryKey": false,
2178
+ "notNull": false
2179
+ },
2180
+ "createdAt": {
2181
+ "name": "createdAt",
2182
+ "type": "timestamp with time zone",
2183
+ "primaryKey": false,
2184
+ "notNull": true,
2185
+ "default": "now()"
2186
+ }
2187
+ },
2188
+ "indexes": {
2189
+ "chatv3_message_room_seq_unique": {
2190
+ "name": "chatv3_message_room_seq_unique",
2191
+ "columns": [
2192
+ {
2193
+ "expression": "roomId",
2194
+ "isExpression": false,
2195
+ "asc": true,
2196
+ "nulls": "last"
2197
+ },
2198
+ {
2199
+ "expression": "seq",
2200
+ "isExpression": false,
2201
+ "asc": true,
2202
+ "nulls": "last"
2203
+ }
2204
+ ],
2205
+ "isUnique": true,
2206
+ "concurrently": false,
2207
+ "method": "btree",
2208
+ "with": {}
2209
+ },
2210
+ "chatv3_message_room_idempotency_unique": {
2211
+ "name": "chatv3_message_room_idempotency_unique",
2212
+ "columns": [
2213
+ {
2214
+ "expression": "roomId",
2215
+ "isExpression": false,
2216
+ "asc": true,
2217
+ "nulls": "last"
2218
+ },
2219
+ {
2220
+ "expression": "idempotencyKey",
2221
+ "isExpression": false,
2222
+ "asc": true,
2223
+ "nulls": "last"
2224
+ }
2225
+ ],
2226
+ "isUnique": true,
2227
+ "concurrently": false,
2228
+ "method": "btree",
2229
+ "with": {}
2230
+ },
2231
+ "chatv3_message_idx_room_created": {
2232
+ "name": "chatv3_message_idx_room_created",
2233
+ "columns": [
2234
+ {
2235
+ "expression": "roomId",
2236
+ "isExpression": false,
2237
+ "asc": true,
2238
+ "nulls": "last"
2239
+ },
2240
+ {
2241
+ "expression": "createdAt",
2242
+ "isExpression": false,
2243
+ "asc": true,
2244
+ "nulls": "last"
2245
+ }
2246
+ ],
2247
+ "isUnique": false,
2248
+ "concurrently": false,
2249
+ "method": "btree",
2250
+ "with": {}
2251
+ },
2252
+ "chatv3_message_idx_tenant_room_kind": {
2253
+ "name": "chatv3_message_idx_tenant_room_kind",
2254
+ "columns": [
2255
+ {
2256
+ "expression": "tenantId",
2257
+ "isExpression": false,
2258
+ "asc": true,
2259
+ "nulls": "last"
2260
+ },
2261
+ {
2262
+ "expression": "roomId",
2263
+ "isExpression": false,
2264
+ "asc": true,
2265
+ "nulls": "last"
2266
+ },
2267
+ {
2268
+ "expression": "kind",
2269
+ "isExpression": false,
2270
+ "asc": true,
2271
+ "nulls": "last"
2272
+ }
2273
+ ],
2274
+ "isUnique": false,
2275
+ "concurrently": false,
2276
+ "method": "btree",
2277
+ "with": {}
2278
+ }
2279
+ },
2280
+ "foreignKeys": {
2281
+ "chatv3-messages_roomId_chatv3-rooms_id_fk": {
2282
+ "name": "chatv3-messages_roomId_chatv3-rooms_id_fk",
2283
+ "tableFrom": "chatv3-messages",
2284
+ "tableTo": "chatv3-rooms",
2285
+ "columnsFrom": [
2286
+ "roomId"
2287
+ ],
2288
+ "columnsTo": [
2289
+ "id"
2290
+ ],
2291
+ "onDelete": "cascade",
2292
+ "onUpdate": "no action"
2293
+ }
2294
+ },
2295
+ "compositePrimaryKeys": {},
2296
+ "uniqueConstraints": {},
2297
+ "policies": {},
2298
+ "checkConstraints": {},
2299
+ "isRLSEnabled": false
2300
+ },
2301
+ "public.chatv3-bindings": {
2302
+ "name": "chatv3-bindings",
2303
+ "schema": "",
2304
+ "columns": {
2305
+ "id": {
2306
+ "name": "id",
2307
+ "type": "uuid",
2308
+ "primaryKey": true,
2309
+ "notNull": true,
2310
+ "default": "gen_random_uuid()"
2311
+ },
2312
+ "tenantId": {
2313
+ "name": "tenantId",
2314
+ "type": "text",
2315
+ "primaryKey": false,
2316
+ "notNull": true,
2317
+ "default": "'default'"
2318
+ },
2319
+ "channelId": {
2320
+ "name": "channelId",
2321
+ "type": "uuid",
2322
+ "primaryKey": false,
2323
+ "notNull": true
2324
+ },
2325
+ "roomId": {
2326
+ "name": "roomId",
2327
+ "type": "uuid",
2328
+ "primaryKey": false,
2329
+ "notNull": false
2330
+ },
2331
+ "bindingType": {
2332
+ "name": "bindingType",
2333
+ "type": "text",
2334
+ "primaryKey": false,
2335
+ "notNull": true
2336
+ },
2337
+ "refId": {
2338
+ "name": "refId",
2339
+ "type": "text",
2340
+ "primaryKey": false,
2341
+ "notNull": false
2342
+ },
2343
+ "uri": {
2344
+ "name": "uri",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": false
2348
+ },
2349
+ "title": {
2350
+ "name": "title",
2351
+ "type": "text",
2352
+ "primaryKey": false,
2353
+ "notNull": false
2354
+ },
2355
+ "note": {
2356
+ "name": "note",
2357
+ "type": "text",
2358
+ "primaryKey": false,
2359
+ "notNull": false
2360
+ },
2361
+ "createdBy": {
2362
+ "name": "createdBy",
2363
+ "type": "text",
2364
+ "primaryKey": false,
2365
+ "notNull": false
2366
+ },
2367
+ "createdAt": {
2368
+ "name": "createdAt",
2369
+ "type": "timestamp with time zone",
2370
+ "primaryKey": false,
2371
+ "notNull": true,
2372
+ "default": "now()"
2373
+ }
2374
+ },
2375
+ "indexes": {
2376
+ "chatv3_binding_idx_channel_type": {
2377
+ "name": "chatv3_binding_idx_channel_type",
2378
+ "columns": [
2379
+ {
2380
+ "expression": "tenantId",
2381
+ "isExpression": false,
2382
+ "asc": true,
2383
+ "nulls": "last"
2384
+ },
2385
+ {
2386
+ "expression": "channelId",
2387
+ "isExpression": false,
2388
+ "asc": true,
2389
+ "nulls": "last"
2390
+ },
2391
+ {
2392
+ "expression": "bindingType",
2393
+ "isExpression": false,
2394
+ "asc": true,
2395
+ "nulls": "last"
2396
+ }
2397
+ ],
2398
+ "isUnique": false,
2399
+ "concurrently": false,
2400
+ "method": "btree",
2401
+ "with": {}
2402
+ },
2403
+ "chatv3_binding_idx_room": {
2404
+ "name": "chatv3_binding_idx_room",
2405
+ "columns": [
2406
+ {
2407
+ "expression": "roomId",
2408
+ "isExpression": false,
2409
+ "asc": true,
2410
+ "nulls": "last"
2411
+ }
2412
+ ],
2413
+ "isUnique": false,
2414
+ "concurrently": false,
2415
+ "method": "btree",
2416
+ "with": {}
2417
+ }
2418
+ },
2419
+ "foreignKeys": {
2420
+ "chatv3-bindings_channelId_chatv3-channels_id_fk": {
2421
+ "name": "chatv3-bindings_channelId_chatv3-channels_id_fk",
2422
+ "tableFrom": "chatv3-bindings",
2423
+ "tableTo": "chatv3-channels",
2424
+ "columnsFrom": [
2425
+ "channelId"
2426
+ ],
2427
+ "columnsTo": [
2428
+ "id"
2429
+ ],
2430
+ "onDelete": "cascade",
2431
+ "onUpdate": "no action"
2432
+ },
2433
+ "chatv3-bindings_roomId_chatv3-rooms_id_fk": {
2434
+ "name": "chatv3-bindings_roomId_chatv3-rooms_id_fk",
2435
+ "tableFrom": "chatv3-bindings",
2436
+ "tableTo": "chatv3-rooms",
2437
+ "columnsFrom": [
2438
+ "roomId"
2439
+ ],
2440
+ "columnsTo": [
2441
+ "id"
2442
+ ],
2443
+ "onDelete": "cascade",
2444
+ "onUpdate": "no action"
2445
+ }
2446
+ },
2447
+ "compositePrimaryKeys": {},
2448
+ "uniqueConstraints": {},
2449
+ "policies": {},
2450
+ "checkConstraints": {},
2451
+ "isRLSEnabled": false
2452
+ },
2453
+ "public.chatv3-presence": {
2454
+ "name": "chatv3-presence",
2455
+ "schema": "",
2456
+ "columns": {
2457
+ "id": {
2458
+ "name": "id",
2459
+ "type": "uuid",
2460
+ "primaryKey": true,
2461
+ "notNull": true,
2462
+ "default": "gen_random_uuid()"
2463
+ },
2464
+ "tenantId": {
2465
+ "name": "tenantId",
2466
+ "type": "text",
2467
+ "primaryKey": false,
2468
+ "notNull": true,
2469
+ "default": "'default'"
2470
+ },
2471
+ "roomId": {
2472
+ "name": "roomId",
2473
+ "type": "uuid",
2474
+ "primaryKey": false,
2475
+ "notNull": true
2476
+ },
2477
+ "memberId": {
2478
+ "name": "memberId",
2479
+ "type": "uuid",
2480
+ "primaryKey": false,
2481
+ "notNull": true
2482
+ },
2483
+ "state": {
2484
+ "name": "state",
2485
+ "type": "text",
2486
+ "primaryKey": false,
2487
+ "notNull": true,
2488
+ "default": "'active'"
2489
+ },
2490
+ "note": {
2491
+ "name": "note",
2492
+ "type": "text",
2493
+ "primaryKey": false,
2494
+ "notNull": false
2495
+ },
2496
+ "expiresAt": {
2497
+ "name": "expiresAt",
2498
+ "type": "timestamp with time zone",
2499
+ "primaryKey": false,
2500
+ "notNull": true
2501
+ },
2502
+ "updatedAt": {
2503
+ "name": "updatedAt",
2504
+ "type": "timestamp with time zone",
2505
+ "primaryKey": false,
2506
+ "notNull": true,
2507
+ "default": "now()"
2508
+ }
2509
+ },
2510
+ "indexes": {
2511
+ "chatv3_presence_room_member_unique": {
2512
+ "name": "chatv3_presence_room_member_unique",
2513
+ "columns": [
2514
+ {
2515
+ "expression": "roomId",
2516
+ "isExpression": false,
2517
+ "asc": true,
2518
+ "nulls": "last"
2519
+ },
2520
+ {
2521
+ "expression": "memberId",
2522
+ "isExpression": false,
2523
+ "asc": true,
2524
+ "nulls": "last"
2525
+ }
2526
+ ],
2527
+ "isUnique": true,
2528
+ "concurrently": false,
2529
+ "method": "btree",
2530
+ "with": {}
2531
+ },
2532
+ "chatv3_presence_idx_room_expires": {
2533
+ "name": "chatv3_presence_idx_room_expires",
2534
+ "columns": [
2535
+ {
2536
+ "expression": "roomId",
2537
+ "isExpression": false,
2538
+ "asc": true,
2539
+ "nulls": "last"
2540
+ },
2541
+ {
2542
+ "expression": "expiresAt",
2543
+ "isExpression": false,
2544
+ "asc": true,
2545
+ "nulls": "last"
2546
+ }
2547
+ ],
2548
+ "isUnique": false,
2549
+ "concurrently": false,
2550
+ "method": "btree",
2551
+ "with": {}
2552
+ }
2553
+ },
2554
+ "foreignKeys": {
2555
+ "chatv3-presence_roomId_chatv3-rooms_id_fk": {
2556
+ "name": "chatv3-presence_roomId_chatv3-rooms_id_fk",
2557
+ "tableFrom": "chatv3-presence",
2558
+ "tableTo": "chatv3-rooms",
2559
+ "columnsFrom": [
2560
+ "roomId"
2561
+ ],
2562
+ "columnsTo": [
2563
+ "id"
2564
+ ],
2565
+ "onDelete": "cascade",
2566
+ "onUpdate": "no action"
2567
+ },
2568
+ "chatv3-presence_memberId_chatv3-members_id_fk": {
2569
+ "name": "chatv3-presence_memberId_chatv3-members_id_fk",
2570
+ "tableFrom": "chatv3-presence",
2571
+ "tableTo": "chatv3-members",
2572
+ "columnsFrom": [
2573
+ "memberId"
2574
+ ],
2575
+ "columnsTo": [
2576
+ "id"
2577
+ ],
2578
+ "onDelete": "cascade",
2579
+ "onUpdate": "no action"
2580
+ }
2581
+ },
2582
+ "compositePrimaryKeys": {},
2583
+ "uniqueConstraints": {},
2584
+ "policies": {},
2585
+ "checkConstraints": {},
2586
+ "isRLSEnabled": false
2587
+ },
2588
+ "public.chatv3-webhooks": {
2589
+ "name": "chatv3-webhooks",
2590
+ "schema": "",
2591
+ "columns": {
2592
+ "id": {
2593
+ "name": "id",
2594
+ "type": "uuid",
2595
+ "primaryKey": true,
2596
+ "notNull": true,
2597
+ "default": "gen_random_uuid()"
2598
+ },
2599
+ "tenantId": {
2600
+ "name": "tenantId",
2601
+ "type": "text",
2602
+ "primaryKey": false,
2603
+ "notNull": true,
2604
+ "default": "'default'"
2605
+ },
2606
+ "channelId": {
2607
+ "name": "channelId",
2608
+ "type": "uuid",
2609
+ "primaryKey": false,
2610
+ "notNull": true
2611
+ },
2612
+ "url": {
2613
+ "name": "url",
2614
+ "type": "text",
2615
+ "primaryKey": false,
2616
+ "notNull": true
2617
+ },
2618
+ "signingSecret": {
2619
+ "name": "signingSecret",
2620
+ "type": "text",
2621
+ "primaryKey": false,
2622
+ "notNull": true
2623
+ },
2624
+ "events": {
2625
+ "name": "events",
2626
+ "type": "jsonb",
2627
+ "primaryKey": false,
2628
+ "notNull": true,
2629
+ "default": "'[]'::jsonb"
2630
+ },
2631
+ "label": {
2632
+ "name": "label",
2633
+ "type": "text",
2634
+ "primaryKey": false,
2635
+ "notNull": false
2636
+ },
2637
+ "status": {
2638
+ "name": "status",
2639
+ "type": "text",
2640
+ "primaryKey": false,
2641
+ "notNull": true,
2642
+ "default": "'active'"
2643
+ },
2644
+ "failCount": {
2645
+ "name": "failCount",
2646
+ "type": "integer",
2647
+ "primaryKey": false,
2648
+ "notNull": true,
2649
+ "default": 0
2650
+ },
2651
+ "lastDeliveryAt": {
2652
+ "name": "lastDeliveryAt",
2653
+ "type": "timestamp with time zone",
2654
+ "primaryKey": false,
2655
+ "notNull": false
2656
+ },
2657
+ "lastFailureAt": {
2658
+ "name": "lastFailureAt",
2659
+ "type": "timestamp with time zone",
2660
+ "primaryKey": false,
2661
+ "notNull": false
2662
+ },
2663
+ "createdBy": {
2664
+ "name": "createdBy",
2665
+ "type": "text",
2666
+ "primaryKey": false,
2667
+ "notNull": false
2668
+ },
2669
+ "createdAt": {
2670
+ "name": "createdAt",
2671
+ "type": "timestamp with time zone",
2672
+ "primaryKey": false,
2673
+ "notNull": true,
2674
+ "default": "now()"
2675
+ },
2676
+ "updatedAt": {
2677
+ "name": "updatedAt",
2678
+ "type": "timestamp with time zone",
2679
+ "primaryKey": false,
2680
+ "notNull": true,
2681
+ "default": "now()"
2682
+ }
2683
+ },
2684
+ "indexes": {
2685
+ "chatv3_webhook_idx_channel_status": {
2686
+ "name": "chatv3_webhook_idx_channel_status",
2687
+ "columns": [
2688
+ {
2689
+ "expression": "tenantId",
2690
+ "isExpression": false,
2691
+ "asc": true,
2692
+ "nulls": "last"
2693
+ },
2694
+ {
2695
+ "expression": "channelId",
2696
+ "isExpression": false,
2697
+ "asc": true,
2698
+ "nulls": "last"
2699
+ },
2700
+ {
2701
+ "expression": "status",
2702
+ "isExpression": false,
2703
+ "asc": true,
2704
+ "nulls": "last"
2705
+ }
2706
+ ],
2707
+ "isUnique": false,
2708
+ "concurrently": false,
2709
+ "method": "btree",
2710
+ "with": {}
2711
+ }
2712
+ },
2713
+ "foreignKeys": {
2714
+ "chatv3-webhooks_channelId_chatv3-channels_id_fk": {
2715
+ "name": "chatv3-webhooks_channelId_chatv3-channels_id_fk",
2716
+ "tableFrom": "chatv3-webhooks",
2717
+ "tableTo": "chatv3-channels",
2718
+ "columnsFrom": [
2719
+ "channelId"
2720
+ ],
2721
+ "columnsTo": [
2722
+ "id"
2723
+ ],
2724
+ "onDelete": "cascade",
2725
+ "onUpdate": "no action"
2726
+ }
2727
+ },
2728
+ "compositePrimaryKeys": {},
2729
+ "uniqueConstraints": {},
2730
+ "policies": {},
2731
+ "checkConstraints": {},
2732
+ "isRLSEnabled": false
2733
+ }
2734
+ },
2735
+ "enums": {},
2736
+ "schemas": {},
2737
+ "sequences": {},
2738
+ "roles": {},
2739
+ "policies": {},
2740
+ "views": {},
2741
+ "_meta": {
2742
+ "columns": {},
2743
+ "schemas": {},
2744
+ "tables": {}
2745
+ }
2746
+ }