@shipfox/api-workspaces 10.2.0 → 12.0.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 (167) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +27 -4
  4. package/dist/core/entities/workspace.d.ts +1 -0
  5. package/dist/core/entities/workspace.d.ts.map +1 -1
  6. package/dist/core/entities/workspace.js.map +1 -1
  7. package/dist/core/errors.d.ts +3 -0
  8. package/dist/core/errors.d.ts.map +1 -1
  9. package/dist/core/errors.js +6 -0
  10. package/dist/core/errors.js.map +1 -1
  11. package/dist/core/index.d.ts +2 -2
  12. package/dist/core/index.d.ts.map +1 -1
  13. package/dist/core/index.js +2 -2
  14. package/dist/core/index.js.map +1 -1
  15. package/dist/core/invitations.d.ts.map +1 -1
  16. package/dist/core/invitations.js +7 -4
  17. package/dist/core/invitations.js.map +1 -1
  18. package/dist/core/rate-limit.d.ts +39 -0
  19. package/dist/core/rate-limit.d.ts.map +1 -0
  20. package/dist/core/rate-limit.js +70 -0
  21. package/dist/core/rate-limit.js.map +1 -0
  22. package/dist/core/workspaces.d.ts +8 -0
  23. package/dist/core/workspaces.d.ts.map +1 -1
  24. package/dist/core/workspaces.js +47 -7
  25. package/dist/core/workspaces.js.map +1 -1
  26. package/dist/db/db.d.ts +320 -0
  27. package/dist/db/db.d.ts.map +1 -1
  28. package/dist/db/db.js +3 -1
  29. package/dist/db/db.js.map +1 -1
  30. package/dist/db/index.d.ts +4 -1
  31. package/dist/db/index.d.ts.map +1 -1
  32. package/dist/db/index.js +3 -1
  33. package/dist/db/index.js.map +1 -1
  34. package/dist/db/memberships.d.ts +1 -0
  35. package/dist/db/memberships.d.ts.map +1 -1
  36. package/dist/db/memberships.js +2 -0
  37. package/dist/db/memberships.js.map +1 -1
  38. package/dist/db/rate-limits.d.ts +9 -0
  39. package/dist/db/rate-limits.d.ts.map +1 -0
  40. package/dist/db/rate-limits.js +43 -0
  41. package/dist/db/rate-limits.js.map +1 -0
  42. package/dist/db/schema/rate-limits.d.ts +145 -0
  43. package/dist/db/schema/rate-limits.d.ts.map +1 -0
  44. package/dist/db/schema/rate-limits.js +25 -0
  45. package/dist/db/schema/rate-limits.js.map +1 -0
  46. package/dist/db/schema/workspaces.d.ts +17 -0
  47. package/dist/db/schema/workspaces.d.ts.map +1 -1
  48. package/dist/db/schema/workspaces.js +5 -2
  49. package/dist/db/schema/workspaces.js.map +1 -1
  50. package/dist/db/workspaces.d.ts +11 -1
  51. package/dist/db/workspaces.d.ts.map +1 -1
  52. package/dist/db/workspaces.js +12 -3
  53. package/dist/db/workspaces.js.map +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +1 -1
  57. package/dist/index.js.map +1 -1
  58. package/dist/metrics/instance.d.ts +6 -0
  59. package/dist/metrics/instance.d.ts.map +1 -1
  60. package/dist/metrics/instance.js +12 -0
  61. package/dist/metrics/instance.js.map +1 -1
  62. package/dist/presentation/dto/membership.d.ts.map +1 -1
  63. package/dist/presentation/dto/membership.js +1 -0
  64. package/dist/presentation/dto/membership.js.map +1 -1
  65. package/dist/presentation/dto/workspace.d.ts.map +1 -1
  66. package/dist/presentation/dto/workspace.js +1 -0
  67. package/dist/presentation/dto/workspace.js.map +1 -1
  68. package/dist/presentation/e2eRoutes/create-workspace.d.ts.map +1 -1
  69. package/dist/presentation/e2eRoutes/create-workspace.js +11 -1
  70. package/dist/presentation/e2eRoutes/create-workspace.js.map +1 -1
  71. package/dist/presentation/inter-module.d.ts.map +1 -1
  72. package/dist/presentation/inter-module.js +3 -2
  73. package/dist/presentation/inter-module.js.map +1 -1
  74. package/dist/presentation/routes/index.d.ts.map +1 -1
  75. package/dist/presentation/routes/index.js +3 -1
  76. package/dist/presentation/routes/index.js.map +1 -1
  77. package/dist/presentation/routes/invitations/create.d.ts.map +1 -1
  78. package/dist/presentation/routes/invitations/create.js +5 -1
  79. package/dist/presentation/routes/invitations/create.js.map +1 -1
  80. package/dist/presentation/routes/invitations/list.d.ts.map +1 -1
  81. package/dist/presentation/routes/invitations/list.js +5 -1
  82. package/dist/presentation/routes/invitations/list.js.map +1 -1
  83. package/dist/presentation/routes/invitations/revoke.d.ts.map +1 -1
  84. package/dist/presentation/routes/invitations/revoke.js +5 -1
  85. package/dist/presentation/routes/invitations/revoke.js.map +1 -1
  86. package/dist/presentation/routes/members/list.d.ts.map +1 -1
  87. package/dist/presentation/routes/members/list.js +5 -1
  88. package/dist/presentation/routes/members/list.js.map +1 -1
  89. package/dist/presentation/routes/members/remove.d.ts.map +1 -1
  90. package/dist/presentation/routes/members/remove.js +5 -1
  91. package/dist/presentation/routes/members/remove.js.map +1 -1
  92. package/dist/presentation/routes/rate-limit.d.ts +3 -0
  93. package/dist/presentation/routes/rate-limit.d.ts.map +1 -0
  94. package/dist/presentation/routes/rate-limit.js +42 -0
  95. package/dist/presentation/routes/rate-limit.js.map +1 -0
  96. package/dist/presentation/routes/workspaces/create.d.ts.map +1 -1
  97. package/dist/presentation/routes/workspaces/create.js +11 -1
  98. package/dist/presentation/routes/workspaces/create.js.map +1 -1
  99. package/dist/presentation/routes/workspaces/index.d.ts +2 -0
  100. package/dist/presentation/routes/workspaces/index.d.ts.map +1 -1
  101. package/dist/presentation/routes/workspaces/index.js +2 -0
  102. package/dist/presentation/routes/workspaces/index.js.map +1 -1
  103. package/dist/presentation/routes/workspaces/slug-availability.d.ts +2 -0
  104. package/dist/presentation/routes/workspaces/slug-availability.d.ts.map +1 -0
  105. package/dist/presentation/routes/workspaces/slug-availability.js +31 -0
  106. package/dist/presentation/routes/workspaces/slug-availability.js.map +1 -0
  107. package/dist/presentation/routes/workspaces/update.d.ts +2 -0
  108. package/dist/presentation/routes/workspaces/update.d.ts.map +1 -0
  109. package/dist/presentation/routes/workspaces/update.js +49 -0
  110. package/dist/presentation/routes/workspaces/update.js.map +1 -0
  111. package/dist/tsconfig.test.tsbuildinfo +1 -1
  112. package/drizzle/0000_initial.sql +2 -0
  113. package/drizzle/0003_dapper_talos.sql +13 -0
  114. package/drizzle/meta/0000_snapshot.json +23 -1
  115. package/drizzle/meta/0003_snapshot.json +689 -0
  116. package/drizzle/meta/_journal.json +7 -0
  117. package/package.json +14 -12
  118. package/src/core/entities/workspace.ts +1 -0
  119. package/src/core/errors.ts +7 -0
  120. package/src/core/index.ts +3 -0
  121. package/src/core/invitations.test.ts +8 -8
  122. package/src/core/invitations.ts +4 -1
  123. package/src/core/rate-limit.test.ts +113 -0
  124. package/src/core/rate-limit.ts +119 -0
  125. package/src/core/workspaces.test.ts +31 -3
  126. package/src/core/workspaces.ts +51 -4
  127. package/src/db/db.ts +2 -0
  128. package/src/db/index.ts +10 -0
  129. package/src/db/memberships.ts +3 -0
  130. package/src/db/rate-limits.test.ts +74 -0
  131. package/src/db/rate-limits.ts +59 -0
  132. package/src/db/schema/rate-limits.ts +27 -0
  133. package/src/db/schema/workspaces.ts +7 -2
  134. package/src/db/workspaces.ts +21 -1
  135. package/src/index.test.ts +2 -0
  136. package/src/index.ts +1 -0
  137. package/src/metrics/instance.ts +26 -0
  138. package/src/presentation/dto/membership.ts +1 -0
  139. package/src/presentation/dto/workspace.ts +1 -0
  140. package/src/presentation/e2eRoutes/create-workspace.ts +9 -1
  141. package/src/presentation/inter-module.test.ts +69 -0
  142. package/src/presentation/inter-module.ts +7 -4
  143. package/src/presentation/routes/index.ts +8 -1
  144. package/src/presentation/routes/invitations/create.test.ts +15 -0
  145. package/src/presentation/routes/invitations/create.ts +2 -1
  146. package/src/presentation/routes/invitations/list.test.ts +30 -0
  147. package/src/presentation/routes/invitations/list.ts +2 -1
  148. package/src/presentation/routes/invitations/revoke.test.ts +14 -0
  149. package/src/presentation/routes/invitations/revoke.ts +2 -1
  150. package/src/presentation/routes/members/list.test.ts +29 -1
  151. package/src/presentation/routes/members/list.ts +2 -1
  152. package/src/presentation/routes/members/remove.test.ts +14 -0
  153. package/src/presentation/routes/members/remove.ts +2 -1
  154. package/src/presentation/routes/rate-limit.ts +45 -0
  155. package/src/presentation/routes/workspaces/create.test.ts +33 -3
  156. package/src/presentation/routes/workspaces/create.ts +9 -1
  157. package/src/presentation/routes/workspaces/index.ts +2 -0
  158. package/src/presentation/routes/workspaces/list.test.ts +1 -0
  159. package/src/presentation/routes/workspaces/slug-availability.test.ts +159 -0
  160. package/src/presentation/routes/workspaces/slug-availability.ts +30 -0
  161. package/src/presentation/routes/workspaces/update.test.ts +114 -0
  162. package/src/presentation/routes/workspaces/update.ts +41 -0
  163. package/test/env.ts +1 -0
  164. package/test/factories/workspace.ts +3 -1
  165. package/test/globalSetup.ts +1 -1
  166. package/test/routes.ts +26 -7
  167. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,689 @@
