create-aphex 0.1.3 → 0.2.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 (104) hide show
  1. package/dist/index.js +9 -88
  2. package/package.json +4 -4
  3. package/templates/base/.dockerignore +0 -44
  4. package/templates/base/.env.example +0 -38
  5. package/templates/base/CHANGELOG.md +0 -124
  6. package/templates/base/Dockerfile +0 -69
  7. package/templates/base/README.md +0 -147
  8. package/templates/base/aphex.config.ts +0 -45
  9. package/templates/base/docker-compose.yml +0 -31
  10. package/templates/base/drizzle/0000_tiny_redwing.sql +0 -226
  11. package/templates/base/drizzle/meta/0000_snapshot.json +0 -1379
  12. package/templates/base/drizzle/meta/_journal.json +0 -13
  13. package/templates/base/drizzle.config.ts +0 -17
  14. package/templates/base/package.json +0 -81
  15. package/templates/base/prod.docker-compose.yml +0 -61
  16. package/templates/base/src/app.css +0 -32
  17. package/templates/base/src/app.d.ts +0 -26
  18. package/templates/base/src/app.html +0 -11
  19. package/templates/base/src/hooks.server.ts +0 -52
  20. package/templates/base/src/lib/assets/favicon.svg +0 -5
  21. package/templates/base/src/lib/auth-client.ts +0 -19
  22. package/templates/base/src/lib/index.ts +0 -1
  23. package/templates/base/src/lib/schemaTypes/index.ts +0 -11
  24. package/templates/base/src/lib/schemaTypes/post.ts +0 -47
  25. package/templates/base/src/lib/server/auth/better-auth/instance.ts +0 -183
  26. package/templates/base/src/lib/server/auth/index.ts +0 -25
  27. package/templates/base/src/lib/server/auth/instance.ts +0 -7
  28. package/templates/base/src/lib/server/auth/service.ts +0 -486
  29. package/templates/base/src/lib/server/cache/index.ts +0 -10
  30. package/templates/base/src/lib/server/db/auth-schema.ts +0 -86
  31. package/templates/base/src/lib/server/db/cms-schema.ts +0 -23
  32. package/templates/base/src/lib/server/db/index.ts +0 -55
  33. package/templates/base/src/lib/server/db/schema.ts +0 -3
  34. package/templates/base/src/lib/server/email/components/EmailLayout.svelte +0 -24
  35. package/templates/base/src/lib/server/email/components/EmailVerification.svelte +0 -26
  36. package/templates/base/src/lib/server/email/components/Invitation.svelte +0 -30
  37. package/templates/base/src/lib/server/email/components/PasswordReset.svelte +0 -28
  38. package/templates/base/src/lib/server/email/index.ts +0 -28
  39. package/templates/base/src/lib/server/email/invitation-hook.ts +0 -56
  40. package/templates/base/src/lib/server/email/renderer.ts +0 -13
  41. package/templates/base/src/lib/server/email/templates/email-verification.ts +0 -8
  42. package/templates/base/src/lib/server/email/templates/invitation.ts +0 -8
  43. package/templates/base/src/lib/server/email/templates/password-reset.ts +0 -7
  44. package/templates/base/src/lib/server/services/organization.ts +0 -68
  45. package/templates/base/src/lib/server/storage/index.ts +0 -28
  46. package/templates/base/src/lib/stores/activeTab.svelte.ts +0 -14
  47. package/templates/base/src/lib/utils/imageBuilder.ts +0 -3
  48. package/templates/base/src/lib/utils/slug.ts +0 -33
  49. package/templates/base/src/routes/(protected)/admin/+layout.server.ts +0 -86
  50. package/templates/base/src/routes/(protected)/admin/+layout.svelte +0 -78
  51. package/templates/base/src/routes/(protected)/admin/+page.server.ts +0 -60
  52. package/templates/base/src/routes/(protected)/admin/+page.svelte +0 -34
  53. package/templates/base/src/routes/(protected)/admin/organizations/+page.server.ts +0 -39
  54. package/templates/base/src/routes/(protected)/admin/organizations/+page.svelte +0 -31
  55. package/templates/base/src/routes/(protected)/admin/organizations/_components/CreateOrganization.svelte +0 -141
  56. package/templates/base/src/routes/(protected)/admin/organizations/_components/OrganizationsList.svelte +0 -102
  57. package/templates/base/src/routes/(protected)/admin/settings/+layout.server.ts +0 -42
  58. package/templates/base/src/routes/(protected)/admin/settings/+layout.svelte +0 -116
  59. package/templates/base/src/routes/(protected)/admin/settings/+page.server.ts +0 -16
  60. package/templates/base/src/routes/(protected)/admin/settings/+page.svelte +0 -32
  61. package/templates/base/src/routes/(protected)/admin/settings/_components/AccountSettings.svelte +0 -177
  62. package/templates/base/src/routes/(protected)/admin/settings/_components/ApiKeysSettings.svelte +0 -472
  63. package/templates/base/src/routes/(protected)/admin/settings/_components/OrganizationsSettings.svelte +0 -182
  64. package/templates/base/src/routes/(protected)/admin/settings/account/+page.server.ts +0 -25
  65. package/templates/base/src/routes/(protected)/admin/settings/account/+page.svelte +0 -23
  66. package/templates/base/src/routes/(protected)/admin/settings/api-keys/+page.server.ts +0 -54
  67. package/templates/base/src/routes/(protected)/admin/settings/api-keys/+page.svelte +0 -14
  68. package/templates/base/src/routes/(protected)/admin/settings/members/+page.server.ts +0 -31
  69. package/templates/base/src/routes/(protected)/admin/settings/members/+page.svelte +0 -338
  70. package/templates/base/src/routes/(protected)/admin/settings/roles/+page.server.ts +0 -17
  71. package/templates/base/src/routes/(protected)/admin/settings/roles/+page.svelte +0 -339
  72. package/templates/base/src/routes/+layout.svelte +0 -12
  73. package/templates/base/src/routes/+page.svelte +0 -2
  74. package/templates/base/src/routes/api/[...slug]/+server.ts +0 -35
  75. package/templates/base/src/routes/api/instance-settings/+server.ts +0 -70
  76. package/templates/base/src/routes/api/invitations/+server.ts +0 -54
  77. package/templates/base/src/routes/api/invitations/[id]/accept/+server.ts +0 -54
  78. package/templates/base/src/routes/api/invitations/[id]/reject/+server.ts +0 -49
  79. package/templates/base/src/routes/api/settings/api-keys/+server.ts +0 -57
  80. package/templates/base/src/routes/api/settings/api-keys/[id]/+server.ts +0 -53
  81. package/templates/base/src/routes/god-mode/+layout.server.ts +0 -32
  82. package/templates/base/src/routes/god-mode/+layout.svelte +0 -155
  83. package/templates/base/src/routes/god-mode/+page.server.ts +0 -10
  84. package/templates/base/src/routes/god-mode/+page.svelte +0 -32
  85. package/templates/base/src/routes/god-mode/_components/CreateOrganization.svelte +0 -141
  86. package/templates/base/src/routes/god-mode/_components/OrganizationsList.svelte +0 -169
  87. package/templates/base/src/routes/god-mode/organizations/+page.server.ts +0 -43
  88. package/templates/base/src/routes/god-mode/organizations/+page.svelte +0 -74
  89. package/templates/base/src/routes/invitations/+page.server.ts +0 -48
  90. package/templates/base/src/routes/invitations/+page.svelte +0 -264
  91. package/templates/base/src/routes/invite/[token]/+page.server.ts +0 -59
  92. package/templates/base/src/routes/invite/[token]/+page.svelte +0 -109
  93. package/templates/base/src/routes/login/+page.server.ts +0 -14
  94. package/templates/base/src/routes/login/+page.svelte +0 -332
  95. package/templates/base/src/routes/media/[id]/[filename]/+server.ts +0 -3
  96. package/templates/base/src/routes/reset-password/[token]/+page.server.ts +0 -15
  97. package/templates/base/src/routes/reset-password/[token]/+page.svelte +0 -179
  98. package/templates/base/src/routes/verify-email/+page.svelte +0 -41
  99. package/templates/base/static/images/aphex-darkmode.png +0 -0
  100. package/templates/base/static/images/aphex-lightmode.png +0 -0
  101. package/templates/base/static/robots.txt +0 -3
  102. package/templates/base/svelte.config.js +0 -19
  103. package/templates/base/tsconfig.json +0 -20
  104. package/templates/base/vite.config.ts +0 -146
