@shipfox/api-workspaces 7.1.0 → 9.0.2

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 (46) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +68 -0
  3. package/README.md +1 -5
  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/workspaces.d.ts +3 -0
  8. package/dist/core/workspaces.d.ts.map +1 -1
  9. package/dist/core/workspaces.js +6 -1
  10. package/dist/core/workspaces.js.map +1 -1
  11. package/dist/db/db.d.ts +34 -0
  12. package/dist/db/db.d.ts.map +1 -1
  13. package/dist/db/schema/common.d.ts.map +1 -1
  14. package/dist/db/schema/common.js +1 -1
  15. package/dist/db/schema/common.js.map +1 -1
  16. package/dist/db/schema/workspaces.d.ts +17 -0
  17. package/dist/db/schema/workspaces.d.ts.map +1 -1
  18. package/dist/db/schema/workspaces.js +3 -1
  19. package/dist/db/schema/workspaces.js.map +1 -1
  20. package/dist/index.js +2 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/presentation/inter-module.d.ts.map +1 -1
  23. package/dist/presentation/inter-module.js +15 -1
  24. package/dist/presentation/inter-module.js.map +1 -1
  25. package/dist/tsconfig.test.tsbuildinfo +1 -1
  26. package/drizzle/0000_initial.sql +50 -1
  27. package/drizzle/meta/0000_snapshot.json +377 -3
  28. package/drizzle/meta/_journal.json +0 -28
  29. package/package.json +26 -19
  30. package/src/core/entities/workspace.ts +1 -0
  31. package/src/core/workspaces.ts +9 -1
  32. package/src/db/schema/common.ts +1 -3
  33. package/src/db/schema/workspaces.ts +3 -1
  34. package/src/index.ts +1 -1
  35. package/src/presentation/inter-module.test.ts +71 -0
  36. package/src/presentation/inter-module.ts +15 -1
  37. package/test/factories/workspace.ts +1 -0
  38. package/test/globalSetup.ts +1 -1
  39. package/tsconfig.build.tsbuildinfo +1 -1
  40. package/drizzle/0001_memberships_invitations.sql +0 -30
  41. package/drizzle/0002_membership_user_snapshots.sql +0 -40
  42. package/drizzle/0003_outgoing_enchantress.sql +0 -16
  43. package/drizzle/0004_tired_talon.sql +0 -1
  44. package/drizzle/meta/0001_snapshot.json +0 -705
  45. package/drizzle/meta/0003_snapshot.json +0 -442
  46. package/drizzle/meta/0004_snapshot.json +0 -448
