@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,2229 @@
1
+ {
2
+ "id": "a28fa97f-713d-4f39-ad35-01f6a19b2d72",
3
+ "prevId": "2e1afee2-eee6-46d6-98fb-0d0d1295ef89",
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
+ "status": {
178
+ "name": "status",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "default": "'active'"
183
+ },
184
+ "generalRoomId": {
185
+ "name": "generalRoomId",
186
+ "type": "uuid",
187
+ "primaryKey": false,
188
+ "notNull": false
189
+ },
190
+ "createdBy": {
191
+ "name": "createdBy",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": false
195
+ },
196
+ "updatedBy": {
197
+ "name": "updatedBy",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": false
201
+ },
202
+ "ownerUserId": {
203
+ "name": "ownerUserId",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": false
207
+ },
208
+ "createdAt": {
209
+ "name": "createdAt",
210
+ "type": "timestamp with time zone",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "default": "now()"
214
+ },
215
+ "updatedAt": {
216
+ "name": "updatedAt",
217
+ "type": "timestamp with time zone",
218
+ "primaryKey": false,
219
+ "notNull": true,
220
+ "default": "now()"
221
+ },
222
+ "archivedAt": {
223
+ "name": "archivedAt",
224
+ "type": "timestamp with time zone",
225
+ "primaryKey": false,
226
+ "notNull": false
227
+ }
228
+ },
229
+ "indexes": {
230
+ "chatv3_channel_tenant_space_slug_unique": {
231
+ "name": "chatv3_channel_tenant_space_slug_unique",
232
+ "columns": [
233
+ {
234
+ "expression": "tenantId",
235
+ "isExpression": false,
236
+ "asc": true,
237
+ "nulls": "last"
238
+ },
239
+ {
240
+ "expression": "spaceId",
241
+ "isExpression": false,
242
+ "asc": true,
243
+ "nulls": "last"
244
+ },
245
+ {
246
+ "expression": "slug",
247
+ "isExpression": false,
248
+ "asc": true,
249
+ "nulls": "last"
250
+ }
251
+ ],
252
+ "isUnique": true,
253
+ "concurrently": false,
254
+ "method": "btree",
255
+ "with": {}
256
+ },
257
+ "chatv3_channel_idx_tenant_space_status": {
258
+ "name": "chatv3_channel_idx_tenant_space_status",
259
+ "columns": [
260
+ {
261
+ "expression": "tenantId",
262
+ "isExpression": false,
263
+ "asc": true,
264
+ "nulls": "last"
265
+ },
266
+ {
267
+ "expression": "spaceId",
268
+ "isExpression": false,
269
+ "asc": true,
270
+ "nulls": "last"
271
+ },
272
+ {
273
+ "expression": "status",
274
+ "isExpression": false,
275
+ "asc": true,
276
+ "nulls": "last"
277
+ }
278
+ ],
279
+ "isUnique": false,
280
+ "concurrently": false,
281
+ "method": "btree",
282
+ "with": {}
283
+ },
284
+ "chatv3_channel_idx_tenant_owner": {
285
+ "name": "chatv3_channel_idx_tenant_owner",
286
+ "columns": [
287
+ {
288
+ "expression": "tenantId",
289
+ "isExpression": false,
290
+ "asc": true,
291
+ "nulls": "last"
292
+ },
293
+ {
294
+ "expression": "ownerUserId",
295
+ "isExpression": false,
296
+ "asc": true,
297
+ "nulls": "last"
298
+ }
299
+ ],
300
+ "isUnique": false,
301
+ "concurrently": false,
302
+ "method": "btree",
303
+ "with": {}
304
+ }
305
+ },
306
+ "foreignKeys": {
307
+ "chatv3-channels_spaceId_chatv3-spaces_id_fk": {
308
+ "name": "chatv3-channels_spaceId_chatv3-spaces_id_fk",
309
+ "tableFrom": "chatv3-channels",
310
+ "tableTo": "chatv3-spaces",
311
+ "columnsFrom": [
312
+ "spaceId"
313
+ ],
314
+ "columnsTo": [
315
+ "id"
316
+ ],
317
+ "onDelete": "cascade",
318
+ "onUpdate": "no action"
319
+ }
320
+ },
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "policies": {},
324
+ "checkConstraints": {},
325
+ "isRLSEnabled": false
326
+ },
327
+ "public.chatv3-rooms": {
328
+ "name": "chatv3-rooms",
329
+ "schema": "",
330
+ "columns": {
331
+ "id": {
332
+ "name": "id",
333
+ "type": "uuid",
334
+ "primaryKey": true,
335
+ "notNull": true,
336
+ "default": "gen_random_uuid()"
337
+ },
338
+ "tenantId": {
339
+ "name": "tenantId",
340
+ "type": "text",
341
+ "primaryKey": false,
342
+ "notNull": true,
343
+ "default": "'default'"
344
+ },
345
+ "channelId": {
346
+ "name": "channelId",
347
+ "type": "uuid",
348
+ "primaryKey": false,
349
+ "notNull": true
350
+ },
351
+ "slug": {
352
+ "name": "slug",
353
+ "type": "text",
354
+ "primaryKey": false,
355
+ "notNull": true
356
+ },
357
+ "title": {
358
+ "name": "title",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": true
362
+ },
363
+ "kind": {
364
+ "name": "kind",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": true,
368
+ "default": "'session'"
369
+ },
370
+ "purpose": {
371
+ "name": "purpose",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": false
375
+ },
376
+ "status": {
377
+ "name": "status",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": true,
381
+ "default": "'active'"
382
+ },
383
+ "lastSeq": {
384
+ "name": "lastSeq",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "default": 0
389
+ },
390
+ "lastMessageAt": {
391
+ "name": "lastMessageAt",
392
+ "type": "timestamp with time zone",
393
+ "primaryKey": false,
394
+ "notNull": false
395
+ },
396
+ "currentEpoch": {
397
+ "name": "currentEpoch",
398
+ "type": "integer",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "default": 0
402
+ },
403
+ "createdBy": {
404
+ "name": "createdBy",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": false
408
+ },
409
+ "updatedBy": {
410
+ "name": "updatedBy",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": false
414
+ },
415
+ "createdAt": {
416
+ "name": "createdAt",
417
+ "type": "timestamp with time zone",
418
+ "primaryKey": false,
419
+ "notNull": true,
420
+ "default": "now()"
421
+ },
422
+ "updatedAt": {
423
+ "name": "updatedAt",
424
+ "type": "timestamp with time zone",
425
+ "primaryKey": false,
426
+ "notNull": true,
427
+ "default": "now()"
428
+ },
429
+ "archivedAt": {
430
+ "name": "archivedAt",
431
+ "type": "timestamp with time zone",
432
+ "primaryKey": false,
433
+ "notNull": false
434
+ }
435
+ },
436
+ "indexes": {
437
+ "chatv3_room_tenant_channel_slug_unique": {
438
+ "name": "chatv3_room_tenant_channel_slug_unique",
439
+ "columns": [
440
+ {
441
+ "expression": "tenantId",
442
+ "isExpression": false,
443
+ "asc": true,
444
+ "nulls": "last"
445
+ },
446
+ {
447
+ "expression": "channelId",
448
+ "isExpression": false,
449
+ "asc": true,
450
+ "nulls": "last"
451
+ },
452
+ {
453
+ "expression": "slug",
454
+ "isExpression": false,
455
+ "asc": true,
456
+ "nulls": "last"
457
+ }
458
+ ],
459
+ "isUnique": true,
460
+ "concurrently": false,
461
+ "method": "btree",
462
+ "with": {}
463
+ },
464
+ "chatv3_room_idx_tenant_channel_status": {
465
+ "name": "chatv3_room_idx_tenant_channel_status",
466
+ "columns": [
467
+ {
468
+ "expression": "tenantId",
469
+ "isExpression": false,
470
+ "asc": true,
471
+ "nulls": "last"
472
+ },
473
+ {
474
+ "expression": "channelId",
475
+ "isExpression": false,
476
+ "asc": true,
477
+ "nulls": "last"
478
+ },
479
+ {
480
+ "expression": "status",
481
+ "isExpression": false,
482
+ "asc": true,
483
+ "nulls": "last"
484
+ }
485
+ ],
486
+ "isUnique": false,
487
+ "concurrently": false,
488
+ "method": "btree",
489
+ "with": {}
490
+ },
491
+ "chatv3_room_idx_tenant_last_message": {
492
+ "name": "chatv3_room_idx_tenant_last_message",
493
+ "columns": [
494
+ {
495
+ "expression": "tenantId",
496
+ "isExpression": false,
497
+ "asc": true,
498
+ "nulls": "last"
499
+ },
500
+ {
501
+ "expression": "lastMessageAt",
502
+ "isExpression": false,
503
+ "asc": true,
504
+ "nulls": "last"
505
+ }
506
+ ],
507
+ "isUnique": false,
508
+ "concurrently": false,
509
+ "method": "btree",
510
+ "with": {}
511
+ }
512
+ },
513
+ "foreignKeys": {
514
+ "chatv3-rooms_channelId_chatv3-channels_id_fk": {
515
+ "name": "chatv3-rooms_channelId_chatv3-channels_id_fk",
516
+ "tableFrom": "chatv3-rooms",
517
+ "tableTo": "chatv3-channels",
518
+ "columnsFrom": [
519
+ "channelId"
520
+ ],
521
+ "columnsTo": [
522
+ "id"
523
+ ],
524
+ "onDelete": "cascade",
525
+ "onUpdate": "no action"
526
+ }
527
+ },
528
+ "compositePrimaryKeys": {},
529
+ "uniqueConstraints": {},
530
+ "policies": {},
531
+ "checkConstraints": {},
532
+ "isRLSEnabled": false
533
+ },
534
+ "public.chatv3-members": {
535
+ "name": "chatv3-members",
536
+ "schema": "",
537
+ "columns": {
538
+ "id": {
539
+ "name": "id",
540
+ "type": "uuid",
541
+ "primaryKey": true,
542
+ "notNull": true,
543
+ "default": "gen_random_uuid()"
544
+ },
545
+ "tenantId": {
546
+ "name": "tenantId",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "default": "'default'"
551
+ },
552
+ "channelId": {
553
+ "name": "channelId",
554
+ "type": "uuid",
555
+ "primaryKey": false,
556
+ "notNull": true
557
+ },
558
+ "handle": {
559
+ "name": "handle",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true
563
+ },
564
+ "displayName": {
565
+ "name": "displayName",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false
569
+ },
570
+ "actorKind": {
571
+ "name": "actorKind",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true,
575
+ "default": "'agent'"
576
+ },
577
+ "roleKey": {
578
+ "name": "roleKey",
579
+ "type": "text",
580
+ "primaryKey": false,
581
+ "notNull": true,
582
+ "default": "'member'"
583
+ },
584
+ "status": {
585
+ "name": "status",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "default": "'active'"
590
+ },
591
+ "tokenHash": {
592
+ "name": "tokenHash",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ },
597
+ "joinedViaKeyId": {
598
+ "name": "joinedViaKeyId",
599
+ "type": "uuid",
600
+ "primaryKey": false,
601
+ "notNull": false
602
+ },
603
+ "userId": {
604
+ "name": "userId",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": false
608
+ },
609
+ "lastSeenAt": {
610
+ "name": "lastSeenAt",
611
+ "type": "timestamp with time zone",
612
+ "primaryKey": false,
613
+ "notNull": false
614
+ },
615
+ "joinedAt": {
616
+ "name": "joinedAt",
617
+ "type": "timestamp with time zone",
618
+ "primaryKey": false,
619
+ "notNull": true,
620
+ "default": "now()"
621
+ },
622
+ "removedAt": {
623
+ "name": "removedAt",
624
+ "type": "timestamp with time zone",
625
+ "primaryKey": false,
626
+ "notNull": false
627
+ },
628
+ "updatedAt": {
629
+ "name": "updatedAt",
630
+ "type": "timestamp with time zone",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "default": "now()"
634
+ }
635
+ },
636
+ "indexes": {
637
+ "chatv3_member_tenant_channel_handle_unique": {
638
+ "name": "chatv3_member_tenant_channel_handle_unique",
639
+ "columns": [
640
+ {
641
+ "expression": "tenantId",
642
+ "isExpression": false,
643
+ "asc": true,
644
+ "nulls": "last"
645
+ },
646
+ {
647
+ "expression": "channelId",
648
+ "isExpression": false,
649
+ "asc": true,
650
+ "nulls": "last"
651
+ },
652
+ {
653
+ "expression": "handle",
654
+ "isExpression": false,
655
+ "asc": true,
656
+ "nulls": "last"
657
+ }
658
+ ],
659
+ "isUnique": true,
660
+ "concurrently": false,
661
+ "method": "btree",
662
+ "with": {}
663
+ },
664
+ "chatv3_member_idx_tenant_channel_status": {
665
+ "name": "chatv3_member_idx_tenant_channel_status",
666
+ "columns": [
667
+ {
668
+ "expression": "tenantId",
669
+ "isExpression": false,
670
+ "asc": true,
671
+ "nulls": "last"
672
+ },
673
+ {
674
+ "expression": "channelId",
675
+ "isExpression": false,
676
+ "asc": true,
677
+ "nulls": "last"
678
+ },
679
+ {
680
+ "expression": "status",
681
+ "isExpression": false,
682
+ "asc": true,
683
+ "nulls": "last"
684
+ }
685
+ ],
686
+ "isUnique": false,
687
+ "concurrently": false,
688
+ "method": "btree",
689
+ "with": {}
690
+ },
691
+ "chatv3_member_idx_tenant_user": {
692
+ "name": "chatv3_member_idx_tenant_user",
693
+ "columns": [
694
+ {
695
+ "expression": "tenantId",
696
+ "isExpression": false,
697
+ "asc": true,
698
+ "nulls": "last"
699
+ },
700
+ {
701
+ "expression": "userId",
702
+ "isExpression": false,
703
+ "asc": true,
704
+ "nulls": "last"
705
+ }
706
+ ],
707
+ "isUnique": false,
708
+ "concurrently": false,
709
+ "method": "btree",
710
+ "with": {}
711
+ }
712
+ },
713
+ "foreignKeys": {
714
+ "chatv3-members_channelId_chatv3-channels_id_fk": {
715
+ "name": "chatv3-members_channelId_chatv3-channels_id_fk",
716
+ "tableFrom": "chatv3-members",
717
+ "tableTo": "chatv3-channels",
718
+ "columnsFrom": [
719
+ "channelId"
720
+ ],
721
+ "columnsTo": [
722
+ "id"
723
+ ],
724
+ "onDelete": "cascade",
725
+ "onUpdate": "no action"
726
+ }
727
+ },
728
+ "compositePrimaryKeys": {},
729
+ "uniqueConstraints": {},
730
+ "policies": {},
731
+ "checkConstraints": {},
732
+ "isRLSEnabled": false
733
+ },
734
+ "public.chatv3-room-cursors": {
735
+ "name": "chatv3-room-cursors",
736
+ "schema": "",
737
+ "columns": {
738
+ "id": {
739
+ "name": "id",
740
+ "type": "uuid",
741
+ "primaryKey": true,
742
+ "notNull": true,
743
+ "default": "gen_random_uuid()"
744
+ },
745
+ "tenantId": {
746
+ "name": "tenantId",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "default": "'default'"
751
+ },
752
+ "roomId": {
753
+ "name": "roomId",
754
+ "type": "uuid",
755
+ "primaryKey": false,
756
+ "notNull": true
757
+ },
758
+ "memberId": {
759
+ "name": "memberId",
760
+ "type": "uuid",
761
+ "primaryKey": false,
762
+ "notNull": true
763
+ },
764
+ "lastReadSeq": {
765
+ "name": "lastReadSeq",
766
+ "type": "integer",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "default": 0
770
+ },
771
+ "deliveredSeq": {
772
+ "name": "deliveredSeq",
773
+ "type": "integer",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "default": 0
777
+ },
778
+ "ackSeq": {
779
+ "name": "ackSeq",
780
+ "type": "integer",
781
+ "primaryKey": false,
782
+ "notNull": true,
783
+ "default": 0
784
+ },
785
+ "lastReadAt": {
786
+ "name": "lastReadAt",
787
+ "type": "timestamp with time zone",
788
+ "primaryKey": false,
789
+ "notNull": false
790
+ },
791
+ "updatedAt": {
792
+ "name": "updatedAt",
793
+ "type": "timestamp with time zone",
794
+ "primaryKey": false,
795
+ "notNull": true,
796
+ "default": "now()"
797
+ }
798
+ },
799
+ "indexes": {
800
+ "chatv3_room_cursor_room_member_unique": {
801
+ "name": "chatv3_room_cursor_room_member_unique",
802
+ "columns": [
803
+ {
804
+ "expression": "roomId",
805
+ "isExpression": false,
806
+ "asc": true,
807
+ "nulls": "last"
808
+ },
809
+ {
810
+ "expression": "memberId",
811
+ "isExpression": false,
812
+ "asc": true,
813
+ "nulls": "last"
814
+ }
815
+ ],
816
+ "isUnique": true,
817
+ "concurrently": false,
818
+ "method": "btree",
819
+ "with": {}
820
+ },
821
+ "chatv3_room_cursor_idx_member": {
822
+ "name": "chatv3_room_cursor_idx_member",
823
+ "columns": [
824
+ {
825
+ "expression": "tenantId",
826
+ "isExpression": false,
827
+ "asc": true,
828
+ "nulls": "last"
829
+ },
830
+ {
831
+ "expression": "memberId",
832
+ "isExpression": false,
833
+ "asc": true,
834
+ "nulls": "last"
835
+ }
836
+ ],
837
+ "isUnique": false,
838
+ "concurrently": false,
839
+ "method": "btree",
840
+ "with": {}
841
+ }
842
+ },
843
+ "foreignKeys": {
844
+ "chatv3-room-cursors_roomId_chatv3-rooms_id_fk": {
845
+ "name": "chatv3-room-cursors_roomId_chatv3-rooms_id_fk",
846
+ "tableFrom": "chatv3-room-cursors",
847
+ "tableTo": "chatv3-rooms",
848
+ "columnsFrom": [
849
+ "roomId"
850
+ ],
851
+ "columnsTo": [
852
+ "id"
853
+ ],
854
+ "onDelete": "cascade",
855
+ "onUpdate": "no action"
856
+ },
857
+ "chatv3-room-cursors_memberId_chatv3-members_id_fk": {
858
+ "name": "chatv3-room-cursors_memberId_chatv3-members_id_fk",
859
+ "tableFrom": "chatv3-room-cursors",
860
+ "tableTo": "chatv3-members",
861
+ "columnsFrom": [
862
+ "memberId"
863
+ ],
864
+ "columnsTo": [
865
+ "id"
866
+ ],
867
+ "onDelete": "cascade",
868
+ "onUpdate": "no action"
869
+ }
870
+ },
871
+ "compositePrimaryKeys": {},
872
+ "uniqueConstraints": {},
873
+ "policies": {},
874
+ "checkConstraints": {},
875
+ "isRLSEnabled": false
876
+ },
877
+ "public.chatv3-access-keys": {
878
+ "name": "chatv3-access-keys",
879
+ "schema": "",
880
+ "columns": {
881
+ "id": {
882
+ "name": "id",
883
+ "type": "uuid",
884
+ "primaryKey": true,
885
+ "notNull": true,
886
+ "default": "gen_random_uuid()"
887
+ },
888
+ "tenantId": {
889
+ "name": "tenantId",
890
+ "type": "text",
891
+ "primaryKey": false,
892
+ "notNull": true,
893
+ "default": "'default'"
894
+ },
895
+ "channelId": {
896
+ "name": "channelId",
897
+ "type": "uuid",
898
+ "primaryKey": false,
899
+ "notNull": true
900
+ },
901
+ "keyId": {
902
+ "name": "keyId",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": true
906
+ },
907
+ "verifierHash": {
908
+ "name": "verifierHash",
909
+ "type": "text",
910
+ "primaryKey": false,
911
+ "notNull": true
912
+ },
913
+ "label": {
914
+ "name": "label",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": false
918
+ },
919
+ "roleKey": {
920
+ "name": "roleKey",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "default": "'member'"
925
+ },
926
+ "status": {
927
+ "name": "status",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true,
931
+ "default": "'active'"
932
+ },
933
+ "epoch": {
934
+ "name": "epoch",
935
+ "type": "integer",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "default": 1
939
+ },
940
+ "createdBy": {
941
+ "name": "createdBy",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": false
945
+ },
946
+ "createdAt": {
947
+ "name": "createdAt",
948
+ "type": "timestamp with time zone",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "default": "now()"
952
+ },
953
+ "revokedAt": {
954
+ "name": "revokedAt",
955
+ "type": "timestamp with time zone",
956
+ "primaryKey": false,
957
+ "notNull": false
958
+ },
959
+ "lastUsedAt": {
960
+ "name": "lastUsedAt",
961
+ "type": "timestamp with time zone",
962
+ "primaryKey": false,
963
+ "notNull": false
964
+ }
965
+ },
966
+ "indexes": {
967
+ "chatv3_access_key_tenant_key_id_unique": {
968
+ "name": "chatv3_access_key_tenant_key_id_unique",
969
+ "columns": [
970
+ {
971
+ "expression": "tenantId",
972
+ "isExpression": false,
973
+ "asc": true,
974
+ "nulls": "last"
975
+ },
976
+ {
977
+ "expression": "keyId",
978
+ "isExpression": false,
979
+ "asc": true,
980
+ "nulls": "last"
981
+ }
982
+ ],
983
+ "isUnique": true,
984
+ "concurrently": false,
985
+ "method": "btree",
986
+ "with": {}
987
+ },
988
+ "chatv3_access_key_idx_channel_status": {
989
+ "name": "chatv3_access_key_idx_channel_status",
990
+ "columns": [
991
+ {
992
+ "expression": "tenantId",
993
+ "isExpression": false,
994
+ "asc": true,
995
+ "nulls": "last"
996
+ },
997
+ {
998
+ "expression": "channelId",
999
+ "isExpression": false,
1000
+ "asc": true,
1001
+ "nulls": "last"
1002
+ },
1003
+ {
1004
+ "expression": "status",
1005
+ "isExpression": false,
1006
+ "asc": true,
1007
+ "nulls": "last"
1008
+ }
1009
+ ],
1010
+ "isUnique": false,
1011
+ "concurrently": false,
1012
+ "method": "btree",
1013
+ "with": {}
1014
+ }
1015
+ },
1016
+ "foreignKeys": {
1017
+ "chatv3-access-keys_channelId_chatv3-channels_id_fk": {
1018
+ "name": "chatv3-access-keys_channelId_chatv3-channels_id_fk",
1019
+ "tableFrom": "chatv3-access-keys",
1020
+ "tableTo": "chatv3-channels",
1021
+ "columnsFrom": [
1022
+ "channelId"
1023
+ ],
1024
+ "columnsTo": [
1025
+ "id"
1026
+ ],
1027
+ "onDelete": "cascade",
1028
+ "onUpdate": "no action"
1029
+ }
1030
+ },
1031
+ "compositePrimaryKeys": {},
1032
+ "uniqueConstraints": {},
1033
+ "policies": {},
1034
+ "checkConstraints": {},
1035
+ "isRLSEnabled": false
1036
+ },
1037
+ "public.chatv3-room-epochs": {
1038
+ "name": "chatv3-room-epochs",
1039
+ "schema": "",
1040
+ "columns": {
1041
+ "id": {
1042
+ "name": "id",
1043
+ "type": "uuid",
1044
+ "primaryKey": true,
1045
+ "notNull": true,
1046
+ "default": "gen_random_uuid()"
1047
+ },
1048
+ "tenantId": {
1049
+ "name": "tenantId",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true,
1053
+ "default": "'default'"
1054
+ },
1055
+ "roomId": {
1056
+ "name": "roomId",
1057
+ "type": "uuid",
1058
+ "primaryKey": false,
1059
+ "notNull": true
1060
+ },
1061
+ "epoch": {
1062
+ "name": "epoch",
1063
+ "type": "integer",
1064
+ "primaryKey": false,
1065
+ "notNull": true
1066
+ },
1067
+ "cipherSuite": {
1068
+ "name": "cipherSuite",
1069
+ "type": "text",
1070
+ "primaryKey": false,
1071
+ "notNull": true
1072
+ },
1073
+ "wrappedKeyBlob": {
1074
+ "name": "wrappedKeyBlob",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true
1078
+ },
1079
+ "kdfMeta": {
1080
+ "name": "kdfMeta",
1081
+ "type": "jsonb",
1082
+ "primaryKey": false,
1083
+ "notNull": true,
1084
+ "default": "'{}'::jsonb"
1085
+ },
1086
+ "status": {
1087
+ "name": "status",
1088
+ "type": "text",
1089
+ "primaryKey": false,
1090
+ "notNull": true,
1091
+ "default": "'active'"
1092
+ },
1093
+ "createdBy": {
1094
+ "name": "createdBy",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": false
1098
+ },
1099
+ "createdAt": {
1100
+ "name": "createdAt",
1101
+ "type": "timestamp with time zone",
1102
+ "primaryKey": false,
1103
+ "notNull": true,
1104
+ "default": "now()"
1105
+ },
1106
+ "retiredAt": {
1107
+ "name": "retiredAt",
1108
+ "type": "timestamp with time zone",
1109
+ "primaryKey": false,
1110
+ "notNull": false
1111
+ }
1112
+ },
1113
+ "indexes": {
1114
+ "chatv3_room_epoch_room_epoch_unique": {
1115
+ "name": "chatv3_room_epoch_room_epoch_unique",
1116
+ "columns": [
1117
+ {
1118
+ "expression": "roomId",
1119
+ "isExpression": false,
1120
+ "asc": true,
1121
+ "nulls": "last"
1122
+ },
1123
+ {
1124
+ "expression": "epoch",
1125
+ "isExpression": false,
1126
+ "asc": true,
1127
+ "nulls": "last"
1128
+ }
1129
+ ],
1130
+ "isUnique": true,
1131
+ "concurrently": false,
1132
+ "method": "btree",
1133
+ "with": {}
1134
+ },
1135
+ "chatv3_room_epoch_idx_room_status": {
1136
+ "name": "chatv3_room_epoch_idx_room_status",
1137
+ "columns": [
1138
+ {
1139
+ "expression": "tenantId",
1140
+ "isExpression": false,
1141
+ "asc": true,
1142
+ "nulls": "last"
1143
+ },
1144
+ {
1145
+ "expression": "roomId",
1146
+ "isExpression": false,
1147
+ "asc": true,
1148
+ "nulls": "last"
1149
+ },
1150
+ {
1151
+ "expression": "status",
1152
+ "isExpression": false,
1153
+ "asc": true,
1154
+ "nulls": "last"
1155
+ }
1156
+ ],
1157
+ "isUnique": false,
1158
+ "concurrently": false,
1159
+ "method": "btree",
1160
+ "with": {}
1161
+ }
1162
+ },
1163
+ "foreignKeys": {
1164
+ "chatv3-room-epochs_roomId_chatv3-rooms_id_fk": {
1165
+ "name": "chatv3-room-epochs_roomId_chatv3-rooms_id_fk",
1166
+ "tableFrom": "chatv3-room-epochs",
1167
+ "tableTo": "chatv3-rooms",
1168
+ "columnsFrom": [
1169
+ "roomId"
1170
+ ],
1171
+ "columnsTo": [
1172
+ "id"
1173
+ ],
1174
+ "onDelete": "cascade",
1175
+ "onUpdate": "no action"
1176
+ }
1177
+ },
1178
+ "compositePrimaryKeys": {},
1179
+ "uniqueConstraints": {},
1180
+ "policies": {},
1181
+ "checkConstraints": {},
1182
+ "isRLSEnabled": false
1183
+ },
1184
+ "public.chatv3-member-devices": {
1185
+ "name": "chatv3-member-devices",
1186
+ "schema": "",
1187
+ "columns": {
1188
+ "id": {
1189
+ "name": "id",
1190
+ "type": "uuid",
1191
+ "primaryKey": true,
1192
+ "notNull": true,
1193
+ "default": "gen_random_uuid()"
1194
+ },
1195
+ "tenantId": {
1196
+ "name": "tenantId",
1197
+ "type": "text",
1198
+ "primaryKey": false,
1199
+ "notNull": true,
1200
+ "default": "'default'"
1201
+ },
1202
+ "memberId": {
1203
+ "name": "memberId",
1204
+ "type": "uuid",
1205
+ "primaryKey": false,
1206
+ "notNull": true
1207
+ },
1208
+ "deviceLabel": {
1209
+ "name": "deviceLabel",
1210
+ "type": "text",
1211
+ "primaryKey": false,
1212
+ "notNull": false
1213
+ },
1214
+ "identityPublicKey": {
1215
+ "name": "identityPublicKey",
1216
+ "type": "text",
1217
+ "primaryKey": false,
1218
+ "notNull": true
1219
+ },
1220
+ "signingPublicKey": {
1221
+ "name": "signingPublicKey",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": false
1225
+ },
1226
+ "status": {
1227
+ "name": "status",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true,
1231
+ "default": "'active'"
1232
+ },
1233
+ "createdAt": {
1234
+ "name": "createdAt",
1235
+ "type": "timestamp with time zone",
1236
+ "primaryKey": false,
1237
+ "notNull": true,
1238
+ "default": "now()"
1239
+ },
1240
+ "lastSeenAt": {
1241
+ "name": "lastSeenAt",
1242
+ "type": "timestamp with time zone",
1243
+ "primaryKey": false,
1244
+ "notNull": false
1245
+ },
1246
+ "revokedAt": {
1247
+ "name": "revokedAt",
1248
+ "type": "timestamp with time zone",
1249
+ "primaryKey": false,
1250
+ "notNull": false
1251
+ }
1252
+ },
1253
+ "indexes": {
1254
+ "chatv3_member_device_idx_member_status": {
1255
+ "name": "chatv3_member_device_idx_member_status",
1256
+ "columns": [
1257
+ {
1258
+ "expression": "tenantId",
1259
+ "isExpression": false,
1260
+ "asc": true,
1261
+ "nulls": "last"
1262
+ },
1263
+ {
1264
+ "expression": "memberId",
1265
+ "isExpression": false,
1266
+ "asc": true,
1267
+ "nulls": "last"
1268
+ },
1269
+ {
1270
+ "expression": "status",
1271
+ "isExpression": false,
1272
+ "asc": true,
1273
+ "nulls": "last"
1274
+ }
1275
+ ],
1276
+ "isUnique": false,
1277
+ "concurrently": false,
1278
+ "method": "btree",
1279
+ "with": {}
1280
+ }
1281
+ },
1282
+ "foreignKeys": {
1283
+ "chatv3-member-devices_memberId_chatv3-members_id_fk": {
1284
+ "name": "chatv3-member-devices_memberId_chatv3-members_id_fk",
1285
+ "tableFrom": "chatv3-member-devices",
1286
+ "tableTo": "chatv3-members",
1287
+ "columnsFrom": [
1288
+ "memberId"
1289
+ ],
1290
+ "columnsTo": [
1291
+ "id"
1292
+ ],
1293
+ "onDelete": "cascade",
1294
+ "onUpdate": "no action"
1295
+ }
1296
+ },
1297
+ "compositePrimaryKeys": {},
1298
+ "uniqueConstraints": {},
1299
+ "policies": {},
1300
+ "checkConstraints": {},
1301
+ "isRLSEnabled": false
1302
+ },
1303
+ "public.chatv3-device-key-packages": {
1304
+ "name": "chatv3-device-key-packages",
1305
+ "schema": "",
1306
+ "columns": {
1307
+ "id": {
1308
+ "name": "id",
1309
+ "type": "uuid",
1310
+ "primaryKey": true,
1311
+ "notNull": true,
1312
+ "default": "gen_random_uuid()"
1313
+ },
1314
+ "tenantId": {
1315
+ "name": "tenantId",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "default": "'default'"
1320
+ },
1321
+ "deviceId": {
1322
+ "name": "deviceId",
1323
+ "type": "uuid",
1324
+ "primaryKey": false,
1325
+ "notNull": true
1326
+ },
1327
+ "kind": {
1328
+ "name": "kind",
1329
+ "type": "text",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "default": "'v0'"
1333
+ },
1334
+ "packageBlob": {
1335
+ "name": "packageBlob",
1336
+ "type": "text",
1337
+ "primaryKey": false,
1338
+ "notNull": true
1339
+ },
1340
+ "status": {
1341
+ "name": "status",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": true,
1345
+ "default": "'available'"
1346
+ },
1347
+ "createdAt": {
1348
+ "name": "createdAt",
1349
+ "type": "timestamp with time zone",
1350
+ "primaryKey": false,
1351
+ "notNull": true,
1352
+ "default": "now()"
1353
+ },
1354
+ "consumedAt": {
1355
+ "name": "consumedAt",
1356
+ "type": "timestamp with time zone",
1357
+ "primaryKey": false,
1358
+ "notNull": false
1359
+ }
1360
+ },
1361
+ "indexes": {
1362
+ "chatv3_device_key_package_idx_device_status": {
1363
+ "name": "chatv3_device_key_package_idx_device_status",
1364
+ "columns": [
1365
+ {
1366
+ "expression": "deviceId",
1367
+ "isExpression": false,
1368
+ "asc": true,
1369
+ "nulls": "last"
1370
+ },
1371
+ {
1372
+ "expression": "status",
1373
+ "isExpression": false,
1374
+ "asc": true,
1375
+ "nulls": "last"
1376
+ }
1377
+ ],
1378
+ "isUnique": false,
1379
+ "concurrently": false,
1380
+ "method": "btree",
1381
+ "with": {}
1382
+ }
1383
+ },
1384
+ "foreignKeys": {
1385
+ "chatv3-device-key-packages_deviceId_chatv3-member-devices_id_fk": {
1386
+ "name": "chatv3-device-key-packages_deviceId_chatv3-member-devices_id_fk",
1387
+ "tableFrom": "chatv3-device-key-packages",
1388
+ "tableTo": "chatv3-member-devices",
1389
+ "columnsFrom": [
1390
+ "deviceId"
1391
+ ],
1392
+ "columnsTo": [
1393
+ "id"
1394
+ ],
1395
+ "onDelete": "cascade",
1396
+ "onUpdate": "no action"
1397
+ }
1398
+ },
1399
+ "compositePrimaryKeys": {},
1400
+ "uniqueConstraints": {},
1401
+ "policies": {},
1402
+ "checkConstraints": {},
1403
+ "isRLSEnabled": false
1404
+ },
1405
+ "public.chatv3-welcome-envelopes": {
1406
+ "name": "chatv3-welcome-envelopes",
1407
+ "schema": "",
1408
+ "columns": {
1409
+ "id": {
1410
+ "name": "id",
1411
+ "type": "uuid",
1412
+ "primaryKey": true,
1413
+ "notNull": true,
1414
+ "default": "gen_random_uuid()"
1415
+ },
1416
+ "tenantId": {
1417
+ "name": "tenantId",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "default": "'default'"
1422
+ },
1423
+ "roomId": {
1424
+ "name": "roomId",
1425
+ "type": "uuid",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ },
1429
+ "epoch": {
1430
+ "name": "epoch",
1431
+ "type": "integer",
1432
+ "primaryKey": false,
1433
+ "notNull": true
1434
+ },
1435
+ "targetDeviceId": {
1436
+ "name": "targetDeviceId",
1437
+ "type": "uuid",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "envelopeBlob": {
1442
+ "name": "envelopeBlob",
1443
+ "type": "text",
1444
+ "primaryKey": false,
1445
+ "notNull": true
1446
+ },
1447
+ "status": {
1448
+ "name": "status",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": true,
1452
+ "default": "'pending'"
1453
+ },
1454
+ "createdBy": {
1455
+ "name": "createdBy",
1456
+ "type": "text",
1457
+ "primaryKey": false,
1458
+ "notNull": false
1459
+ },
1460
+ "createdAt": {
1461
+ "name": "createdAt",
1462
+ "type": "timestamp with time zone",
1463
+ "primaryKey": false,
1464
+ "notNull": true,
1465
+ "default": "now()"
1466
+ },
1467
+ "claimedAt": {
1468
+ "name": "claimedAt",
1469
+ "type": "timestamp with time zone",
1470
+ "primaryKey": false,
1471
+ "notNull": false
1472
+ }
1473
+ },
1474
+ "indexes": {
1475
+ "chatv3_welcome_envelope_idx_target_status": {
1476
+ "name": "chatv3_welcome_envelope_idx_target_status",
1477
+ "columns": [
1478
+ {
1479
+ "expression": "targetDeviceId",
1480
+ "isExpression": false,
1481
+ "asc": true,
1482
+ "nulls": "last"
1483
+ },
1484
+ {
1485
+ "expression": "status",
1486
+ "isExpression": false,
1487
+ "asc": true,
1488
+ "nulls": "last"
1489
+ }
1490
+ ],
1491
+ "isUnique": false,
1492
+ "concurrently": false,
1493
+ "method": "btree",
1494
+ "with": {}
1495
+ },
1496
+ "chatv3_welcome_envelope_idx_room_epoch": {
1497
+ "name": "chatv3_welcome_envelope_idx_room_epoch",
1498
+ "columns": [
1499
+ {
1500
+ "expression": "roomId",
1501
+ "isExpression": false,
1502
+ "asc": true,
1503
+ "nulls": "last"
1504
+ },
1505
+ {
1506
+ "expression": "epoch",
1507
+ "isExpression": false,
1508
+ "asc": true,
1509
+ "nulls": "last"
1510
+ }
1511
+ ],
1512
+ "isUnique": false,
1513
+ "concurrently": false,
1514
+ "method": "btree",
1515
+ "with": {}
1516
+ }
1517
+ },
1518
+ "foreignKeys": {
1519
+ "chatv3-welcome-envelopes_roomId_chatv3-rooms_id_fk": {
1520
+ "name": "chatv3-welcome-envelopes_roomId_chatv3-rooms_id_fk",
1521
+ "tableFrom": "chatv3-welcome-envelopes",
1522
+ "tableTo": "chatv3-rooms",
1523
+ "columnsFrom": [
1524
+ "roomId"
1525
+ ],
1526
+ "columnsTo": [
1527
+ "id"
1528
+ ],
1529
+ "onDelete": "cascade",
1530
+ "onUpdate": "no action"
1531
+ },
1532
+ "chatv3-welcome-envelopes_targetDeviceId_chatv3-member-devices_id_fk": {
1533
+ "name": "chatv3-welcome-envelopes_targetDeviceId_chatv3-member-devices_id_fk",
1534
+ "tableFrom": "chatv3-welcome-envelopes",
1535
+ "tableTo": "chatv3-member-devices",
1536
+ "columnsFrom": [
1537
+ "targetDeviceId"
1538
+ ],
1539
+ "columnsTo": [
1540
+ "id"
1541
+ ],
1542
+ "onDelete": "cascade",
1543
+ "onUpdate": "no action"
1544
+ }
1545
+ },
1546
+ "compositePrimaryKeys": {},
1547
+ "uniqueConstraints": {},
1548
+ "policies": {},
1549
+ "checkConstraints": {},
1550
+ "isRLSEnabled": false
1551
+ },
1552
+ "public.chatv3-messages": {
1553
+ "name": "chatv3-messages",
1554
+ "schema": "",
1555
+ "columns": {
1556
+ "id": {
1557
+ "name": "id",
1558
+ "type": "uuid",
1559
+ "primaryKey": true,
1560
+ "notNull": true,
1561
+ "default": "gen_random_uuid()"
1562
+ },
1563
+ "tenantId": {
1564
+ "name": "tenantId",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true,
1568
+ "default": "'default'"
1569
+ },
1570
+ "roomId": {
1571
+ "name": "roomId",
1572
+ "type": "uuid",
1573
+ "primaryKey": false,
1574
+ "notNull": true
1575
+ },
1576
+ "seq": {
1577
+ "name": "seq",
1578
+ "type": "integer",
1579
+ "primaryKey": false,
1580
+ "notNull": true
1581
+ },
1582
+ "senderMemberId": {
1583
+ "name": "senderMemberId",
1584
+ "type": "uuid",
1585
+ "primaryKey": false,
1586
+ "notNull": true
1587
+ },
1588
+ "senderDeviceId": {
1589
+ "name": "senderDeviceId",
1590
+ "type": "uuid",
1591
+ "primaryKey": false,
1592
+ "notNull": false
1593
+ },
1594
+ "kind": {
1595
+ "name": "kind",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "default": "'message'"
1600
+ },
1601
+ "protocolVersion": {
1602
+ "name": "protocolVersion",
1603
+ "type": "integer",
1604
+ "primaryKey": false,
1605
+ "notNull": true,
1606
+ "default": 1
1607
+ },
1608
+ "cipherSuite": {
1609
+ "name": "cipherSuite",
1610
+ "type": "text",
1611
+ "primaryKey": false,
1612
+ "notNull": true
1613
+ },
1614
+ "epoch": {
1615
+ "name": "epoch",
1616
+ "type": "integer",
1617
+ "primaryKey": false,
1618
+ "notNull": true
1619
+ },
1620
+ "ciphertext": {
1621
+ "name": "ciphertext",
1622
+ "type": "text",
1623
+ "primaryKey": false,
1624
+ "notNull": true
1625
+ },
1626
+ "nonce": {
1627
+ "name": "nonce",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": true
1631
+ },
1632
+ "aad": {
1633
+ "name": "aad",
1634
+ "type": "text",
1635
+ "primaryKey": false,
1636
+ "notNull": false
1637
+ },
1638
+ "authTag": {
1639
+ "name": "authTag",
1640
+ "type": "text",
1641
+ "primaryKey": false,
1642
+ "notNull": false
1643
+ },
1644
+ "mentions": {
1645
+ "name": "mentions",
1646
+ "type": "jsonb",
1647
+ "primaryKey": false,
1648
+ "notNull": true,
1649
+ "default": "'[]'::jsonb"
1650
+ },
1651
+ "replyToSeq": {
1652
+ "name": "replyToSeq",
1653
+ "type": "integer",
1654
+ "primaryKey": false,
1655
+ "notNull": false
1656
+ },
1657
+ "idempotencyKey": {
1658
+ "name": "idempotencyKey",
1659
+ "type": "text",
1660
+ "primaryKey": false,
1661
+ "notNull": false
1662
+ },
1663
+ "createdAt": {
1664
+ "name": "createdAt",
1665
+ "type": "timestamp with time zone",
1666
+ "primaryKey": false,
1667
+ "notNull": true,
1668
+ "default": "now()"
1669
+ }
1670
+ },
1671
+ "indexes": {
1672
+ "chatv3_message_room_seq_unique": {
1673
+ "name": "chatv3_message_room_seq_unique",
1674
+ "columns": [
1675
+ {
1676
+ "expression": "roomId",
1677
+ "isExpression": false,
1678
+ "asc": true,
1679
+ "nulls": "last"
1680
+ },
1681
+ {
1682
+ "expression": "seq",
1683
+ "isExpression": false,
1684
+ "asc": true,
1685
+ "nulls": "last"
1686
+ }
1687
+ ],
1688
+ "isUnique": true,
1689
+ "concurrently": false,
1690
+ "method": "btree",
1691
+ "with": {}
1692
+ },
1693
+ "chatv3_message_room_idempotency_unique": {
1694
+ "name": "chatv3_message_room_idempotency_unique",
1695
+ "columns": [
1696
+ {
1697
+ "expression": "roomId",
1698
+ "isExpression": false,
1699
+ "asc": true,
1700
+ "nulls": "last"
1701
+ },
1702
+ {
1703
+ "expression": "idempotencyKey",
1704
+ "isExpression": false,
1705
+ "asc": true,
1706
+ "nulls": "last"
1707
+ }
1708
+ ],
1709
+ "isUnique": true,
1710
+ "concurrently": false,
1711
+ "method": "btree",
1712
+ "with": {}
1713
+ },
1714
+ "chatv3_message_idx_room_created": {
1715
+ "name": "chatv3_message_idx_room_created",
1716
+ "columns": [
1717
+ {
1718
+ "expression": "roomId",
1719
+ "isExpression": false,
1720
+ "asc": true,
1721
+ "nulls": "last"
1722
+ },
1723
+ {
1724
+ "expression": "createdAt",
1725
+ "isExpression": false,
1726
+ "asc": true,
1727
+ "nulls": "last"
1728
+ }
1729
+ ],
1730
+ "isUnique": false,
1731
+ "concurrently": false,
1732
+ "method": "btree",
1733
+ "with": {}
1734
+ },
1735
+ "chatv3_message_idx_tenant_room_kind": {
1736
+ "name": "chatv3_message_idx_tenant_room_kind",
1737
+ "columns": [
1738
+ {
1739
+ "expression": "tenantId",
1740
+ "isExpression": false,
1741
+ "asc": true,
1742
+ "nulls": "last"
1743
+ },
1744
+ {
1745
+ "expression": "roomId",
1746
+ "isExpression": false,
1747
+ "asc": true,
1748
+ "nulls": "last"
1749
+ },
1750
+ {
1751
+ "expression": "kind",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ }
1756
+ ],
1757
+ "isUnique": false,
1758
+ "concurrently": false,
1759
+ "method": "btree",
1760
+ "with": {}
1761
+ }
1762
+ },
1763
+ "foreignKeys": {
1764
+ "chatv3-messages_roomId_chatv3-rooms_id_fk": {
1765
+ "name": "chatv3-messages_roomId_chatv3-rooms_id_fk",
1766
+ "tableFrom": "chatv3-messages",
1767
+ "tableTo": "chatv3-rooms",
1768
+ "columnsFrom": [
1769
+ "roomId"
1770
+ ],
1771
+ "columnsTo": [
1772
+ "id"
1773
+ ],
1774
+ "onDelete": "cascade",
1775
+ "onUpdate": "no action"
1776
+ }
1777
+ },
1778
+ "compositePrimaryKeys": {},
1779
+ "uniqueConstraints": {},
1780
+ "policies": {},
1781
+ "checkConstraints": {},
1782
+ "isRLSEnabled": false
1783
+ },
1784
+ "public.chatv3-bindings": {
1785
+ "name": "chatv3-bindings",
1786
+ "schema": "",
1787
+ "columns": {
1788
+ "id": {
1789
+ "name": "id",
1790
+ "type": "uuid",
1791
+ "primaryKey": true,
1792
+ "notNull": true,
1793
+ "default": "gen_random_uuid()"
1794
+ },
1795
+ "tenantId": {
1796
+ "name": "tenantId",
1797
+ "type": "text",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "default": "'default'"
1801
+ },
1802
+ "channelId": {
1803
+ "name": "channelId",
1804
+ "type": "uuid",
1805
+ "primaryKey": false,
1806
+ "notNull": true
1807
+ },
1808
+ "roomId": {
1809
+ "name": "roomId",
1810
+ "type": "uuid",
1811
+ "primaryKey": false,
1812
+ "notNull": false
1813
+ },
1814
+ "bindingType": {
1815
+ "name": "bindingType",
1816
+ "type": "text",
1817
+ "primaryKey": false,
1818
+ "notNull": true
1819
+ },
1820
+ "refId": {
1821
+ "name": "refId",
1822
+ "type": "text",
1823
+ "primaryKey": false,
1824
+ "notNull": false
1825
+ },
1826
+ "uri": {
1827
+ "name": "uri",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false
1831
+ },
1832
+ "title": {
1833
+ "name": "title",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": false
1837
+ },
1838
+ "note": {
1839
+ "name": "note",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": false
1843
+ },
1844
+ "createdBy": {
1845
+ "name": "createdBy",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": false
1849
+ },
1850
+ "createdAt": {
1851
+ "name": "createdAt",
1852
+ "type": "timestamp with time zone",
1853
+ "primaryKey": false,
1854
+ "notNull": true,
1855
+ "default": "now()"
1856
+ }
1857
+ },
1858
+ "indexes": {
1859
+ "chatv3_binding_idx_channel_type": {
1860
+ "name": "chatv3_binding_idx_channel_type",
1861
+ "columns": [
1862
+ {
1863
+ "expression": "tenantId",
1864
+ "isExpression": false,
1865
+ "asc": true,
1866
+ "nulls": "last"
1867
+ },
1868
+ {
1869
+ "expression": "channelId",
1870
+ "isExpression": false,
1871
+ "asc": true,
1872
+ "nulls": "last"
1873
+ },
1874
+ {
1875
+ "expression": "bindingType",
1876
+ "isExpression": false,
1877
+ "asc": true,
1878
+ "nulls": "last"
1879
+ }
1880
+ ],
1881
+ "isUnique": false,
1882
+ "concurrently": false,
1883
+ "method": "btree",
1884
+ "with": {}
1885
+ },
1886
+ "chatv3_binding_idx_room": {
1887
+ "name": "chatv3_binding_idx_room",
1888
+ "columns": [
1889
+ {
1890
+ "expression": "roomId",
1891
+ "isExpression": false,
1892
+ "asc": true,
1893
+ "nulls": "last"
1894
+ }
1895
+ ],
1896
+ "isUnique": false,
1897
+ "concurrently": false,
1898
+ "method": "btree",
1899
+ "with": {}
1900
+ }
1901
+ },
1902
+ "foreignKeys": {
1903
+ "chatv3-bindings_channelId_chatv3-channels_id_fk": {
1904
+ "name": "chatv3-bindings_channelId_chatv3-channels_id_fk",
1905
+ "tableFrom": "chatv3-bindings",
1906
+ "tableTo": "chatv3-channels",
1907
+ "columnsFrom": [
1908
+ "channelId"
1909
+ ],
1910
+ "columnsTo": [
1911
+ "id"
1912
+ ],
1913
+ "onDelete": "cascade",
1914
+ "onUpdate": "no action"
1915
+ },
1916
+ "chatv3-bindings_roomId_chatv3-rooms_id_fk": {
1917
+ "name": "chatv3-bindings_roomId_chatv3-rooms_id_fk",
1918
+ "tableFrom": "chatv3-bindings",
1919
+ "tableTo": "chatv3-rooms",
1920
+ "columnsFrom": [
1921
+ "roomId"
1922
+ ],
1923
+ "columnsTo": [
1924
+ "id"
1925
+ ],
1926
+ "onDelete": "cascade",
1927
+ "onUpdate": "no action"
1928
+ }
1929
+ },
1930
+ "compositePrimaryKeys": {},
1931
+ "uniqueConstraints": {},
1932
+ "policies": {},
1933
+ "checkConstraints": {},
1934
+ "isRLSEnabled": false
1935
+ },
1936
+ "public.chatv3-presence": {
1937
+ "name": "chatv3-presence",
1938
+ "schema": "",
1939
+ "columns": {
1940
+ "id": {
1941
+ "name": "id",
1942
+ "type": "uuid",
1943
+ "primaryKey": true,
1944
+ "notNull": true,
1945
+ "default": "gen_random_uuid()"
1946
+ },
1947
+ "tenantId": {
1948
+ "name": "tenantId",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": true,
1952
+ "default": "'default'"
1953
+ },
1954
+ "roomId": {
1955
+ "name": "roomId",
1956
+ "type": "uuid",
1957
+ "primaryKey": false,
1958
+ "notNull": true
1959
+ },
1960
+ "memberId": {
1961
+ "name": "memberId",
1962
+ "type": "uuid",
1963
+ "primaryKey": false,
1964
+ "notNull": true
1965
+ },
1966
+ "state": {
1967
+ "name": "state",
1968
+ "type": "text",
1969
+ "primaryKey": false,
1970
+ "notNull": true,
1971
+ "default": "'active'"
1972
+ },
1973
+ "note": {
1974
+ "name": "note",
1975
+ "type": "text",
1976
+ "primaryKey": false,
1977
+ "notNull": false
1978
+ },
1979
+ "expiresAt": {
1980
+ "name": "expiresAt",
1981
+ "type": "timestamp with time zone",
1982
+ "primaryKey": false,
1983
+ "notNull": true
1984
+ },
1985
+ "updatedAt": {
1986
+ "name": "updatedAt",
1987
+ "type": "timestamp with time zone",
1988
+ "primaryKey": false,
1989
+ "notNull": true,
1990
+ "default": "now()"
1991
+ }
1992
+ },
1993
+ "indexes": {
1994
+ "chatv3_presence_room_member_unique": {
1995
+ "name": "chatv3_presence_room_member_unique",
1996
+ "columns": [
1997
+ {
1998
+ "expression": "roomId",
1999
+ "isExpression": false,
2000
+ "asc": true,
2001
+ "nulls": "last"
2002
+ },
2003
+ {
2004
+ "expression": "memberId",
2005
+ "isExpression": false,
2006
+ "asc": true,
2007
+ "nulls": "last"
2008
+ }
2009
+ ],
2010
+ "isUnique": true,
2011
+ "concurrently": false,
2012
+ "method": "btree",
2013
+ "with": {}
2014
+ },
2015
+ "chatv3_presence_idx_room_expires": {
2016
+ "name": "chatv3_presence_idx_room_expires",
2017
+ "columns": [
2018
+ {
2019
+ "expression": "roomId",
2020
+ "isExpression": false,
2021
+ "asc": true,
2022
+ "nulls": "last"
2023
+ },
2024
+ {
2025
+ "expression": "expiresAt",
2026
+ "isExpression": false,
2027
+ "asc": true,
2028
+ "nulls": "last"
2029
+ }
2030
+ ],
2031
+ "isUnique": false,
2032
+ "concurrently": false,
2033
+ "method": "btree",
2034
+ "with": {}
2035
+ }
2036
+ },
2037
+ "foreignKeys": {
2038
+ "chatv3-presence_roomId_chatv3-rooms_id_fk": {
2039
+ "name": "chatv3-presence_roomId_chatv3-rooms_id_fk",
2040
+ "tableFrom": "chatv3-presence",
2041
+ "tableTo": "chatv3-rooms",
2042
+ "columnsFrom": [
2043
+ "roomId"
2044
+ ],
2045
+ "columnsTo": [
2046
+ "id"
2047
+ ],
2048
+ "onDelete": "cascade",
2049
+ "onUpdate": "no action"
2050
+ },
2051
+ "chatv3-presence_memberId_chatv3-members_id_fk": {
2052
+ "name": "chatv3-presence_memberId_chatv3-members_id_fk",
2053
+ "tableFrom": "chatv3-presence",
2054
+ "tableTo": "chatv3-members",
2055
+ "columnsFrom": [
2056
+ "memberId"
2057
+ ],
2058
+ "columnsTo": [
2059
+ "id"
2060
+ ],
2061
+ "onDelete": "cascade",
2062
+ "onUpdate": "no action"
2063
+ }
2064
+ },
2065
+ "compositePrimaryKeys": {},
2066
+ "uniqueConstraints": {},
2067
+ "policies": {},
2068
+ "checkConstraints": {},
2069
+ "isRLSEnabled": false
2070
+ },
2071
+ "public.chatv3-webhooks": {
2072
+ "name": "chatv3-webhooks",
2073
+ "schema": "",
2074
+ "columns": {
2075
+ "id": {
2076
+ "name": "id",
2077
+ "type": "uuid",
2078
+ "primaryKey": true,
2079
+ "notNull": true,
2080
+ "default": "gen_random_uuid()"
2081
+ },
2082
+ "tenantId": {
2083
+ "name": "tenantId",
2084
+ "type": "text",
2085
+ "primaryKey": false,
2086
+ "notNull": true,
2087
+ "default": "'default'"
2088
+ },
2089
+ "channelId": {
2090
+ "name": "channelId",
2091
+ "type": "uuid",
2092
+ "primaryKey": false,
2093
+ "notNull": true
2094
+ },
2095
+ "url": {
2096
+ "name": "url",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": true
2100
+ },
2101
+ "signingSecret": {
2102
+ "name": "signingSecret",
2103
+ "type": "text",
2104
+ "primaryKey": false,
2105
+ "notNull": true
2106
+ },
2107
+ "events": {
2108
+ "name": "events",
2109
+ "type": "jsonb",
2110
+ "primaryKey": false,
2111
+ "notNull": true,
2112
+ "default": "'[]'::jsonb"
2113
+ },
2114
+ "label": {
2115
+ "name": "label",
2116
+ "type": "text",
2117
+ "primaryKey": false,
2118
+ "notNull": false
2119
+ },
2120
+ "status": {
2121
+ "name": "status",
2122
+ "type": "text",
2123
+ "primaryKey": false,
2124
+ "notNull": true,
2125
+ "default": "'active'"
2126
+ },
2127
+ "failCount": {
2128
+ "name": "failCount",
2129
+ "type": "integer",
2130
+ "primaryKey": false,
2131
+ "notNull": true,
2132
+ "default": 0
2133
+ },
2134
+ "lastDeliveryAt": {
2135
+ "name": "lastDeliveryAt",
2136
+ "type": "timestamp with time zone",
2137
+ "primaryKey": false,
2138
+ "notNull": false
2139
+ },
2140
+ "lastFailureAt": {
2141
+ "name": "lastFailureAt",
2142
+ "type": "timestamp with time zone",
2143
+ "primaryKey": false,
2144
+ "notNull": false
2145
+ },
2146
+ "createdBy": {
2147
+ "name": "createdBy",
2148
+ "type": "text",
2149
+ "primaryKey": false,
2150
+ "notNull": false
2151
+ },
2152
+ "createdAt": {
2153
+ "name": "createdAt",
2154
+ "type": "timestamp with time zone",
2155
+ "primaryKey": false,
2156
+ "notNull": true,
2157
+ "default": "now()"
2158
+ },
2159
+ "updatedAt": {
2160
+ "name": "updatedAt",
2161
+ "type": "timestamp with time zone",
2162
+ "primaryKey": false,
2163
+ "notNull": true,
2164
+ "default": "now()"
2165
+ }
2166
+ },
2167
+ "indexes": {
2168
+ "chatv3_webhook_idx_channel_status": {
2169
+ "name": "chatv3_webhook_idx_channel_status",
2170
+ "columns": [
2171
+ {
2172
+ "expression": "tenantId",
2173
+ "isExpression": false,
2174
+ "asc": true,
2175
+ "nulls": "last"
2176
+ },
2177
+ {
2178
+ "expression": "channelId",
2179
+ "isExpression": false,
2180
+ "asc": true,
2181
+ "nulls": "last"
2182
+ },
2183
+ {
2184
+ "expression": "status",
2185
+ "isExpression": false,
2186
+ "asc": true,
2187
+ "nulls": "last"
2188
+ }
2189
+ ],
2190
+ "isUnique": false,
2191
+ "concurrently": false,
2192
+ "method": "btree",
2193
+ "with": {}
2194
+ }
2195
+ },
2196
+ "foreignKeys": {
2197
+ "chatv3-webhooks_channelId_chatv3-channels_id_fk": {
2198
+ "name": "chatv3-webhooks_channelId_chatv3-channels_id_fk",
2199
+ "tableFrom": "chatv3-webhooks",
2200
+ "tableTo": "chatv3-channels",
2201
+ "columnsFrom": [
2202
+ "channelId"
2203
+ ],
2204
+ "columnsTo": [
2205
+ "id"
2206
+ ],
2207
+ "onDelete": "cascade",
2208
+ "onUpdate": "no action"
2209
+ }
2210
+ },
2211
+ "compositePrimaryKeys": {},
2212
+ "uniqueConstraints": {},
2213
+ "policies": {},
2214
+ "checkConstraints": {},
2215
+ "isRLSEnabled": false
2216
+ }
2217
+ },
2218
+ "enums": {},
2219
+ "schemas": {},
2220
+ "sequences": {},
2221
+ "roles": {},
2222
+ "policies": {},
2223
+ "views": {},
2224
+ "_meta": {
2225
+ "columns": {},
2226
+ "schemas": {},
2227
+ "tables": {}
2228
+ }
2229
+ }