@@ -1,1379 +0,0 @@
1
- {
2
- "id": "ed69cede-4bcf-4f7e-886d-77d72f97414b",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.cms_assets": {
8
- "name": "cms_assets",
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
- "organization_id": {
19
- "name": "organization_id",
20
- "type": "uuid",
21
- "primaryKey": false,
22
- "notNull": true
23
- },
24
- "asset_type": {
25
- "name": "asset_type",
26
- "type": "varchar(20)",
27
- "primaryKey": false,
28
- "notNull": true
29
- },
30
- "filename": {
31
- "name": "filename",
32
- "type": "varchar(255)",
33
- "primaryKey": false,
34
- "notNull": true
35
- },
36
- "original_filename": {
37
- "name": "original_filename",
38
- "type": "varchar(255)",
39
- "primaryKey": false,
40
- "notNull": true
41
- },
42
- "mime_type": {
43
- "name": "mime_type",
44
- "type": "varchar(100)",
45
- "primaryKey": false,
46
- "notNull": true
47
- },
48
- "size": {
49
- "name": "size",
50
- "type": "integer",
51
- "primaryKey": false,
52
- "notNull": true
53
- },
54
- "url": {
55
- "name": "url",
56
- "type": "text",
57
- "primaryKey": false,
58
- "notNull": true
59
- },
60
- "path": {
61
- "name": "path",
62
- "type": "text",
63
- "primaryKey": false,
64
- "notNull": true
65
- },
66
- "storage_adapter": {
67
- "name": "storage_adapter",
68
- "type": "varchar(50)",
69
- "primaryKey": false,
70
- "notNull": true,
71
- "default": "'local'"
72
- },
73
- "width": {
74
- "name": "width",
75
- "type": "integer",
76
- "primaryKey": false,
77
- "notNull": false
78
- },
79
- "height": {
80
- "name": "height",
81
- "type": "integer",
82
- "primaryKey": false,
83
- "notNull": false
84
- },
85
- "metadata": {
86
- "name": "metadata",
87
- "type": "jsonb",
88
- "primaryKey": false,
89
- "notNull": false
90
- },
91
- "title": {
92
- "name": "title",
93
- "type": "varchar(255)",
94
- "primaryKey": false,
95
- "notNull": false
96
- },
97
- "description": {
98
- "name": "description",
99
- "type": "text",
100
- "primaryKey": false,
101
- "notNull": false
102
- },
103
- "alt": {
104
- "name": "alt",
105
- "type": "text",
106
- "primaryKey": false,
107
- "notNull": false
108
- },
109
- "credit_line": {
110
- "name": "credit_line",
111
- "type": "text",
112
- "primaryKey": false,
113
- "notNull": false
114
- },
115
- "created_by": {
116
- "name": "created_by",
117
- "type": "text",
118
- "primaryKey": false,
119
- "notNull": false
120
- },
121
- "updated_by": {
122
- "name": "updated_by",
123
- "type": "text",
124
- "primaryKey": false,
125
- "notNull": false
126
- },
127
- "created_at": {
128
- "name": "created_at",
129
- "type": "timestamp",
130
- "primaryKey": false,
131
- "notNull": false,
132
- "default": "now()"
133
- },
134
- "updated_at": {
135
- "name": "updated_at",
136
- "type": "timestamp",
137
- "primaryKey": false,
138
- "notNull": false,
139
- "default": "now()"
140
- }
141
- },
142
- "indexes": {},
143
- "foreignKeys": {
144
- "cms_assets_organization_id_cms_organizations_id_fk": {
145
- "name": "cms_assets_organization_id_cms_organizations_id_fk",
146
- "tableFrom": "cms_assets",
147
- "tableTo": "cms_organizations",
148
- "columnsFrom": ["organization_id"],
149
- "columnsTo": ["id"],
150
- "onDelete": "cascade",
151
- "onUpdate": "no action"
152
- }
153
- },
154
- "compositePrimaryKeys": {},
155
- "uniqueConstraints": {},
156
- "policies": {
157
- "assets_org_isolation": {
158
- "name": "assets_org_isolation",
159
- "as": "PERMISSIVE",
160
- "for": "ALL",
161
- "to": ["public"],
162
- "using": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id IN (SELECT current_setting('app.organization_id', true)::uuid UNION SELECT id FROM cms_organizations WHERE parent_organization_id = current_setting('app.organization_id', true)::uuid))",
163
- "withCheck": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id = current_setting('app.organization_id', true)::uuid)"
164
- }
165
- },
166
- "checkConstraints": {},
167
- "isRLSEnabled": false
168
- },
169
- "public.cms_document_versions": {
170
- "name": "cms_document_versions",
171
- "schema": "",
172
- "columns": {
173
- "id": {
174
- "name": "id",
175
- "type": "uuid",
176
- "primaryKey": true,
177
- "notNull": true,
178
- "default": "gen_random_uuid()"
179
- },
180
- "document_id": {
181
- "name": "document_id",
182
- "type": "uuid",
183
- "primaryKey": false,
184
- "notNull": true
185
- },
186
- "organization_id": {
187
- "name": "organization_id",
188
- "type": "uuid",
189
- "primaryKey": false,
190
- "notNull": true
191
- },
192
- "version_number": {
193
- "name": "version_number",
194
- "type": "integer",
195
- "primaryKey": false,
196
- "notNull": true
197
- },
198
- "event_type": {
199
- "name": "event_type",
200
- "type": "version_event",
201
- "typeSchema": "public",
202
- "primaryKey": false,
203
- "notNull": true
204
- },
205
- "data": {
206
- "name": "data",
207
- "type": "jsonb",
208
- "primaryKey": false,
209
- "notNull": true
210
- },
211
- "created_by": {
212
- "name": "created_by",
213
- "type": "text",
214
- "primaryKey": false,
215
- "notNull": false
216
- },
217
- "created_at": {
218
- "name": "created_at",
219
- "type": "timestamp",
220
- "primaryKey": false,
221
- "notNull": true,
222
- "default": "now()"
223
- }
224
- },
225
- "indexes": {},
226
- "foreignKeys": {
227
- "cms_document_versions_document_id_cms_documents_id_fk": {
228
- "name": "cms_document_versions_document_id_cms_documents_id_fk",
229
- "tableFrom": "cms_document_versions",
230
- "tableTo": "cms_documents",
231
- "columnsFrom": ["document_id"],
232
- "columnsTo": ["id"],
233
- "onDelete": "cascade",
234
- "onUpdate": "no action"
235
- },
236
- "cms_document_versions_organization_id_cms_organizations_id_fk": {
237
- "name": "cms_document_versions_organization_id_cms_organizations_id_fk",
238
- "tableFrom": "cms_document_versions",
239
- "tableTo": "cms_organizations",
240
- "columnsFrom": ["organization_id"],
241
- "columnsTo": ["id"],
242
- "onDelete": "cascade",
243
- "onUpdate": "no action"
244
- }
245
- },
246
- "compositePrimaryKeys": {},
247
- "uniqueConstraints": {
248
- "cms_document_versions_document_id_version_number_unique": {
249
- "name": "cms_document_versions_document_id_version_number_unique",
250
- "nullsNotDistinct": false,
251
- "columns": ["document_id", "version_number"]
252
- }
253
- },
254
- "policies": {
255
- "document_versions_org_isolation": {
256
- "name": "document_versions_org_isolation",
257
- "as": "PERMISSIVE",
258
- "for": "ALL",
259
- "to": ["public"],
260
- "using": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id IN (SELECT current_setting('app.organization_id', true)::uuid UNION SELECT id FROM cms_organizations WHERE parent_organization_id = current_setting('app.organization_id', true)::uuid))",
261
- "withCheck": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id = current_setting('app.organization_id', true)::uuid)"
262
- }
263
- },
264
- "checkConstraints": {},
265
- "isRLSEnabled": false
266
- },
267
- "public.cms_documents": {
268
- "name": "cms_documents",
269
- "schema": "",
270
- "columns": {
271
- "id": {
272
- "name": "id",
273
- "type": "uuid",
274
- "primaryKey": true,
275
- "notNull": true,
276
- "default": "gen_random_uuid()"
277
- },
278
- "organization_id": {
279
- "name": "organization_id",
280
- "type": "uuid",
281
- "primaryKey": false,
282
- "notNull": true
283
- },
284
- "type": {
285
- "name": "type",
286
- "type": "varchar(100)",
287
- "primaryKey": false,
288
- "notNull": true
289
- },
290
- "status": {
291
- "name": "status",
292
- "type": "document_status",
293
- "typeSchema": "public",
294
- "primaryKey": false,
295
- "notNull": false,
296
- "default": "'draft'"
297
- },
298
- "draft_data": {
299
- "name": "draft_data",
300
- "type": "jsonb",
301
- "primaryKey": false,
302
- "notNull": false
303
- },
304
- "published_data": {
305
- "name": "published_data",
306
- "type": "jsonb",
307
- "primaryKey": false,
308
- "notNull": false
309
- },
310
- "published_hash": {
311
- "name": "published_hash",
312
- "type": "varchar(20)",
313
- "primaryKey": false,
314
- "notNull": false
315
- },
316
- "created_by": {
317
- "name": "created_by",
318
- "type": "text",
319
- "primaryKey": false,
320
- "notNull": false
321
- },
322
- "updated_by": {
323
- "name": "updated_by",
324
- "type": "text",
325
- "primaryKey": false,
326
- "notNull": false
327
- },
328
- "published_at": {
329
- "name": "published_at",
330
- "type": "timestamp",
331
- "primaryKey": false,
332
- "notNull": false
333
- },
334
- "created_at": {
335
- "name": "created_at",
336
- "type": "timestamp",
337
- "primaryKey": false,
338
- "notNull": false,
339
- "default": "now()"
340
- },
341
- "updated_at": {
342
- "name": "updated_at",
343
- "type": "timestamp",
344
- "primaryKey": false,
345
- "notNull": false,
346
- "default": "now()"
347
- }
348
- },
349
- "indexes": {},
350
- "foreignKeys": {
351
- "cms_documents_organization_id_cms_organizations_id_fk": {
352
- "name": "cms_documents_organization_id_cms_organizations_id_fk",
353
- "tableFrom": "cms_documents",
354
- "tableTo": "cms_organizations",
355
- "columnsFrom": ["organization_id"],
356
- "columnsTo": ["id"],
357
- "onDelete": "cascade",
358
- "onUpdate": "no action"
359
- }
360
- },
361
- "compositePrimaryKeys": {},
362
- "uniqueConstraints": {},
363
- "policies": {
364
- "documents_org_isolation": {
365
- "name": "documents_org_isolation",
366
- "as": "PERMISSIVE",
367
- "for": "ALL",
368
- "to": ["public"],
369
- "using": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id IN (SELECT current_setting('app.organization_id', true)::uuid UNION SELECT id FROM cms_organizations WHERE parent_organization_id = current_setting('app.organization_id', true)::uuid))",
370
- "withCheck": "(current_setting('app.override_access', true) = 'true') OR (current_setting('app.organization_id', true) <> '' AND organization_id = current_setting('app.organization_id', true)::uuid)"
371
- }
372
- },
373
- "checkConstraints": {},
374
- "isRLSEnabled": false
375
- },
376
- "public.cms_instance_settings": {
377
- "name": "cms_instance_settings",
378
- "schema": "",
379
- "columns": {
380
- "id": {
381
- "name": "id",
382
- "type": "text",
383
- "primaryKey": true,
384
- "notNull": true,
385
- "default": "'default'"
386
- },
387
- "settings": {
388
- "name": "settings",
389
- "type": "jsonb",
390
- "primaryKey": false,
391
- "notNull": true,
392
- "default": "'{}'::jsonb"
393
- },
394
- "updated_at": {
395
- "name": "updated_at",
396
- "type": "timestamp",
397
- "primaryKey": false,
398
- "notNull": true,
399
- "default": "now()"
400
- }
401
- },
402
- "indexes": {},
403
- "foreignKeys": {},
404
- "compositePrimaryKeys": {},
405
- "uniqueConstraints": {},
406
- "policies": {},
407
- "checkConstraints": {},
408
- "isRLSEnabled": false
409
- },
410
- "public.cms_invitations": {
411
- "name": "cms_invitations",
412
- "schema": "",
413
- "columns": {
414
- "id": {
415
- "name": "id",
416
- "type": "uuid",
417
- "primaryKey": true,
418
- "notNull": true,
419
- "default": "gen_random_uuid()"
420
- },
421
- "organization_id": {
422
- "name": "organization_id",
423
- "type": "uuid",
424
- "primaryKey": false,
425
- "notNull": true
426
- },
427
- "email": {
428
- "name": "email",
429
- "type": "varchar(255)",
430
- "primaryKey": false,
431
- "notNull": true
432
- },
433
- "role": {
434
- "name": "role",
435
- "type": "text",
436
- "primaryKey": false,
437
- "notNull": true
438
- },
439
- "token": {
440
- "name": "token",
441
- "type": "text",
442
- "primaryKey": false,
443
- "notNull": true
444
- },
445
- "invited_by": {
446
- "name": "invited_by",
447
- "type": "text",
448
- "primaryKey": false,
449
- "notNull": true
450
- },
451
- "expires_at": {
452
- "name": "expires_at",
453
- "type": "timestamp",
454
- "primaryKey": false,
455
- "notNull": true
456
- },
457
- "accepted_at": {
458
- "name": "accepted_at",
459
- "type": "timestamp",
460
- "primaryKey": false,
461
- "notNull": false
462
- },
463
- "created_at": {
464
- "name": "created_at",
465
- "type": "timestamp",
466
- "primaryKey": false,
467
- "notNull": true,
468
- "default": "now()"
469
- }
470
- },
471
- "indexes": {},
472
- "foreignKeys": {
473
- "cms_invitations_organization_id_cms_organizations_id_fk": {
474
- "name": "cms_invitations_organization_id_cms_organizations_id_fk",
475
- "tableFrom": "cms_invitations",
476
- "tableTo": "cms_organizations",
477
- "columnsFrom": ["organization_id"],
478
- "columnsTo": ["id"],
479
- "onDelete": "cascade",
480
- "onUpdate": "no action"
481
- }
482
- },
483
- "compositePrimaryKeys": {},
484
- "uniqueConstraints": {
485
- "cms_invitations_token_unique": {
486
- "name": "cms_invitations_token_unique",
487
- "nullsNotDistinct": false,
488
- "columns": ["token"]
489
- }
490
- },
491
- "policies": {},
492
- "checkConstraints": {},
493
- "isRLSEnabled": false
494
- },
495
- "public.cms_organization_members": {
496
- "name": "cms_organization_members",
497
- "schema": "",
498
- "columns": {
499
- "id": {
500
- "name": "id",
501
- "type": "uuid",
502
- "primaryKey": true,
503
- "notNull": true,
504
- "default": "gen_random_uuid()"
505
- },
506
- "organization_id": {
507
- "name": "organization_id",
508
- "type": "uuid",
509
- "primaryKey": false,
510
- "notNull": true
511
- },
512
- "user_id": {
513
- "name": "user_id",
514
- "type": "text",
515
- "primaryKey": false,
516
- "notNull": true
517
- },
518
- "role": {
519
- "name": "role",
520
- "type": "text",
521
- "primaryKey": false,
522
- "notNull": true
523
- },
524
- "preferences": {
525
- "name": "preferences",
526
- "type": "jsonb",
527
- "primaryKey": false,
528
- "notNull": false
529
- },
530
- "invitation_id": {
531
- "name": "invitation_id",
532
- "type": "uuid",
533
- "primaryKey": false,
534
- "notNull": false
535
- },
536
- "created_at": {
537
- "name": "created_at",
538
- "type": "timestamp",
539
- "primaryKey": false,
540
- "notNull": true,
541
- "default": "now()"
542
- },
543
- "updated_at": {
544
- "name": "updated_at",
545
- "type": "timestamp",
546
- "primaryKey": false,
547
- "notNull": true,
548
- "default": "now()"
549
- }
550
- },
551
- "indexes": {},
552
- "foreignKeys": {
553
- "cms_organization_members_organization_id_cms_organizations_id_fk": {
554
- "name": "cms_organization_members_organization_id_cms_organizations_id_fk",
555
- "tableFrom": "cms_organization_members",
556
- "tableTo": "cms_organizations",
557
- "columnsFrom": ["organization_id"],
558
- "columnsTo": ["id"],
559
- "onDelete": "cascade",
560
- "onUpdate": "no action"
561
- },
562
- "cms_organization_members_invitation_id_cms_invitations_id_fk": {
563
- "name": "cms_organization_members_invitation_id_cms_invitations_id_fk",
564
- "tableFrom": "cms_organization_members",
565
- "tableTo": "cms_invitations",
566
- "columnsFrom": ["invitation_id"],
567
- "columnsTo": ["id"],
568
- "onDelete": "set null",
569
- "onUpdate": "no action"
570
- }
571
- },
572
- "compositePrimaryKeys": {},
573
- "uniqueConstraints": {
574
- "cms_organization_members_organization_id_user_id_unique": {
575
- "name": "cms_organization_members_organization_id_user_id_unique",
576
- "nullsNotDistinct": false,
577
- "columns": ["organization_id", "user_id"]
578
- }
579
- },
580
- "policies": {},
581
- "checkConstraints": {},
582
- "isRLSEnabled": false
583
- },
584
- "public.cms_organizations": {
585
- "name": "cms_organizations",
586
- "schema": "",
587
- "columns": {
588
- "id": {
589
- "name": "id",
590
- "type": "uuid",
591
- "primaryKey": true,
592
- "notNull": true,
593
- "default": "gen_random_uuid()"
594
- },
595
- "name": {
596
- "name": "name",
597
- "type": "varchar(200)",
598
- "primaryKey": false,
599
- "notNull": true
600
- },
601
- "slug": {
602
- "name": "slug",
603
- "type": "varchar(100)",
604
- "primaryKey": false,
605
- "notNull": true
606
- },
607
- "parent_organization_id": {
608
- "name": "parent_organization_id",
609
- "type": "uuid",
610
- "primaryKey": false,
611
- "notNull": false
612
- },
613
- "metadata": {
614
- "name": "metadata",
615
- "type": "jsonb",
616
- "primaryKey": false,
617
- "notNull": false
618
- },
619
- "created_by": {
620
- "name": "created_by",
621
- "type": "text",
622
- "primaryKey": false,
623
- "notNull": true
624
- },
625
- "created_at": {
626
- "name": "created_at",
627
- "type": "timestamp",
628
- "primaryKey": false,
629
- "notNull": true,
630
- "default": "now()"
631
- },
632
- "updated_at": {
633
- "name": "updated_at",
634
- "type": "timestamp",
635
- "primaryKey": false,
636
- "notNull": true,
637
- "default": "now()"
638
- }
639
- },
640
- "indexes": {},
641
- "foreignKeys": {
642
- "cms_organizations_parent_organization_id_cms_organizations_id_fk": {
643
- "name": "cms_organizations_parent_organization_id_cms_organizations_id_fk",
644
- "tableFrom": "cms_organizations",
645
- "tableTo": "cms_organizations",
646
- "columnsFrom": ["parent_organization_id"],
647
- "columnsTo": ["id"],
648
- "onDelete": "set null",
649
- "onUpdate": "no action"
650
- }
651
- },
652
- "compositePrimaryKeys": {},
653
- "uniqueConstraints": {
654
- "cms_organizations_slug_unique": {
655
- "name": "cms_organizations_slug_unique",
656
- "nullsNotDistinct": false,
657
- "columns": ["slug"]
658
- }
659
- },
660
- "policies": {},
661
- "checkConstraints": {},
662
- "isRLSEnabled": false
663
- },
664
- "public.cms_roles": {
665
- "name": "cms_roles",
666
- "schema": "",
667
- "columns": {
668
- "id": {
669
- "name": "id",
670
- "type": "uuid",
671
- "primaryKey": true,
672
- "notNull": true,
673
- "default": "gen_random_uuid()"
674
- },
675
- "organization_id": {
676
- "name": "organization_id",
677
- "type": "uuid",
678
- "primaryKey": false,
679
- "notNull": true
680
- },
681
- "name": {
682
- "name": "name",
683
- "type": "varchar(100)",
684
- "primaryKey": false,
685
- "notNull": true
686
- },
687
- "description": {
688
- "name": "description",
689
- "type": "text",
690
- "primaryKey": false,
691
- "notNull": false
692
- },
693
- "capabilities": {
694
- "name": "capabilities",
695
- "type": "jsonb",
696
- "primaryKey": false,
697
- "notNull": true,
698
- "default": "'[]'::jsonb"
699
- },
700
- "is_built_in": {
701
- "name": "is_built_in",
702
- "type": "text",
703
- "primaryKey": false,
704
- "notNull": true,
705
- "default": "'false'"
706
- },
707
- "created_at": {
708
- "name": "created_at",
709
- "type": "timestamp",
710
- "primaryKey": false,
711
- "notNull": true,
712
- "default": "now()"
713
- },
714
- "updated_at": {
715
- "name": "updated_at",
716
- "type": "timestamp",
717
- "primaryKey": false,
718
- "notNull": true,
719
- "default": "now()"
720
- }
721
- },
722
- "indexes": {},
723
- "foreignKeys": {
724
- "cms_roles_organization_id_cms_organizations_id_fk": {
725
- "name": "cms_roles_organization_id_cms_organizations_id_fk",
726
- "tableFrom": "cms_roles",
727
- "tableTo": "cms_organizations",
728
- "columnsFrom": ["organization_id"],
729
- "columnsTo": ["id"],
730
- "onDelete": "cascade",
731
- "onUpdate": "no action"
732
- }
733
- },
734
- "compositePrimaryKeys": {},
735
- "uniqueConstraints": {
736
- "cms_roles_organization_id_name_unique": {
737
- "name": "cms_roles_organization_id_name_unique",
738
- "nullsNotDistinct": false,
739
- "columns": ["organization_id", "name"]
740
- }
741
- },
742
- "policies": {},
743
- "checkConstraints": {},
744
- "isRLSEnabled": false
745
- },
746
- "public.cms_schema_types": {
747
- "name": "cms_schema_types",
748
- "schema": "",
749
- "columns": {
750
- "id": {
751
- "name": "id",
752
- "type": "uuid",
753
- "primaryKey": true,
754
- "notNull": true,
755
- "default": "gen_random_uuid()"
756
- },
757
- "name": {
758
- "name": "name",
759
- "type": "varchar(100)",
760
- "primaryKey": false,
761
- "notNull": true
762
- },
763
- "title": {
764
- "name": "title",
765
- "type": "varchar(200)",
766
- "primaryKey": false,
767
- "notNull": true
768
- },
769
- "type": {
770
- "name": "type",
771
- "type": "schema_type",
772
- "typeSchema": "public",
773
- "primaryKey": false,
774
- "notNull": true
775
- },
776
- "description": {
777
- "name": "description",
778
- "type": "text",
779
- "primaryKey": false,
780
- "notNull": false
781
- },
782
- "fields": {
783
- "name": "fields",
784
- "type": "jsonb",
785
- "primaryKey": false,
786
- "notNull": true
787
- },
788
- "created_at": {
789
- "name": "created_at",
790
- "type": "timestamp",
791
- "primaryKey": false,
792
- "notNull": false,
793
- "default": "now()"
794
- },
795
- "updated_at": {
796
- "name": "updated_at",
797
- "type": "timestamp",
798
- "primaryKey": false,
799
- "notNull": false,
800
- "default": "now()"
801
- }
802
- },
803
- "indexes": {},
804
- "foreignKeys": {},
805
- "compositePrimaryKeys": {},
806
- "uniqueConstraints": {
807
- "cms_schema_types_name_unique": {
808
- "name": "cms_schema_types_name_unique",
809
- "nullsNotDistinct": false,
810
- "columns": ["name"]
811
- }
812
- },
813
- "policies": {},
814
- "checkConstraints": {},
815
- "isRLSEnabled": false
816
- },
817
- "public.cms_user_profiles": {
818
- "name": "cms_user_profiles",
819
- "schema": "",
820
- "columns": {
821
- "user_id": {
822
- "name": "user_id",
823
- "type": "text",
824
- "primaryKey": true,
825
- "notNull": true
826
- },
827
- "role": {
828
- "name": "role",
829
- "type": "text",
830
- "primaryKey": false,
831
- "notNull": true,
832
- "default": "'editor'"
833
- },
834
- "preferences": {
835
- "name": "preferences",
836
- "type": "jsonb",
837
- "primaryKey": false,
838
- "notNull": false
839
- },
840
- "created_at": {
841
- "name": "created_at",
842
- "type": "timestamp",
843
- "primaryKey": false,
844
- "notNull": true,
845
- "default": "now()"
846
- },
847
- "updated_at": {
848
- "name": "updated_at",
849
- "type": "timestamp",
850
- "primaryKey": false,
851
- "notNull": true,
852
- "default": "now()"
853
- }
854
- },
855
- "indexes": {},
856
- "foreignKeys": {},
857
- "compositePrimaryKeys": {},
858
- "uniqueConstraints": {},
859
- "policies": {},
860
- "checkConstraints": {},
861
- "isRLSEnabled": false
862
- },
863
- "public.cms_user_sessions": {
864
- "name": "cms_user_sessions",
865
- "schema": "",
866
- "columns": {
867
- "user_id": {
868
- "name": "user_id",
869
- "type": "text",
870
- "primaryKey": true,
871
- "notNull": true
872
- },
873
- "active_organization_id": {
874
- "name": "active_organization_id",
875
- "type": "uuid",
876
- "primaryKey": false,
877
- "notNull": false
878
- },
879
- "updated_at": {
880
- "name": "updated_at",
881
- "type": "timestamp",
882
- "primaryKey": false,
883
- "notNull": true,
884
- "default": "now()"
885
- }
886
- },
887
- "indexes": {},
888
- "foreignKeys": {
889
- "cms_user_sessions_active_organization_id_cms_organizations_id_fk": {
890
- "name": "cms_user_sessions_active_organization_id_cms_organizations_id_fk",
891
- "tableFrom": "cms_user_sessions",
892
- "tableTo": "cms_organizations",
893
- "columnsFrom": ["active_organization_id"],
894
- "columnsTo": ["id"],
895
- "onDelete": "no action",
896
- "onUpdate": "no action"
897
- }
898
- },
899
- "compositePrimaryKeys": {},
900
- "uniqueConstraints": {},
901
- "policies": {},
902
- "checkConstraints": {},
903
- "isRLSEnabled": false
904
- },
905
- "public.account": {
906
- "name": "account",
907
- "schema": "",
908
- "columns": {
909
- "id": {
910
- "name": "id",
911
- "type": "text",
912
- "primaryKey": true,
913
- "notNull": true
914
- },
915
- "account_id": {
916
- "name": "account_id",
917
- "type": "text",
918
- "primaryKey": false,
919
- "notNull": true
920
- },
921
- "provider_id": {
922
- "name": "provider_id",
923
- "type": "text",
924
- "primaryKey": false,
925
- "notNull": true
926
- },
927
- "user_id": {
928
- "name": "user_id",
929
- "type": "text",
930
- "primaryKey": false,
931
- "notNull": true
932
- },
933
- "access_token": {
934
- "name": "access_token",
935
- "type": "text",
936
- "primaryKey": false,
937
- "notNull": false
938
- },
939
- "refresh_token": {
940
- "name": "refresh_token",
941
- "type": "text",
942
- "primaryKey": false,
943
- "notNull": false
944
- },
945
- "id_token": {
946
- "name": "id_token",
947
- "type": "text",
948
- "primaryKey": false,
949
- "notNull": false
950
- },
951
- "access_token_expires_at": {
952
- "name": "access_token_expires_at",
953
- "type": "timestamp",
954
- "primaryKey": false,
955
- "notNull": false
956
- },
957
- "refresh_token_expires_at": {
958
- "name": "refresh_token_expires_at",
959
- "type": "timestamp",
960
- "primaryKey": false,
961
- "notNull": false
962
- },
963
- "scope": {
964
- "name": "scope",
965
- "type": "text",
966
- "primaryKey": false,
967
- "notNull": false
968
- },
969
- "password": {
970
- "name": "password",
971
- "type": "text",
972
- "primaryKey": false,
973
- "notNull": false
974
- },
975
- "created_at": {
976
- "name": "created_at",
977
- "type": "timestamp",
978
- "primaryKey": false,
979
- "notNull": true,
980
- "default": "now()"
981
- },
982
- "updated_at": {
983
- "name": "updated_at",
984
- "type": "timestamp",
985
- "primaryKey": false,
986
- "notNull": true
987
- }
988
- },
989
- "indexes": {},
990
- "foreignKeys": {
991
- "account_user_id_user_id_fk": {
992
- "name": "account_user_id_user_id_fk",
993
- "tableFrom": "account",
994
- "tableTo": "user",
995
- "columnsFrom": ["user_id"],
996
- "columnsTo": ["id"],
997
- "onDelete": "cascade",
998
- "onUpdate": "no action"
999
- }
1000
- },
1001
- "compositePrimaryKeys": {},
1002
- "uniqueConstraints": {},
1003
- "policies": {},
1004
- "checkConstraints": {},
1005
- "isRLSEnabled": false
1006
- },
1007
- "public.apikey": {
1008
- "name": "apikey",
1009
- "schema": "",
1010
- "columns": {
1011
- "id": {
1012
- "name": "id",
1013
- "type": "text",
1014
- "primaryKey": true,
1015
- "notNull": true
1016
- },
1017
- "config_id": {
1018
- "name": "config_id",
1019
- "type": "text",
1020
- "primaryKey": false,
1021
- "notNull": true,
1022
- "default": "'default'"
1023
- },
1024
- "name": {
1025
- "name": "name",
1026
- "type": "text",
1027
- "primaryKey": false,
1028
- "notNull": false
1029
- },
1030
- "start": {
1031
- "name": "start",
1032
- "type": "text",
1033
- "primaryKey": false,
1034
- "notNull": false
1035
- },
1036
- "prefix": {
1037
- "name": "prefix",
1038
- "type": "text",
1039
- "primaryKey": false,
1040
- "notNull": false
1041
- },
1042
- "key": {
1043
- "name": "key",
1044
- "type": "text",
1045
- "primaryKey": false,
1046
- "notNull": true
1047
- },
1048
- "reference_id": {
1049
- "name": "reference_id",
1050
- "type": "text",
1051
- "primaryKey": false,
1052
- "notNull": true
1053
- },
1054
- "refill_interval": {
1055
- "name": "refill_interval",
1056
- "type": "integer",
1057
- "primaryKey": false,
1058
- "notNull": false
1059
- },
1060
- "refill_amount": {
1061
- "name": "refill_amount",
1062
- "type": "integer",
1063
- "primaryKey": false,
1064
- "notNull": false
1065
- },
1066
- "last_refill_at": {
1067
- "name": "last_refill_at",
1068
- "type": "timestamp",
1069
- "primaryKey": false,
1070
- "notNull": false
1071
- },
1072
- "enabled": {
1073
- "name": "enabled",
1074
- "type": "boolean",
1075
- "primaryKey": false,
1076
- "notNull": false,
1077
- "default": true
1078
- },
1079
- "rate_limit_enabled": {
1080
- "name": "rate_limit_enabled",
1081
- "type": "boolean",
1082
- "primaryKey": false,
1083
- "notNull": false,
1084
- "default": true
1085
- },
1086
- "rate_limit_time_window": {
1087
- "name": "rate_limit_time_window",
1088
- "type": "integer",
1089
- "primaryKey": false,
1090
- "notNull": false,
1091
- "default": 86400000
1092
- },
1093
- "rate_limit_max": {
1094
- "name": "rate_limit_max",
1095
- "type": "integer",
1096
- "primaryKey": false,
1097
- "notNull": false,
1098
- "default": 10000
1099
- },
1100
- "request_count": {
1101
- "name": "request_count",
1102
- "type": "integer",
1103
- "primaryKey": false,
1104
- "notNull": false,
1105
- "default": 0
1106
- },
1107
- "remaining": {
1108
- "name": "remaining",
1109
- "type": "integer",
1110
- "primaryKey": false,
1111
- "notNull": false
1112
- },
1113
- "last_request": {
1114
- "name": "last_request",
1115
- "type": "timestamp",
1116
- "primaryKey": false,
1117
- "notNull": false
1118
- },
1119
- "expires_at": {
1120
- "name": "expires_at",
1121
- "type": "timestamp",
1122
- "primaryKey": false,
1123
- "notNull": false
1124
- },
1125
- "created_at": {
1126
- "name": "created_at",
1127
- "type": "timestamp",
1128
- "primaryKey": false,
1129
- "notNull": true
1130
- },
1131
- "updated_at": {
1132
- "name": "updated_at",
1133
- "type": "timestamp",
1134
- "primaryKey": false,
1135
- "notNull": true
1136
- },
1137
- "permissions": {
1138
- "name": "permissions",
1139
- "type": "text",
1140
- "primaryKey": false,
1141
- "notNull": false
1142
- },
1143
- "metadata": {
1144
- "name": "metadata",
1145
- "type": "text",
1146
- "primaryKey": false,
1147
- "notNull": false
1148
- }
1149
- },
1150
- "indexes": {},
1151
- "foreignKeys": {},
1152
- "compositePrimaryKeys": {},
1153
- "uniqueConstraints": {},
1154
- "policies": {},
1155
- "checkConstraints": {},
1156
- "isRLSEnabled": false
1157
- },
1158
- "public.session": {
1159
- "name": "session",
1160
- "schema": "",
1161
- "columns": {
1162
- "id": {
1163
- "name": "id",
1164
- "type": "text",
1165
- "primaryKey": true,
1166
- "notNull": true
1167
- },
1168
- "expires_at": {
1169
- "name": "expires_at",
1170
- "type": "timestamp",
1171
- "primaryKey": false,
1172
- "notNull": true
1173
- },
1174
- "token": {
1175
- "name": "token",
1176
- "type": "text",
1177
- "primaryKey": false,
1178
- "notNull": true
1179
- },
1180
- "created_at": {
1181
- "name": "created_at",
1182
- "type": "timestamp",
1183
- "primaryKey": false,
1184
- "notNull": true,
1185
- "default": "now()"
1186
- },
1187
- "updated_at": {
1188
- "name": "updated_at",
1189
- "type": "timestamp",
1190
- "primaryKey": false,
1191
- "notNull": true
1192
- },
1193
- "ip_address": {
1194
- "name": "ip_address",
1195
- "type": "text",
1196
- "primaryKey": false,
1197
- "notNull": false
1198
- },
1199
- "user_agent": {
1200
- "name": "user_agent",
1201
- "type": "text",
1202
- "primaryKey": false,
1203
- "notNull": false
1204
- },
1205
- "user_id": {
1206
- "name": "user_id",
1207
- "type": "text",
1208
- "primaryKey": false,
1209
- "notNull": true
1210
- }
1211
- },
1212
- "indexes": {},
1213
- "foreignKeys": {
1214
- "session_user_id_user_id_fk": {
1215
- "name": "session_user_id_user_id_fk",
1216
- "tableFrom": "session",
1217
- "tableTo": "user",
1218
- "columnsFrom": ["user_id"],
1219
- "columnsTo": ["id"],
1220
- "onDelete": "cascade",
1221
- "onUpdate": "no action"
1222
- }
1223
- },
1224
- "compositePrimaryKeys": {},
1225
- "uniqueConstraints": {
1226
- "session_token_unique": {
1227
- "name": "session_token_unique",
1228
- "nullsNotDistinct": false,
1229
- "columns": ["token"]
1230
- }
1231
- },
1232
- "policies": {},
1233
- "checkConstraints": {},
1234
- "isRLSEnabled": false
1235
- },
1236
- "public.user": {
1237
- "name": "user",
1238
- "schema": "",
1239
- "columns": {
1240
- "id": {
1241
- "name": "id",
1242
- "type": "text",
1243
- "primaryKey": true,
1244
- "notNull": true
1245
- },
1246
- "name": {
1247
- "name": "name",
1248
- "type": "text",
1249
- "primaryKey": false,
1250
- "notNull": true
1251
- },
1252
- "email": {
1253
- "name": "email",
1254
- "type": "text",
1255
- "primaryKey": false,
1256
- "notNull": true
1257
- },
1258
- "email_verified": {
1259
- "name": "email_verified",
1260
- "type": "boolean",
1261
- "primaryKey": false,
1262
- "notNull": true,
1263
- "default": false
1264
- },
1265
- "image": {
1266
- "name": "image",
1267
- "type": "text",
1268
- "primaryKey": false,
1269
- "notNull": false
1270
- },
1271
- "created_at": {
1272
- "name": "created_at",
1273
- "type": "timestamp",
1274
- "primaryKey": false,
1275
- "notNull": true,
1276
- "default": "now()"
1277
- },
1278
- "updated_at": {
1279
- "name": "updated_at",
1280
- "type": "timestamp",
1281
- "primaryKey": false,
1282
- "notNull": true,
1283
- "default": "now()"
1284
- }
1285
- },
1286
- "indexes": {},
1287
- "foreignKeys": {},
1288
- "compositePrimaryKeys": {},
1289
- "uniqueConstraints": {
1290
- "user_email_unique": {
1291
- "name": "user_email_unique",
1292
- "nullsNotDistinct": false,
1293
- "columns": ["email"]
1294
- }
1295
- },
1296
- "policies": {},
1297
- "checkConstraints": {},
1298
- "isRLSEnabled": false
1299
- },
1300
- "public.verification": {
1301
- "name": "verification",
1302
- "schema": "",
1303
- "columns": {
1304
- "id": {
1305
- "name": "id",
1306
- "type": "text",
1307
- "primaryKey": true,
1308
- "notNull": true
1309
- },
1310
- "identifier": {
1311
- "name": "identifier",
1312
- "type": "text",
1313
- "primaryKey": false,
1314
- "notNull": true
1315
- },
1316
- "value": {
1317
- "name": "value",
1318
- "type": "text",
1319
- "primaryKey": false,
1320
- "notNull": true
1321
- },
1322
- "expires_at": {
1323
- "name": "expires_at",
1324
- "type": "timestamp",
1325
- "primaryKey": false,
1326
- "notNull": true
1327
- },
1328
- "created_at": {
1329
- "name": "created_at",
1330
- "type": "timestamp",
1331
- "primaryKey": false,
1332
- "notNull": true,
1333
- "default": "now()"
1334
- },
1335
- "updated_at": {
1336
- "name": "updated_at",
1337
- "type": "timestamp",
1338
- "primaryKey": false,
1339
- "notNull": true,
1340
- "default": "now()"
1341
- }
1342
- },
1343
- "indexes": {},
1344
- "foreignKeys": {},
1345
- "compositePrimaryKeys": {},
1346
- "uniqueConstraints": {},
1347
- "policies": {},
1348
- "checkConstraints": {},
1349
- "isRLSEnabled": false
1350
- }
1351
- },
1352
- "enums": {
1353
- "public.document_status": {
1354
- "name": "document_status",
1355
- "schema": "public",
1356
- "values": ["draft", "published", "unpublished"]
1357
- },
1358
- "public.schema_type": {
1359
- "name": "schema_type",
1360
- "schema": "public",
1361
- "values": ["document", "object"]
1362
- },
1363
- "public.version_event": {
1364
- "name": "version_event",
1365
- "schema": "public",
1366
- "values": ["draft", "publish"]
1367
- }
1368
- },
1369
- "schemas": {},
1370
- "sequences": {},
1371
- "roles": {},
1372
- "policies": {},
1373
- "views": {},
1374
- "_meta": {
1375
- "columns": {},
1376
- "schemas": {},
1377
- "tables": {}
1378
- }
1379
- }