nobalmako 1.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 (123) hide show
  1. package/README.md +112 -0
  2. package/components.json +22 -0
  3. package/dist/nobalmako.js +272 -0
  4. package/drizzle/0000_pink_spiral.sql +126 -0
  5. package/drizzle/meta/0000_snapshot.json +1027 -0
  6. package/drizzle/meta/_journal.json +13 -0
  7. package/drizzle.config.ts +10 -0
  8. package/eslint.config.mjs +18 -0
  9. package/next.config.ts +7 -0
  10. package/package.json +80 -0
  11. package/postcss.config.mjs +7 -0
  12. package/public/file.svg +1 -0
  13. package/public/globe.svg +1 -0
  14. package/public/next.svg +1 -0
  15. package/public/vercel.svg +1 -0
  16. package/public/window.svg +1 -0
  17. package/server/index.ts +118 -0
  18. package/src/app/api/api-keys/[id]/route.ts +147 -0
  19. package/src/app/api/api-keys/route.ts +151 -0
  20. package/src/app/api/audit-logs/route.ts +84 -0
  21. package/src/app/api/auth/forgot-password/route.ts +47 -0
  22. package/src/app/api/auth/login/route.ts +99 -0
  23. package/src/app/api/auth/logout/route.ts +15 -0
  24. package/src/app/api/auth/me/route.ts +23 -0
  25. package/src/app/api/auth/mfa/setup/route.ts +33 -0
  26. package/src/app/api/auth/mfa/verify/route.ts +45 -0
  27. package/src/app/api/auth/register/route.ts +140 -0
  28. package/src/app/api/auth/reset-password/route.ts +52 -0
  29. package/src/app/api/auth/update/route.ts +71 -0
  30. package/src/app/api/auth/verify/route.ts +39 -0
  31. package/src/app/api/environments/route.ts +227 -0
  32. package/src/app/api/team-members/route.ts +385 -0
  33. package/src/app/api/teams/route.ts +217 -0
  34. package/src/app/api/variable-history/route.ts +218 -0
  35. package/src/app/api/variables/route.ts +476 -0
  36. package/src/app/api/webhooks/route.ts +77 -0
  37. package/src/app/api-keys/APIKeysClient.tsx +316 -0
  38. package/src/app/api-keys/page.tsx +10 -0
  39. package/src/app/api-reference/page.tsx +324 -0
  40. package/src/app/audit-log/AuditLogClient.tsx +229 -0
  41. package/src/app/audit-log/page.tsx +10 -0
  42. package/src/app/auth/forgot-password/page.tsx +121 -0
  43. package/src/app/auth/login/LoginForm.tsx +145 -0
  44. package/src/app/auth/login/page.tsx +11 -0
  45. package/src/app/auth/register/RegisterForm.tsx +156 -0
  46. package/src/app/auth/register/page.tsx +16 -0
  47. package/src/app/auth/reset-password/page.tsx +160 -0
  48. package/src/app/dashboard/DashboardClient.tsx +219 -0
  49. package/src/app/dashboard/page.tsx +11 -0
  50. package/src/app/docs/page.tsx +251 -0
  51. package/src/app/favicon.ico +0 -0
  52. package/src/app/globals.css +123 -0
  53. package/src/app/layout.tsx +35 -0
  54. package/src/app/page.tsx +231 -0
  55. package/src/app/profile/ProfileClient.tsx +230 -0
  56. package/src/app/profile/page.tsx +10 -0
  57. package/src/app/project/[id]/ProjectDetailsClient.tsx +512 -0
  58. package/src/app/project/[id]/page.tsx +17 -0
  59. package/src/bin/nobalmako.ts +341 -0
  60. package/src/components/ApiKeysManager.tsx +529 -0
  61. package/src/components/AppLayout.tsx +193 -0
  62. package/src/components/BulkActions.tsx +138 -0
  63. package/src/components/CreateEnvironmentDialog.tsx +207 -0
  64. package/src/components/CreateTeamDialog.tsx +174 -0
  65. package/src/components/CreateVariableDialog.tsx +311 -0
  66. package/src/components/DeleteEnvironmentDialog.tsx +104 -0
  67. package/src/components/DeleteTeamDialog.tsx +112 -0
  68. package/src/components/DeleteVariableDialog.tsx +103 -0
  69. package/src/components/EditEnvironmentDialog.tsx +202 -0
  70. package/src/components/EditMemberDialog.tsx +143 -0
  71. package/src/components/EditTeamDialog.tsx +178 -0
  72. package/src/components/EditVariableDialog.tsx +231 -0
  73. package/src/components/ImportVariablesDialog.tsx +347 -0
  74. package/src/components/InviteMemberDialog.tsx +191 -0
  75. package/src/components/LeaveProjectDialog.tsx +111 -0
  76. package/src/components/MFASettings.tsx +136 -0
  77. package/src/components/ProjectDiff.tsx +123 -0
  78. package/src/components/Providers.tsx +24 -0
  79. package/src/components/RemoveMemberDialog.tsx +112 -0
  80. package/src/components/SearchDialog.tsx +276 -0
  81. package/src/components/SecurityOverview.tsx +92 -0
  82. package/src/components/TeamMembersManager.tsx +103 -0
  83. package/src/components/VariableHistoryDialog.tsx +265 -0
  84. package/src/components/WebhooksManager.tsx +169 -0
  85. package/src/components/ui/alert-dialog.tsx +160 -0
  86. package/src/components/ui/alert.tsx +59 -0
  87. package/src/components/ui/avatar.tsx +53 -0
  88. package/src/components/ui/badge.tsx +46 -0
  89. package/src/components/ui/button.tsx +62 -0
  90. package/src/components/ui/card.tsx +92 -0
  91. package/src/components/ui/checkbox.tsx +32 -0
  92. package/src/components/ui/dialog.tsx +143 -0
  93. package/src/components/ui/dropdown-menu.tsx +257 -0
  94. package/src/components/ui/input.tsx +21 -0
  95. package/src/components/ui/label.tsx +24 -0
  96. package/src/components/ui/select.tsx +190 -0
  97. package/src/components/ui/separator.tsx +28 -0
  98. package/src/components/ui/sonner.tsx +37 -0
  99. package/src/components/ui/switch.tsx +31 -0
  100. package/src/components/ui/table.tsx +117 -0
  101. package/src/components/ui/tabs.tsx +66 -0
  102. package/src/components/ui/textarea.tsx +18 -0
  103. package/src/hooks/use-api-keys.ts +95 -0
  104. package/src/hooks/use-audit-logs.ts +58 -0
  105. package/src/hooks/use-auth.tsx +121 -0
  106. package/src/hooks/use-environments.ts +33 -0
  107. package/src/hooks/use-project-permissions.ts +49 -0
  108. package/src/hooks/use-team-members.ts +30 -0
  109. package/src/hooks/use-teams.ts +33 -0
  110. package/src/hooks/use-variables.ts +38 -0
  111. package/src/lib/audit.ts +36 -0
  112. package/src/lib/auth.ts +108 -0
  113. package/src/lib/crypto.ts +39 -0
  114. package/src/lib/db.ts +15 -0
  115. package/src/lib/dynamic-providers.ts +19 -0
  116. package/src/lib/email.ts +110 -0
  117. package/src/lib/mail.ts +51 -0
  118. package/src/lib/permissions.ts +51 -0
  119. package/src/lib/schema.ts +240 -0
  120. package/src/lib/seed.ts +107 -0
  121. package/src/lib/utils.ts +6 -0
  122. package/src/lib/webhooks.ts +42 -0
  123. package/tsconfig.json +34 -0