@@ -1,448 +0,0 @@
1
- {
2
- "id": "8eaf4dda-d82b-4389-9d02-2c2da9258419",
3
- "prevId": "86af97dc-249d-4cc9-98bc-52681d4ca30f",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.workspaces_invitations": {
8
- "name": "workspaces_invitations",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "uuid",
14
- "primaryKey": true,
15
- "notNull": true,
16
- "default": "uuidv7()"
17
- },
18
- "workspace_id": {
19
- "name": "workspace_id",
20
- "type": "uuid",
21
- "primaryKey": false,
22
- "notNull": true
23
- },
24
- "email": {
25
- "name": "email",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": true
29
- },
30
- "hashed_token": {
31
- "name": "hashed_token",
32
- "type": "text",
33
- "primaryKey": false,
34
- "notNull": true
35
- },
36
- "expires_at": {
37
- "name": "expires_at",
38
- "type": "timestamp with time zone",
39
- "primaryKey": false,
40
- "notNull": true
41
- },
42
- "revoked_at": {
43
- "name": "revoked_at",
44
- "type": "timestamp with time zone",
45
- "primaryKey": false,
46
- "notNull": false
47
- },
48
- "accepted_at": {
49
- "name": "accepted_at",
50
- "type": "timestamp with time zone",
51
- "primaryKey": false,
52
- "notNull": false
53
- },
54
- "accepted_by_user_id": {
55
- "name": "accepted_by_user_id",
56
- "type": "uuid",
57
- "primaryKey": false,
58
- "notNull": false
59
- },
60
- "invited_by_user_id": {
61
- "name": "invited_by_user_id",
62
- "type": "uuid",
63
- "primaryKey": false,
64
- "notNull": true
65
- },
66
- "invited_by_display": {
67
- "name": "invited_by_display",
68
- "type": "text",
69
- "primaryKey": false,
70
- "notNull": false
71
- },
72
- "created_at": {
73
- "name": "created_at",
74
- "type": "timestamp with time zone",
75
- "primaryKey": false,
76
- "notNull": true,
77
- "default": "now()"
78
- },
79
- "updated_at": {
80
- "name": "updated_at",
81
- "type": "timestamp with time zone",
82
- "primaryKey": false,
83
- "notNull": true,
84
- "default": "now()"
85
- }
86
- },
87
- "indexes": {
88
- "workspaces_invitations_hashed_token_unique": {
89
- "name": "workspaces_invitations_hashed_token_unique",
90
- "columns": [
91
- {
92
- "expression": "hashed_token",
93
- "isExpression": false,
94
- "asc": true,
95
- "nulls": "last"
96
- }
97
- ],
98
- "isUnique": true,
99
- "concurrently": false,
100
- "method": "btree",
101
- "with": {}
102
- },
103
- "workspaces_invitations_workspace_email_idx": {
104
- "name": "workspaces_invitations_workspace_email_idx",
105
- "columns": [
106
- {
107
- "expression": "workspace_id",
108
- "isExpression": false,
109
- "asc": true,
110
- "nulls": "last"
111
- },
112
- {
113
- "expression": "email",
114
- "isExpression": false,
115
- "asc": true,
116
- "nulls": "last"
117
- }
118
- ],
119
- "isUnique": false,
120
- "concurrently": false,
121
- "method": "btree",
122
- "with": {}
123
- }
124
- },
125
- "foreignKeys": {
126
- "workspaces_invitations_workspace_id_workspaces_id_fk": {
127
- "name": "workspaces_invitations_workspace_id_workspaces_id_fk",
128
- "tableFrom": "workspaces_invitations",
129
- "tableTo": "workspaces",
130
- "columnsFrom": ["workspace_id"],
131
- "columnsTo": ["id"],
132
- "onDelete": "cascade",
133
- "onUpdate": "no action"
134
- }
135
- },
136
- "compositePrimaryKeys": {},
137
- "uniqueConstraints": {},
138
- "policies": {},
139
- "checkConstraints": {},
140
- "isRLSEnabled": false
141
- },
142
- "public.workspaces_memberships": {
143
- "name": "workspaces_memberships",
144
- "schema": "",
145
- "columns": {
146
- "id": {
147
- "name": "id",
148
- "type": "uuid",
149
- "primaryKey": true,
150
- "notNull": true,
151
- "default": "uuidv7()"
152
- },
153
- "user_id": {
154
- "name": "user_id",
155
- "type": "uuid",
156
- "primaryKey": false,
157
- "notNull": true
158
- },
159
- "user_email": {
160
- "name": "user_email",
161
- "type": "text",
162
- "primaryKey": false,
163
- "notNull": true
164
- },
165
- "user_name": {
166
- "name": "user_name",
167
- "type": "text",
168
- "primaryKey": false,
169
- "notNull": false
170
- },
171
- "workspace_id": {
172
- "name": "workspace_id",
173
- "type": "uuid",
174
- "primaryKey": false,
175
- "notNull": true
176
- },
177
- "created_at": {
178
- "name": "created_at",
179
- "type": "timestamp with time zone",
180
- "primaryKey": false,
181
- "notNull": true,
182
- "default": "now()"
183
- },
184
- "updated_at": {
185
- "name": "updated_at",
186
- "type": "timestamp with time zone",
187
- "primaryKey": false,
188
- "notNull": true,
189
- "default": "now()"
190
- }
191
- },
192
- "indexes": {
193
- "workspaces_memberships_user_workspace_unique": {
194
- "name": "workspaces_memberships_user_workspace_unique",
195
- "columns": [
196
- {
197
- "expression": "user_id",
198
- "isExpression": false,
199
- "asc": true,
200
- "nulls": "last"
201
- },
202
- {
203
- "expression": "workspace_id",
204
- "isExpression": false,
205
- "asc": true,
206
- "nulls": "last"
207
- }
208
- ],
209
- "isUnique": true,
210
- "concurrently": false,
211
- "method": "btree",
212
- "with": {}
213
- },
214
- "workspaces_memberships_workspace_id_idx": {
215
- "name": "workspaces_memberships_workspace_id_idx",
216
- "columns": [
217
- {
218
- "expression": "workspace_id",
219
- "isExpression": false,
220
- "asc": true,
221
- "nulls": "last"
222
- }
223
- ],
224
- "isUnique": false,
225
- "concurrently": false,
226
- "method": "btree",
227
- "with": {}
228
- }
229
- },
230
- "foreignKeys": {
231
- "workspaces_memberships_workspace_id_workspaces_id_fk": {
232
- "name": "workspaces_memberships_workspace_id_workspaces_id_fk",
233
- "tableFrom": "workspaces_memberships",
234
- "tableTo": "workspaces",
235
- "columnsFrom": ["workspace_id"],
236
- "columnsTo": ["id"],
237
- "onDelete": "cascade",
238
- "onUpdate": "no action"
239
- }
240
- },
241
- "compositePrimaryKeys": {},
242
- "uniqueConstraints": {},
243
- "policies": {},
244
- "checkConstraints": {},
245
- "isRLSEnabled": false
246
- },
247
- "public.workspaces_outbox": {
248
- "name": "workspaces_outbox",
249
- "schema": "",
250
- "columns": {
251
- "id": {
252
- "name": "id",
253
- "type": "uuid",
254
- "primaryKey": true,
255
- "notNull": true,
256
- "default": "uuidv7()"
257
- },
258
- "event_type": {
259
- "name": "event_type",
260
- "type": "text",
261
- "primaryKey": false,
262
- "notNull": true
263
- },
264
- "ordering_key": {
265
- "name": "ordering_key",
266
- "type": "text",
267
- "primaryKey": false,
268
- "notNull": false
269
- },
270
- "payload": {
271
- "name": "payload",
272
- "type": "jsonb",
273
- "primaryKey": false,
274
- "notNull": true
275
- },
276
- "created_at": {
277
- "name": "created_at",
278
- "type": "timestamp with time zone",
279
- "primaryKey": false,
280
- "notNull": true,
281
- "default": "now()"
282
- },
283
- "dispatched_at": {
284
- "name": "dispatched_at",
285
- "type": "timestamp with time zone",
286
- "primaryKey": false,
287
- "notNull": false
288
- },
289
- "dispatch_attempts": {
290
- "name": "dispatch_attempts",
291
- "type": "integer",
292
- "primaryKey": false,
293
- "notNull": true,
294
- "default": 0
295
- },
296
- "next_dispatch_at": {
297
- "name": "next_dispatch_at",
298
- "type": "timestamp with time zone",
299
- "primaryKey": false,
300
- "notNull": true,
301
- "default": "now()"
302
- },
303
- "last_dispatch_error": {
304
- "name": "last_dispatch_error",
305
- "type": "jsonb",
306
- "primaryKey": false,
307
- "notNull": false
308
- },
309
- "last_dispatch_failed_at": {
310
- "name": "last_dispatch_failed_at",
311
- "type": "timestamp with time zone",
312
- "primaryKey": false,
313
- "notNull": false
314
- },
315
- "dead_lettered_at": {
316
- "name": "dead_lettered_at",
317
- "type": "timestamp with time zone",
318
- "primaryKey": false,
319
- "notNull": false
320
- }
321
- },
322
- "indexes": {
323
- "workspaces_outbox_pending_idx": {
324
- "name": "workspaces_outbox_pending_idx",
325
- "columns": [
326
- {
327
- "expression": "next_dispatch_at",
328
- "isExpression": false,
329
- "asc": true,
330
- "nulls": "last"
331
- },
332
- {
333
- "expression": "created_at",
334
- "isExpression": false,
335
- "asc": true,
336
- "nulls": "last"
337
- }
338
- ],
339
- "isUnique": false,
340
- "where": "\"dispatched_at\" IS NULL AND \"dead_lettered_at\" IS NULL",
341
- "concurrently": false,
342
- "method": "btree",
343
- "with": {}
344
- },
345
- "workspaces_outbox_dispatched_retention_idx": {
346
- "name": "workspaces_outbox_dispatched_retention_idx",
347
- "columns": [
348
- {
349
- "expression": "dispatched_at",
350
- "isExpression": false,
351
- "asc": true,
352
- "nulls": "last"
353
- },
354
- {
355
- "expression": "id",
356
- "isExpression": false,
357
- "asc": true,
358
- "nulls": "last"
359
- }
360
- ],
361
- "isUnique": false,
362
- "where": "\"dispatched_at\" IS NOT NULL",
363
- "concurrently": false,
364
- "method": "btree",
365
- "with": {}
366
- }
367
- },
368
- "foreignKeys": {},
369
- "compositePrimaryKeys": {},
370
- "uniqueConstraints": {},
371
- "policies": {},
372
- "checkConstraints": {},
373
- "isRLSEnabled": false
374
- },
375
- "public.workspaces": {
376
- "name": "workspaces",
377
- "schema": "",
378
- "columns": {
379
- "id": {
380
- "name": "id",
381
- "type": "uuid",
382
- "primaryKey": true,
383
- "notNull": true,
384
- "default": "uuidv7()"
385
- },
386
- "name": {
387
- "name": "name",
388
- "type": "text",
389
- "primaryKey": false,
390
- "notNull": true
391
- },
392
- "status": {
393
- "name": "status",
394
- "type": "workspaces_workspace_status",
395
- "typeSchema": "public",
396
- "primaryKey": false,
397
- "notNull": true,
398
- "default": "'active'"
399
- },
400
- "settings": {
401
- "name": "settings",
402
- "type": "jsonb",
403
- "primaryKey": false,
404
- "notNull": true,
405
- "default": "'{}'::jsonb"
406
- },
407
- "created_at": {
408
- "name": "created_at",
409
- "type": "timestamp with time zone",
410
- "primaryKey": false,
411
- "notNull": true,
412
- "default": "now()"
413
- },
414
- "updated_at": {
415
- "name": "updated_at",
416
- "type": "timestamp with time zone",
417
- "primaryKey": false,
418
- "notNull": true,
419
- "default": "now()"
420
- }
421
- },
422
- "indexes": {},
423
- "foreignKeys": {},
424
- "compositePrimaryKeys": {},
425
- "uniqueConstraints": {},
426
- "policies": {},
427
- "checkConstraints": {},
428
- "isRLSEnabled": false
429
- }
430
- },
431
- "enums": {
432
- "public.workspaces_workspace_status": {
433
- "name": "workspaces_workspace_status",
434
- "schema": "public",
435
- "values": ["active", "suspended", "deleted"]
436
- }
437
- },
438
- "schemas": {},
439
- "sequences": {},
440
- "roles": {},
441
- "policies": {},
442
- "views": {},
443
- "_meta": {
444
- "columns": {},
445
- "schemas": {},
446
- "tables": {}
447
- }
448
- }