1
+ {
2
+ "id": "e5b3f962-5a45-4af5-abc8-e8983ab5b26e",
3
+ "prevId": "496634ce-3e5f-4c06-a9ff-857afa65422c",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.workspaces_admin_command_results": {
8
+ "name": "workspaces_admin_command_results",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "uuidv7()"
17
+ },
18
+ "actor_id": {
19
+ "name": "actor_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "idempotency_key_fingerprint": {
25
+ "name": "idempotency_key_fingerprint",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "command": {
31
+ "name": "command",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "request_fingerprint": {
37
+ "name": "request_fingerprint",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "result": {
43
+ "name": "result",
44
+ "type": "jsonb",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ },
48
+ "created_at": {
49
+ "name": "created_at",
50
+ "type": "timestamp with time zone",
51
+ "primaryKey": false,
52
+ "notNull": true,
53
+ "default": "now()"
54
+ }
55
+ },
56
+ "indexes": {
57
+ "workspaces_admin_command_results_actor_key_unique": {
58
+ "name": "workspaces_admin_command_results_actor_key_unique",
59
+ "columns": [
60
+ {
61
+ "expression": "actor_id",
62
+ "isExpression": false,
63
+ "asc": true,
64
+ "nulls": "last"
65
+ },
66
+ {
67
+ "expression": "idempotency_key_fingerprint",
68
+ "isExpression": false,
69
+ "asc": true,
70
+ "nulls": "last"
71
+ }
72
+ ],
73
+ "isUnique": true,
74
+ "concurrently": false,
75
+ "method": "btree",
76
+ "with": {}
77
+ }
78
+ },
79
+ "foreignKeys": {},
80
+ "compositePrimaryKeys": {},
81
+ "uniqueConstraints": {},
82
+ "policies": {},
83
+ "checkConstraints": {},
84
+ "isRLSEnabled": false
85
+ },
86
+ "public.workspaces_invitations": {
87
+ "name": "workspaces_invitations",
88
+ "schema": "",
89
+ "columns": {
90
+ "id": {
91
+ "name": "id",
92
+ "type": "uuid",
93
+ "primaryKey": true,
94
+ "notNull": true,
95
+ "default": "uuidv7()"
96
+ },
97
+ "workspace_id": {
98
+ "name": "workspace_id",
99
+ "type": "uuid",
100
+ "primaryKey": false,
101
+ "notNull": true
102
+ },
103
+ "email": {
104
+ "name": "email",
105
+ "type": "text",
106
+ "primaryKey": false,
107
+ "notNull": true
108
+ },
109
+ "hashed_token": {
110
+ "name": "hashed_token",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "expires_at": {
116
+ "name": "expires_at",
117
+ "type": "timestamp with time zone",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "revoked_at": {
122
+ "name": "revoked_at",
123
+ "type": "timestamp with time zone",
124
+ "primaryKey": false,
125
+ "notNull": false
126
+ },
127
+ "accepted_at": {
128
+ "name": "accepted_at",
129
+ "type": "timestamp with time zone",
130
+ "primaryKey": false,
131
+ "notNull": false
132
+ },
133
+ "accepted_by_user_id": {
134
+ "name": "accepted_by_user_id",
135
+ "type": "uuid",
136
+ "primaryKey": false,
137
+ "notNull": false
138
+ },
139
+ "invited_by_user_id": {
140
+ "name": "invited_by_user_id",
141
+ "type": "uuid",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ },
145
+ "invited_by_display": {
146
+ "name": "invited_by_display",
147
+ "type": "text",
148
+ "primaryKey": false,
149
+ "notNull": false
150
+ },
151
+ "created_at": {
152
+ "name": "created_at",
153
+ "type": "timestamp with time zone",
154
+ "primaryKey": false,
155
+ "notNull": true,
156
+ "default": "now()"
157
+ },
158
+ "updated_at": {
159
+ "name": "updated_at",
160
+ "type": "timestamp with time zone",
161
+ "primaryKey": false,
162
+ "notNull": true,
163
+ "default": "now()"
164
+ }
165
+ },
166
+ "indexes": {
167
+ "workspaces_invitations_hashed_token_unique": {
168
+ "name": "workspaces_invitations_hashed_token_unique",
169
+ "columns": [
170
+ {
171
+ "expression": "hashed_token",
172
+ "isExpression": false,
173
+ "asc": true,
174
+ "nulls": "last"
175
+ }
176
+ ],
177
+ "isUnique": true,
178
+ "concurrently": false,
179
+ "method": "btree",
180
+ "with": {}
181
+ },
182
+ "workspaces_invitations_workspace_email_idx": {
183
+ "name": "workspaces_invitations_workspace_email_idx",
184
+ "columns": [
185
+ {
186
+ "expression": "workspace_id",
187
+ "isExpression": false,
188
+ "asc": true,
189
+ "nulls": "last"
190
+ },
191
+ {
192
+ "expression": "email",
193
+ "isExpression": false,
194
+ "asc": true,
195
+ "nulls": "last"
196
+ }
197
+ ],
198
+ "isUnique": false,
199
+ "concurrently": false,
200
+ "method": "btree",
201
+ "with": {}
202
+ }
203
+ },
204
+ "foreignKeys": {
205
+ "workspaces_invitations_workspace_id_workspaces_workspaces_id_fk": {
206
+ "name": "workspaces_invitations_workspace_id_workspaces_workspaces_id_fk",
207
+ "tableFrom": "workspaces_invitations",
208
+ "tableTo": "workspaces_workspaces",
209
+ "columnsFrom": ["workspace_id"],
210
+ "columnsTo": ["id"],
211
+ "onDelete": "cascade",
212
+ "onUpdate": "no action"
213
+ }
214
+ },
215
+ "compositePrimaryKeys": {},
216
+ "uniqueConstraints": {},
217
+ "policies": {},
218
+ "checkConstraints": {},
219
+ "isRLSEnabled": false
220
+ },
221
+ "public.workspaces_memberships": {
222
+ "name": "workspaces_memberships",
223
+ "schema": "",
224
+ "columns": {
225
+ "id": {
226
+ "name": "id",
227
+ "type": "uuid",
228
+ "primaryKey": true,
229
+ "notNull": true,
230
+ "default": "uuidv7()"
231
+ },
232
+ "user_id": {
233
+ "name": "user_id",
234
+ "type": "uuid",
235
+ "primaryKey": false,
236
+ "notNull": true
237
+ },
238
+ "user_email": {
239
+ "name": "user_email",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": true
243
+ },
244
+ "user_name": {
245
+ "name": "user_name",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false
249
+ },
250
+ "workspace_id": {
251
+ "name": "workspace_id",
252
+ "type": "uuid",
253
+ "primaryKey": false,
254
+ "notNull": true
255
+ },
256
+ "created_at": {
257
+ "name": "created_at",
258
+ "type": "timestamp with time zone",
259
+ "primaryKey": false,
260
+ "notNull": true,
261
+ "default": "now()"
262
+ },
263
+ "updated_at": {
264
+ "name": "updated_at",
265
+ "type": "timestamp with time zone",
266
+ "primaryKey": false,
267
+ "notNull": true,
268
+ "default": "now()"
269
+ }
270
+ },
271
+ "indexes": {
272
+ "workspaces_memberships_user_workspace_unique": {
273
+ "name": "workspaces_memberships_user_workspace_unique",
274
+ "columns": [
275
+ {
276
+ "expression": "user_id",
277
+ "isExpression": false,
278
+ "asc": true,
279
+ "nulls": "last"
280
+ },
281
+ {
282
+ "expression": "workspace_id",
283
+ "isExpression": false,
284
+ "asc": true,
285
+ "nulls": "last"
286
+ }
287
+ ],
288
+ "isUnique": true,
289
+ "concurrently": false,
290
+ "method": "btree",
291
+ "with": {}
292
+ },
293
+ "workspaces_memberships_workspace_id_idx": {
294
+ "name": "workspaces_memberships_workspace_id_idx",
295
+ "columns": [
296
+ {
297
+ "expression": "workspace_id",
298
+ "isExpression": false,
299
+ "asc": true,
300
+ "nulls": "last"
301
+ }
302
+ ],
303
+ "isUnique": false,
304
+ "concurrently": false,
305
+ "method": "btree",
306
+ "with": {}
307
+ }
308
+ },
309
+ "foreignKeys": {
310
+ "workspaces_memberships_workspace_id_workspaces_workspaces_id_fk": {
311
+ "name": "workspaces_memberships_workspace_id_workspaces_workspaces_id_fk",
312
+ "tableFrom": "workspaces_memberships",
313
+ "tableTo": "workspaces_workspaces",
314
+ "columnsFrom": ["workspace_id"],
315
+ "columnsTo": ["id"],
316
+ "onDelete": "cascade",
317
+ "onUpdate": "no action"
318
+ }
319
+ },
320
+ "compositePrimaryKeys": {},
321
+ "uniqueConstraints": {},
322
+ "policies": {},
323
+ "checkConstraints": {},
324
+ "isRLSEnabled": false
325
+ },
326
+ "public.workspaces_outbox": {
327
+ "name": "workspaces_outbox",
328
+ "schema": "",
329
+ "columns": {
330
+ "id": {
331
+ "name": "id",
332
+ "type": "uuid",
333
+ "primaryKey": true,
334
+ "notNull": true,
335
+ "default": "uuidv7()"
336
+ },
337
+ "event_type": {
338
+ "name": "event_type",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": true
342
+ },
343
+ "ordering_key": {
344
+ "name": "ordering_key",
345
+ "type": "text",
346
+ "primaryKey": false,
347
+ "notNull": false
348
+ },
349
+ "payload": {
350
+ "name": "payload",
351
+ "type": "jsonb",
352
+ "primaryKey": false,
353
+ "notNull": true
354
+ },
355
+ "created_at": {
356
+ "name": "created_at",
357
+ "type": "timestamp with time zone",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "default": "now()"
361
+ },
362
+ "dispatched_at": {
363
+ "name": "dispatched_at",
364
+ "type": "timestamp with time zone",
365
+ "primaryKey": false,
366
+ "notNull": false
367
+ },
368
+ "dispatch_attempts": {
369
+ "name": "dispatch_attempts",
370
+ "type": "integer",
371
+ "primaryKey": false,
372
+ "notNull": true,
373
+ "default": 0
374
+ },
375
+ "next_dispatch_at": {
376
+ "name": "next_dispatch_at",
377
+ "type": "timestamp with time zone",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "now()"
381
+ },
382
+ "last_dispatch_error": {
383
+ "name": "last_dispatch_error",
384
+ "type": "jsonb",
385
+ "primaryKey": false,
386
+ "notNull": false
387
+ },
388
+ "last_dispatch_failed_at": {
389
+ "name": "last_dispatch_failed_at",
390
+ "type": "timestamp with time zone",
391
+ "primaryKey": false,
392
+ "notNull": false
393
+ },
394
+ "dead_lettered_at": {
395
+ "name": "dead_lettered_at",
396
+ "type": "timestamp with time zone",
397
+ "primaryKey": false,
398
+ "notNull": false
399
+ }
400
+ },
401
+ "indexes": {
402
+ "workspaces_outbox_pending_idx": {
403
+ "name": "workspaces_outbox_pending_idx",
404
+ "columns": [
405
+ {
406
+ "expression": "next_dispatch_at",
407
+ "isExpression": false,
408
+ "asc": true,
409
+ "nulls": "last"
410
+ },
411
+ {
412
+ "expression": "created_at",
413
+ "isExpression": false,
414
+ "asc": true,
415
+ "nulls": "last"
416
+ }
417
+ ],
418
+ "isUnique": false,
419
+ "where": "\"dispatched_at\" IS NULL AND \"dead_lettered_at\" IS NULL",
420
+ "concurrently": false,
421
+ "method": "btree",
422
+ "with": {}
423
+ },
424
+ "workspaces_outbox_dispatched_retention_idx": {
425
+ "name": "workspaces_outbox_dispatched_retention_idx",
426
+ "columns": [
427
+ {
428
+ "expression": "dispatched_at",
429
+ "isExpression": false,
430
+ "asc": true,
431
+ "nulls": "last"
432
+ },
433
+ {
434
+ "expression": "id",
435
+ "isExpression": false,
436
+ "asc": true,
437
+ "nulls": "last"
438
+ }
439
+ ],
440
+ "isUnique": false,
441
+ "where": "\"dispatched_at\" IS NOT NULL",
442
+ "concurrently": false,
443
+ "method": "btree",
444
+ "with": {}
445
+ }
446
+ },
447
+ "foreignKeys": {},
448
+ "compositePrimaryKeys": {},
449
+ "uniqueConstraints": {},
450
+ "policies": {},
451
+ "checkConstraints": {},
452
+ "isRLSEnabled": false
453
+ },
454
+ "public.workspaces_rate_limits": {
455
+ "name": "workspaces_rate_limits",
456
+ "schema": "",
457
+ "columns": {
458
+ "action": {
459
+ "name": "action",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": true
463
+ },
464
+ "scope": {
465
+ "name": "scope",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": true
469
+ },
470
+ "identifier_hmac": {
471
+ "name": "identifier_hmac",
472
+ "type": "text",
473
+ "primaryKey": false,
474
+ "notNull": true
475
+ },
476
+ "window_start": {
477
+ "name": "window_start",
478
+ "type": "timestamp with time zone",
479
+ "primaryKey": false,
480
+ "notNull": true
481
+ },
482
+ "count": {
483
+ "name": "count",
484
+ "type": "integer",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "default": 1
488
+ },
489
+ "expires_at": {
490
+ "name": "expires_at",
491
+ "type": "timestamp with time zone",
492
+ "primaryKey": false,
493
+ "notNull": true
494
+ },
495
+ "created_at": {
496
+ "name": "created_at",
497
+ "type": "timestamp with time zone",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "default": "now()"
501
+ },
502
+ "updated_at": {
503
+ "name": "updated_at",
504
+ "type": "timestamp with time zone",
505
+ "primaryKey": false,
506
+ "notNull": true,
507
+ "default": "now()"
508
+ }
509
+ },
510
+ "indexes": {
511
+ "workspaces_rate_limits_window_unique": {
512
+ "name": "workspaces_rate_limits_window_unique",
513
+ "columns": [
514
+ {
515
+ "expression": "action",
516
+ "isExpression": false,
517
+ "asc": true,
518
+ "nulls": "last"
519
+ },
520
+ {
521
+ "expression": "scope",
522
+ "isExpression": false,
523
+ "asc": true,
524
+ "nulls": "last"
525
+ },
526
+ {
527
+ "expression": "identifier_hmac",
528
+ "isExpression": false,
529
+ "asc": true,
530
+ "nulls": "last"
531
+ },
532
+ {
533
+ "expression": "window_start",
534
+ "isExpression": false,
535
+ "asc": true,
536
+ "nulls": "last"
537
+ }
538
+ ],
539
+ "isUnique": true,
540
+ "concurrently": false,
541
+ "method": "btree",
542
+ "with": {}
543
+ },
544
+ "workspaces_rate_limits_expires_at_idx": {
545
+ "name": "workspaces_rate_limits_expires_at_idx",
546
+ "columns": [
547
+ {
548
+ "expression": "expires_at",
549
+ "isExpression": false,
550
+ "asc": true,
551
+ "nulls": "last"
552
+ }
553
+ ],
554
+ "isUnique": false,
555
+ "concurrently": false,
556
+ "method": "btree",
557
+ "with": {}
558
+ }
559
+ },
560
+ "foreignKeys": {},
561
+ "compositePrimaryKeys": {},
562
+ "uniqueConstraints": {},
563
+ "policies": {},
564
+ "checkConstraints": {},
565
+ "isRLSEnabled": false
566
+ },
567
+ "public.workspaces_workspaces": {
568
+ "name": "workspaces_workspaces",
569
+ "schema": "",
570
+ "columns": {
571
+ "id": {
572
+ "name": "id",
573
+ "type": "uuid",
574
+ "primaryKey": true,
575
+ "notNull": true,
576
+ "default": "uuidv7()"
577
+ },
578
+ "name": {
579
+ "name": "name",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true
583
+ },
584
+ "slug": {
585
+ "name": "slug",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true
589
+ },
590
+ "status": {
591
+ "name": "status",
592
+ "type": "workspaces_workspace_status",
593
+ "typeSchema": "public",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "default": "'active'"
597
+ },
598
+ "settings": {
599
+ "name": "settings",
600
+ "type": "jsonb",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "default": "'{}'::jsonb"
604
+ },
605
+ "created_by": {
606
+ "name": "created_by",
607
+ "type": "uuid",
608
+ "primaryKey": false,
609
+ "notNull": false
610
+ },
611
+ "created_at": {
612
+ "name": "created_at",
613
+ "type": "timestamp with time zone",
614
+ "primaryKey": false,
615
+ "notNull": true,
616
+ "default": "now()"
617
+ },
618
+ "updated_at": {
619
+ "name": "updated_at",
620
+ "type": "timestamp with time zone",
621
+ "primaryKey": false,
622
+ "notNull": true,
623
+ "default": "now()"
624
+ }
625
+ },
626
+ "indexes": {
627
+ "workspaces_name_id_idx": {
628
+ "name": "workspaces_name_id_idx",
629
+ "columns": [
630
+ {
631
+ "expression": "name",
632
+ "isExpression": false,
633
+ "asc": true,
634
+ "nulls": "last"
635
+ },
636
+ {
637
+ "expression": "id",
638
+ "isExpression": false,
639
+ "asc": true,
640
+ "nulls": "last"
641
+ }
642
+ ],
643
+ "isUnique": false,
644
+ "concurrently": false,
645
+ "method": "btree",
646
+ "with": {}
647
+ },
648
+ "workspaces_slug_unique": {
649
+ "name": "workspaces_slug_unique",
650
+ "columns": [
651
+ {
652
+ "expression": "slug",
653
+ "isExpression": false,
654
+ "asc": true,
655
+ "nulls": "last"
656
+ }
657
+ ],
658
+ "isUnique": true,
659
+ "concurrently": false,
660
+ "method": "btree",
661
+ "with": {}
662
+ }
663
+ },
664
+ "foreignKeys": {},
665
+ "compositePrimaryKeys": {},
666
+ "uniqueConstraints": {},
667
+ "policies": {},
668
+ "checkConstraints": {},
669
+ "isRLSEnabled": false
670
+ }
671
+ },
672
+ "enums": {
673
+ "public.workspaces_workspace_status": {
674
+ "name": "workspaces_workspace_status",
675
+ "schema": "public",
676
+ "values": ["active", "suspended", "deleted"]
677
+ }
678
+ },
679
+ "schemas": {},
680
+ "sequences": {},
681
+ "roles": {},
682
+ "policies": {},
683
+ "views": {},
684
+ "_meta": {
685
+ "columns": {},
686
+ "schemas": {},
687
+ "tables": {}
688
+ }
689
+ }
@@ -22,6 +22,13 @@
22
22
  "when": 1785225824871,
23
23
  "tag": "0002_wide_enchantress",
24
24
  "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "7",
29
+ "when": 1785483624863,
30
+ "tag": "0003_dapper_talos",
31
+ "breakpoints": true
25
32
  }
26
33
  ]
27
34
  }