@@ -0,0 +1,1027 @@
1
+ {
2
+ "id": "d3ba481a-3681-40d0-ac8d-3eb9aa170332",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.api_keys": {
8
+ "name": "api_keys",
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
+ "user_id": {
19
+ "name": "user_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "team_id": {
25
+ "name": "team_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": false
29
+ },
30
+ "name": {
31
+ "name": "name",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "key_hash": {
37
+ "name": "key_hash",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "permissions": {
43
+ "name": "permissions",
44
+ "type": "jsonb",
45
+ "primaryKey": false,
46
+ "notNull": false,
47
+ "default": "'[\"read\"]'::jsonb"
48
+ },
49
+ "last_used": {
50
+ "name": "last_used",
51
+ "type": "timestamp",
52
+ "primaryKey": false,
53
+ "notNull": false
54
+ },
55
+ "expires_at": {
56
+ "name": "expires_at",
57
+ "type": "timestamp",
58
+ "primaryKey": false,
59
+ "notNull": false
60
+ },
61
+ "created_at": {
62
+ "name": "created_at",
63
+ "type": "timestamp",
64
+ "primaryKey": false,
65
+ "notNull": true,
66
+ "default": "now()"
67
+ },
68
+ "updated_at": {
69
+ "name": "updated_at",
70
+ "type": "timestamp",
71
+ "primaryKey": false,
72
+ "notNull": true,
73
+ "default": "now()"
74
+ }
75
+ },
76
+ "indexes": {
77
+ "api_keys_user_idx": {
78
+ "name": "api_keys_user_idx",
79
+ "columns": [
80
+ {
81
+ "expression": "user_id",
82
+ "isExpression": false,
83
+ "asc": true,
84
+ "nulls": "last"
85
+ }
86
+ ],
87
+ "isUnique": false,
88
+ "concurrently": false,
89
+ "method": "btree",
90
+ "with": {}
91
+ },
92
+ "api_keys_team_idx": {
93
+ "name": "api_keys_team_idx",
94
+ "columns": [
95
+ {
96
+ "expression": "team_id",
97
+ "isExpression": false,
98
+ "asc": true,
99
+ "nulls": "last"
100
+ }
101
+ ],
102
+ "isUnique": false,
103
+ "concurrently": false,
104
+ "method": "btree",
105
+ "with": {}
106
+ }
107
+ },
108
+ "foreignKeys": {
109
+ "api_keys_user_id_users_id_fk": {
110
+ "name": "api_keys_user_id_users_id_fk",
111
+ "tableFrom": "api_keys",
112
+ "tableTo": "users",
113
+ "columnsFrom": [
114
+ "user_id"
115
+ ],
116
+ "columnsTo": [
117
+ "id"
118
+ ],
119
+ "onDelete": "cascade",
120
+ "onUpdate": "no action"
121
+ },
122
+ "api_keys_team_id_teams_id_fk": {
123
+ "name": "api_keys_team_id_teams_id_fk",
124
+ "tableFrom": "api_keys",
125
+ "tableTo": "teams",
126
+ "columnsFrom": [
127
+ "team_id"
128
+ ],
129
+ "columnsTo": [
130
+ "id"
131
+ ],
132
+ "onDelete": "cascade",
133
+ "onUpdate": "no action"
134
+ }
135
+ },
136
+ "compositePrimaryKeys": {},
137
+ "uniqueConstraints": {},
138
+ "policies": {},
139
+ "checkConstraints": {},
140
+ "isRLSEnabled": false
141
+ },
142
+ "public.audit_logs": {
143
+ "name": "audit_logs",
144
+ "schema": "",
145
+ "columns": {
146
+ "id": {
147
+ "name": "id",
148
+ "type": "uuid",
149
+ "primaryKey": true,
150
+ "notNull": true,
151
+ "default": "gen_random_uuid()"
152
+ },
153
+ "user_id": {
154
+ "name": "user_id",
155
+ "type": "uuid",
156
+ "primaryKey": false,
157
+ "notNull": false
158
+ },
159
+ "team_id": {
160
+ "name": "team_id",
161
+ "type": "uuid",
162
+ "primaryKey": false,
163
+ "notNull": false
164
+ },
165
+ "action": {
166
+ "name": "action",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true
170
+ },
171
+ "resource_type": {
172
+ "name": "resource_type",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": true
176
+ },
177
+ "resource_id": {
178
+ "name": "resource_id",
179
+ "type": "uuid",
180
+ "primaryKey": false,
181
+ "notNull": true
182
+ },
183
+ "old_value": {
184
+ "name": "old_value",
185
+ "type": "jsonb",
186
+ "primaryKey": false,
187
+ "notNull": false
188
+ },
189
+ "new_value": {
190
+ "name": "new_value",
191
+ "type": "jsonb",
192
+ "primaryKey": false,
193
+ "notNull": false
194
+ },
195
+ "ip_address": {
196
+ "name": "ip_address",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": false
200
+ },
201
+ "user_agent": {
202
+ "name": "user_agent",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": false
206
+ },
207
+ "created_at": {
208
+ "name": "created_at",
209
+ "type": "timestamp",
210
+ "primaryKey": false,
211
+ "notNull": true,
212
+ "default": "now()"
213
+ }
214
+ },
215
+ "indexes": {
216
+ "audit_logs_user_idx": {
217
+ "name": "audit_logs_user_idx",
218
+ "columns": [
219
+ {
220
+ "expression": "user_id",
221
+ "isExpression": false,
222
+ "asc": true,
223
+ "nulls": "last"
224
+ }
225
+ ],
226
+ "isUnique": false,
227
+ "concurrently": false,
228
+ "method": "btree",
229
+ "with": {}
230
+ },
231
+ "audit_logs_team_idx": {
232
+ "name": "audit_logs_team_idx",
233
+ "columns": [
234
+ {
235
+ "expression": "team_id",
236
+ "isExpression": false,
237
+ "asc": true,
238
+ "nulls": "last"
239
+ }
240
+ ],
241
+ "isUnique": false,
242
+ "concurrently": false,
243
+ "method": "btree",
244
+ "with": {}
245
+ },
246
+ "audit_logs_resource_idx": {
247
+ "name": "audit_logs_resource_idx",
248
+ "columns": [
249
+ {
250
+ "expression": "resource_type",
251
+ "isExpression": false,
252
+ "asc": true,
253
+ "nulls": "last"
254
+ },
255
+ {
256
+ "expression": "resource_id",
257
+ "isExpression": false,
258
+ "asc": true,
259
+ "nulls": "last"
260
+ }
261
+ ],
262
+ "isUnique": false,
263
+ "concurrently": false,
264
+ "method": "btree",
265
+ "with": {}
266
+ }
267
+ },
268
+ "foreignKeys": {
269
+ "audit_logs_user_id_users_id_fk": {
270
+ "name": "audit_logs_user_id_users_id_fk",
271
+ "tableFrom": "audit_logs",
272
+ "tableTo": "users",
273
+ "columnsFrom": [
274
+ "user_id"
275
+ ],
276
+ "columnsTo": [
277
+ "id"
278
+ ],
279
+ "onDelete": "set null",
280
+ "onUpdate": "no action"
281
+ },
282
+ "audit_logs_team_id_teams_id_fk": {
283
+ "name": "audit_logs_team_id_teams_id_fk",
284
+ "tableFrom": "audit_logs",
285
+ "tableTo": "teams",
286
+ "columnsFrom": [
287
+ "team_id"
288
+ ],
289
+ "columnsTo": [
290
+ "id"
291
+ ],
292
+ "onDelete": "cascade",
293
+ "onUpdate": "no action"
294
+ }
295
+ },
296
+ "compositePrimaryKeys": {},
297
+ "uniqueConstraints": {},
298
+ "policies": {},
299
+ "checkConstraints": {},
300
+ "isRLSEnabled": false
301
+ },
302
+ "public.environment_variables": {
303
+ "name": "environment_variables",
304
+ "schema": "",
305
+ "columns": {
306
+ "id": {
307
+ "name": "id",
308
+ "type": "uuid",
309
+ "primaryKey": true,
310
+ "notNull": true,
311
+ "default": "gen_random_uuid()"
312
+ },
313
+ "team_id": {
314
+ "name": "team_id",
315
+ "type": "uuid",
316
+ "primaryKey": false,
317
+ "notNull": true
318
+ },
319
+ "environment_id": {
320
+ "name": "environment_id",
321
+ "type": "uuid",
322
+ "primaryKey": false,
323
+ "notNull": true
324
+ },
325
+ "key": {
326
+ "name": "key",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "value": {
332
+ "name": "value",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": true
336
+ },
337
+ "description": {
338
+ "name": "description",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": false
342
+ },
343
+ "is_secret": {
344
+ "name": "is_secret",
345
+ "type": "boolean",
346
+ "primaryKey": false,
347
+ "notNull": false,
348
+ "default": false
349
+ },
350
+ "tags": {
351
+ "name": "tags",
352
+ "type": "jsonb",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ },
356
+ "created_by": {
357
+ "name": "created_by",
358
+ "type": "uuid",
359
+ "primaryKey": false,
360
+ "notNull": true
361
+ },
362
+ "updated_by": {
363
+ "name": "updated_by",
364
+ "type": "uuid",
365
+ "primaryKey": false,
366
+ "notNull": false
367
+ },
368
+ "created_at": {
369
+ "name": "created_at",
370
+ "type": "timestamp",
371
+ "primaryKey": false,
372
+ "notNull": true,
373
+ "default": "now()"
374
+ },
375
+ "updated_at": {
376
+ "name": "updated_at",
377
+ "type": "timestamp",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "now()"
381
+ }
382
+ },
383
+ "indexes": {
384
+ "env_vars_team_env_idx": {
385
+ "name": "env_vars_team_env_idx",
386
+ "columns": [
387
+ {
388
+ "expression": "team_id",
389
+ "isExpression": false,
390
+ "asc": true,
391
+ "nulls": "last"
392
+ },
393
+ {
394
+ "expression": "environment_id",
395
+ "isExpression": false,
396
+ "asc": true,
397
+ "nulls": "last"
398
+ }
399
+ ],
400
+ "isUnique": false,
401
+ "concurrently": false,
402
+ "method": "btree",
403
+ "with": {}
404
+ },
405
+ "env_vars_key_idx": {
406
+ "name": "env_vars_key_idx",
407
+ "columns": [
408
+ {
409
+ "expression": "key",
410
+ "isExpression": false,
411
+ "asc": true,
412
+ "nulls": "last"
413
+ }
414
+ ],
415
+ "isUnique": false,
416
+ "concurrently": false,
417
+ "method": "btree",
418
+ "with": {}
419
+ },
420
+ "env_vars_created_by_idx": {
421
+ "name": "env_vars_created_by_idx",
422
+ "columns": [
423
+ {
424
+ "expression": "created_by",
425
+ "isExpression": false,
426
+ "asc": true,
427
+ "nulls": "last"
428
+ }
429
+ ],
430
+ "isUnique": false,
431
+ "concurrently": false,
432
+ "method": "btree",
433
+ "with": {}
434
+ }
435
+ },
436
+ "foreignKeys": {
437
+ "environment_variables_team_id_teams_id_fk": {
438
+ "name": "environment_variables_team_id_teams_id_fk",
439
+ "tableFrom": "environment_variables",
440
+ "tableTo": "teams",
441
+ "columnsFrom": [
442
+ "team_id"
443
+ ],
444
+ "columnsTo": [
445
+ "id"
446
+ ],
447
+ "onDelete": "cascade",
448
+ "onUpdate": "no action"
449
+ },
450
+ "environment_variables_environment_id_environments_id_fk": {
451
+ "name": "environment_variables_environment_id_environments_id_fk",
452
+ "tableFrom": "environment_variables",
453
+ "tableTo": "environments",
454
+ "columnsFrom": [
455
+ "environment_id"
456
+ ],
457
+ "columnsTo": [
458
+ "id"
459
+ ],
460
+ "onDelete": "cascade",
461
+ "onUpdate": "no action"
462
+ },
463
+ "environment_variables_created_by_users_id_fk": {
464
+ "name": "environment_variables_created_by_users_id_fk",
465
+ "tableFrom": "environment_variables",
466
+ "tableTo": "users",
467
+ "columnsFrom": [
468
+ "created_by"
469
+ ],
470
+ "columnsTo": [
471
+ "id"
472
+ ],
473
+ "onDelete": "no action",
474
+ "onUpdate": "no action"
475
+ },
476
+ "environment_variables_updated_by_users_id_fk": {
477
+ "name": "environment_variables_updated_by_users_id_fk",
478
+ "tableFrom": "environment_variables",
479
+ "tableTo": "users",
480
+ "columnsFrom": [
481
+ "updated_by"
482
+ ],
483
+ "columnsTo": [
484
+ "id"
485
+ ],
486
+ "onDelete": "no action",
487
+ "onUpdate": "no action"
488
+ }
489
+ },
490
+ "compositePrimaryKeys": {},
491
+ "uniqueConstraints": {},
492
+ "policies": {},
493
+ "checkConstraints": {},
494
+ "isRLSEnabled": false
495
+ },
496
+ "public.environments": {
497
+ "name": "environments",
498
+ "schema": "",
499
+ "columns": {
500
+ "id": {
501
+ "name": "id",
502
+ "type": "uuid",
503
+ "primaryKey": true,
504
+ "notNull": true,
505
+ "default": "gen_random_uuid()"
506
+ },
507
+ "team_id": {
508
+ "name": "team_id",
509
+ "type": "uuid",
510
+ "primaryKey": false,
511
+ "notNull": true
512
+ },
513
+ "name": {
514
+ "name": "name",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "description": {
520
+ "name": "description",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": false
524
+ },
525
+ "color": {
526
+ "name": "color",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": false,
530
+ "default": "'#3b82f6'"
531
+ },
532
+ "is_default": {
533
+ "name": "is_default",
534
+ "type": "boolean",
535
+ "primaryKey": false,
536
+ "notNull": false,
537
+ "default": false
538
+ },
539
+ "created_at": {
540
+ "name": "created_at",
541
+ "type": "timestamp",
542
+ "primaryKey": false,
543
+ "notNull": true,
544
+ "default": "now()"
545
+ },
546
+ "updated_at": {
547
+ "name": "updated_at",
548
+ "type": "timestamp",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "default": "now()"
552
+ }
553
+ },
554
+ "indexes": {
555
+ "environments_team_idx": {
556
+ "name": "environments_team_idx",
557
+ "columns": [
558
+ {
559
+ "expression": "team_id",
560
+ "isExpression": false,
561
+ "asc": true,
562
+ "nulls": "last"
563
+ }
564
+ ],
565
+ "isUnique": false,
566
+ "concurrently": false,
567
+ "method": "btree",
568
+ "with": {}
569
+ }
570
+ },
571
+ "foreignKeys": {
572
+ "environments_team_id_teams_id_fk": {
573
+ "name": "environments_team_id_teams_id_fk",
574
+ "tableFrom": "environments",
575
+ "tableTo": "teams",
576
+ "columnsFrom": [
577
+ "team_id"
578
+ ],
579
+ "columnsTo": [
580
+ "id"
581
+ ],
582
+ "onDelete": "cascade",
583
+ "onUpdate": "no action"
584
+ }
585
+ },
586
+ "compositePrimaryKeys": {},
587
+ "uniqueConstraints": {},
588
+ "policies": {},
589
+ "checkConstraints": {},
590
+ "isRLSEnabled": false
591
+ },
592
+ "public.team_members": {
593
+ "name": "team_members",
594
+ "schema": "",
595
+ "columns": {
596
+ "id": {
597
+ "name": "id",
598
+ "type": "uuid",
599
+ "primaryKey": true,
600
+ "notNull": true,
601
+ "default": "gen_random_uuid()"
602
+ },
603
+ "team_id": {
604
+ "name": "team_id",
605
+ "type": "uuid",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "user_id": {
610
+ "name": "user_id",
611
+ "type": "uuid",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "role": {
616
+ "name": "role",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": true,
620
+ "default": "'developer'"
621
+ },
622
+ "joined_at": {
623
+ "name": "joined_at",
624
+ "type": "timestamp",
625
+ "primaryKey": false,
626
+ "notNull": true,
627
+ "default": "now()"
628
+ }
629
+ },
630
+ "indexes": {
631
+ "team_members_team_user_idx": {
632
+ "name": "team_members_team_user_idx",
633
+ "columns": [
634
+ {
635
+ "expression": "team_id",
636
+ "isExpression": false,
637
+ "asc": true,
638
+ "nulls": "last"
639
+ },
640
+ {
641
+ "expression": "user_id",
642
+ "isExpression": false,
643
+ "asc": true,
644
+ "nulls": "last"
645
+ }
646
+ ],
647
+ "isUnique": false,
648
+ "concurrently": false,
649
+ "method": "btree",
650
+ "with": {}
651
+ }
652
+ },
653
+ "foreignKeys": {
654
+ "team_members_team_id_teams_id_fk": {
655
+ "name": "team_members_team_id_teams_id_fk",
656
+ "tableFrom": "team_members",
657
+ "tableTo": "teams",
658
+ "columnsFrom": [
659
+ "team_id"
660
+ ],
661
+ "columnsTo": [
662
+ "id"
663
+ ],
664
+ "onDelete": "cascade",
665
+ "onUpdate": "no action"
666
+ },
667
+ "team_members_user_id_users_id_fk": {
668
+ "name": "team_members_user_id_users_id_fk",
669
+ "tableFrom": "team_members",
670
+ "tableTo": "users",
671
+ "columnsFrom": [
672
+ "user_id"
673
+ ],
674
+ "columnsTo": [
675
+ "id"
676
+ ],
677
+ "onDelete": "cascade",
678
+ "onUpdate": "no action"
679
+ }
680
+ },
681
+ "compositePrimaryKeys": {},
682
+ "uniqueConstraints": {},
683
+ "policies": {},
684
+ "checkConstraints": {},
685
+ "isRLSEnabled": false
686
+ },
687
+ "public.teams": {
688
+ "name": "teams",
689
+ "schema": "",
690
+ "columns": {
691
+ "id": {
692
+ "name": "id",
693
+ "type": "uuid",
694
+ "primaryKey": true,
695
+ "notNull": true,
696
+ "default": "gen_random_uuid()"
697
+ },
698
+ "name": {
699
+ "name": "name",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true
703
+ },
704
+ "description": {
705
+ "name": "description",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": false
709
+ },
710
+ "color": {
711
+ "name": "color",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": false,
715
+ "default": "'#3b82f6'"
716
+ },
717
+ "owner_id": {
718
+ "name": "owner_id",
719
+ "type": "uuid",
720
+ "primaryKey": false,
721
+ "notNull": true
722
+ },
723
+ "created_at": {
724
+ "name": "created_at",
725
+ "type": "timestamp",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "default": "now()"
729
+ },
730
+ "updated_at": {
731
+ "name": "updated_at",
732
+ "type": "timestamp",
733
+ "primaryKey": false,
734
+ "notNull": true,
735
+ "default": "now()"
736
+ }
737
+ },
738
+ "indexes": {
739
+ "teams_owner_idx": {
740
+ "name": "teams_owner_idx",
741
+ "columns": [
742
+ {
743
+ "expression": "owner_id",
744
+ "isExpression": false,
745
+ "asc": true,
746
+ "nulls": "last"
747
+ }
748
+ ],
749
+ "isUnique": false,
750
+ "concurrently": false,
751
+ "method": "btree",
752
+ "with": {}
753
+ }
754
+ },
755
+ "foreignKeys": {
756
+ "teams_owner_id_users_id_fk": {
757
+ "name": "teams_owner_id_users_id_fk",
758
+ "tableFrom": "teams",
759
+ "tableTo": "users",
760
+ "columnsFrom": [
761
+ "owner_id"
762
+ ],
763
+ "columnsTo": [
764
+ "id"
765
+ ],
766
+ "onDelete": "cascade",
767
+ "onUpdate": "no action"
768
+ }
769
+ },
770
+ "compositePrimaryKeys": {},
771
+ "uniqueConstraints": {},
772
+ "policies": {},
773
+ "checkConstraints": {},
774
+ "isRLSEnabled": false
775
+ },
776
+ "public.users": {
777
+ "name": "users",
778
+ "schema": "",
779
+ "columns": {
780
+ "id": {
781
+ "name": "id",
782
+ "type": "uuid",
783
+ "primaryKey": true,
784
+ "notNull": true,
785
+ "default": "gen_random_uuid()"
786
+ },
787
+ "email": {
788
+ "name": "email",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": true
792
+ },
793
+ "full_name": {
794
+ "name": "full_name",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true
798
+ },
799
+ "password": {
800
+ "name": "password",
801
+ "type": "text",
802
+ "primaryKey": false,
803
+ "notNull": true
804
+ },
805
+ "avatar": {
806
+ "name": "avatar",
807
+ "type": "text",
808
+ "primaryKey": false,
809
+ "notNull": false
810
+ },
811
+ "role": {
812
+ "name": "role",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": true,
816
+ "default": "'user'"
817
+ },
818
+ "created_at": {
819
+ "name": "created_at",
820
+ "type": "timestamp",
821
+ "primaryKey": false,
822
+ "notNull": true,
823
+ "default": "now()"
824
+ },
825
+ "updated_at": {
826
+ "name": "updated_at",
827
+ "type": "timestamp",
828
+ "primaryKey": false,
829
+ "notNull": true,
830
+ "default": "now()"
831
+ }
832
+ },
833
+ "indexes": {},
834
+ "foreignKeys": {},
835
+ "compositePrimaryKeys": {},
836
+ "uniqueConstraints": {
837
+ "users_email_unique": {
838
+ "name": "users_email_unique",
839
+ "nullsNotDistinct": false,
840
+ "columns": [
841
+ "email"
842
+ ]
843
+ }
844
+ },
845
+ "policies": {},
846
+ "checkConstraints": {},
847
+ "isRLSEnabled": false
848
+ },
849
+ "public.variable_history": {
850
+ "name": "variable_history",
851
+ "schema": "",
852
+ "columns": {
853
+ "id": {
854
+ "name": "id",
855
+ "type": "uuid",
856
+ "primaryKey": true,
857
+ "notNull": true,
858
+ "default": "gen_random_uuid()"
859
+ },
860
+ "variable_id": {
861
+ "name": "variable_id",
862
+ "type": "uuid",
863
+ "primaryKey": false,
864
+ "notNull": true
865
+ },
866
+ "team_id": {
867
+ "name": "team_id",
868
+ "type": "uuid",
869
+ "primaryKey": false,
870
+ "notNull": true
871
+ },
872
+ "environment_id": {
873
+ "name": "environment_id",
874
+ "type": "uuid",
875
+ "primaryKey": false,
876
+ "notNull": true
877
+ },
878
+ "key": {
879
+ "name": "key",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": true
883
+ },
884
+ "value": {
885
+ "name": "value",
886
+ "type": "text",
887
+ "primaryKey": false,
888
+ "notNull": true
889
+ },
890
+ "description": {
891
+ "name": "description",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": false
895
+ },
896
+ "is_secret": {
897
+ "name": "is_secret",
898
+ "type": "boolean",
899
+ "primaryKey": false,
900
+ "notNull": false,
901
+ "default": false
902
+ },
903
+ "changed_by": {
904
+ "name": "changed_by",
905
+ "type": "uuid",
906
+ "primaryKey": false,
907
+ "notNull": true
908
+ },
909
+ "change_type": {
910
+ "name": "change_type",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": true
914
+ },
915
+ "created_at": {
916
+ "name": "created_at",
917
+ "type": "timestamp",
918
+ "primaryKey": false,
919
+ "notNull": true,
920
+ "default": "now()"
921
+ }
922
+ },
923
+ "indexes": {
924
+ "variable_history_variable_idx": {
925
+ "name": "variable_history_variable_idx",
926
+ "columns": [
927
+ {
928
+ "expression": "variable_id",
929
+ "isExpression": false,
930
+ "asc": true,
931
+ "nulls": "last"
932
+ }
933
+ ],
934
+ "isUnique": false,
935
+ "concurrently": false,
936
+ "method": "btree",
937
+ "with": {}
938
+ },
939
+ "variable_history_team_idx": {
940
+ "name": "variable_history_team_idx",
941
+ "columns": [
942
+ {
943
+ "expression": "team_id",
944
+ "isExpression": false,
945
+ "asc": true,
946
+ "nulls": "last"
947
+ }
948
+ ],
949
+ "isUnique": false,
950
+ "concurrently": false,
951
+ "method": "btree",
952
+ "with": {}
953
+ }
954
+ },
955
+ "foreignKeys": {
956
+ "variable_history_variable_id_environment_variables_id_fk": {
957
+ "name": "variable_history_variable_id_environment_variables_id_fk",
958
+ "tableFrom": "variable_history",
959
+ "tableTo": "environment_variables",
960
+ "columnsFrom": [
961
+ "variable_id"
962
+ ],
963
+ "columnsTo": [
964
+ "id"
965
+ ],
966
+ "onDelete": "cascade",
967
+ "onUpdate": "no action"
968
+ },
969
+ "variable_history_team_id_teams_id_fk": {
970
+ "name": "variable_history_team_id_teams_id_fk",
971
+ "tableFrom": "variable_history",
972
+ "tableTo": "teams",
973
+ "columnsFrom": [
974
+ "team_id"
975
+ ],
976
+ "columnsTo": [
977
+ "id"
978
+ ],
979
+ "onDelete": "cascade",
980
+ "onUpdate": "no action"
981
+ },
982
+ "variable_history_environment_id_environments_id_fk": {
983
+ "name": "variable_history_environment_id_environments_id_fk",
984
+ "tableFrom": "variable_history",
985
+ "tableTo": "environments",
986
+ "columnsFrom": [
987
+ "environment_id"
988
+ ],
989
+ "columnsTo": [
990
+ "id"
991
+ ],
992
+ "onDelete": "cascade",
993
+ "onUpdate": "no action"
994
+ },
995
+ "variable_history_changed_by_users_id_fk": {
996
+ "name": "variable_history_changed_by_users_id_fk",
997
+ "tableFrom": "variable_history",
998
+ "tableTo": "users",
999
+ "columnsFrom": [
1000
+ "changed_by"
1001
+ ],
1002
+ "columnsTo": [
1003
+ "id"
1004
+ ],
1005
+ "onDelete": "no action",
1006
+ "onUpdate": "no action"
1007
+ }
1008
+ },
1009
+ "compositePrimaryKeys": {},
1010
+ "uniqueConstraints": {},
1011
+ "policies": {},
1012
+ "checkConstraints": {},
1013
+ "isRLSEnabled": false
1014
+ }
1015
+ },
1016
+ "enums": {},
1017
+ "schemas": {},
1018
+ "sequences": {},
1019
+ "roles": {},
1020
+ "policies": {},
1021
+ "views": {},
1022
+ "_meta": {
1023
+ "columns": {},
1024
+ "schemas": {},
1025
+ "tables": {}
1026
+ }
1027
+ }