@shipfox/api-workspaces 7.0.1 → 9.0.1

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