@actuate-media/cms-core 0.19.0 → 0.21.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 (72) hide show
  1. package/LICENSE +21 -21
  2. package/dist/__tests__/api/ai-quality.test.d.ts +2 -0
  3. package/dist/__tests__/api/ai-quality.test.d.ts.map +1 -0
  4. package/dist/__tests__/api/ai-quality.test.js +470 -0
  5. package/dist/__tests__/api/ai-quality.test.js.map +1 -0
  6. package/dist/__tests__/fields/component-block.test.d.ts +2 -0
  7. package/dist/__tests__/fields/component-block.test.d.ts.map +1 -0
  8. package/dist/__tests__/fields/component-block.test.js +129 -0
  9. package/dist/__tests__/fields/component-block.test.js.map +1 -0
  10. package/dist/__tests__/seo/config-store.test.d.ts +2 -0
  11. package/dist/__tests__/seo/config-store.test.d.ts.map +1 -0
  12. package/dist/__tests__/seo/config-store.test.js +167 -0
  13. package/dist/__tests__/seo/config-store.test.js.map +1 -0
  14. package/dist/api/handler-factory.d.ts.map +1 -1
  15. package/dist/api/handler-factory.js +4 -0
  16. package/dist/api/handler-factory.js.map +1 -1
  17. package/dist/api/handlers.d.ts.map +1 -1
  18. package/dist/api/handlers.js +566 -21
  19. package/dist/api/handlers.js.map +1 -1
  20. package/dist/config/types.d.ts +61 -1
  21. package/dist/config/types.d.ts.map +1 -1
  22. package/dist/fields/component-block.d.ts +23 -0
  23. package/dist/fields/component-block.d.ts.map +1 -0
  24. package/dist/fields/component-block.js +137 -0
  25. package/dist/fields/component-block.js.map +1 -0
  26. package/dist/fields/index.d.ts.map +1 -1
  27. package/dist/fields/index.js +2 -0
  28. package/dist/fields/index.js.map +1 -1
  29. package/dist/seo/config-store.d.ts +61 -0
  30. package/dist/seo/config-store.d.ts.map +1 -0
  31. package/dist/seo/config-store.js +158 -0
  32. package/dist/seo/config-store.js.map +1 -0
  33. package/dist/seo/index.d.ts +2 -0
  34. package/dist/seo/index.d.ts.map +1 -1
  35. package/dist/seo/index.js +1 -0
  36. package/dist/seo/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/prisma/cms-schema.prisma +306 -306
  39. package/prisma/migrations/0001_init/migration.sql +384 -384
  40. package/prisma/migrations/0002_folders/migration.sql +39 -39
  41. package/prisma/migrations/0003_search_and_webhooks/migration.sql +50 -50
  42. package/prisma/migrations/0004_script_tags/migration.sql +21 -21
  43. package/prisma/migrations/0005_password_reset_tokens/migration.sql +20 -20
  44. package/prisma/migrations/0006_page_builder/migration.sql +38 -38
  45. package/prisma/migrations/migration_lock.toml +3 -3
  46. package/prisma/schema.prisma +549 -549
  47. package/generated/browser.ts +0 -109
  48. package/generated/client.ts +0 -133
  49. package/generated/commonInputTypes.ts +0 -709
  50. package/generated/enums.ts +0 -125
  51. package/generated/internal/class.ts +0 -376
  52. package/generated/internal/prismaNamespace.ts +0 -2617
  53. package/generated/internal/prismaNamespaceBrowser.ts +0 -611
  54. package/generated/models/ApiKey.ts +0 -1550
  55. package/generated/models/AuditLog.ts +0 -1206
  56. package/generated/models/BackupRecord.ts +0 -1250
  57. package/generated/models/ContentLock.ts +0 -1472
  58. package/generated/models/ContentTemplate.ts +0 -1416
  59. package/generated/models/Document.ts +0 -3005
  60. package/generated/models/Folder.ts +0 -1904
  61. package/generated/models/FormSubmission.ts +0 -1200
  62. package/generated/models/InAppNotification.ts +0 -1457
  63. package/generated/models/Media.ts +0 -2340
  64. package/generated/models/MediaUsage.ts +0 -1472
  65. package/generated/models/OAuthAccount.ts +0 -1463
  66. package/generated/models/Redirect.ts +0 -1284
  67. package/generated/models/Session.ts +0 -1492
  68. package/generated/models/Site.ts +0 -1206
  69. package/generated/models/User.ts +0 -3513
  70. package/generated/models/Version.ts +0 -1511
  71. package/generated/models/WorkflowState.ts +0 -1514
  72. package/generated/models.ts +0 -29
@@ -1,39 +1,39 @@
1
- -- CreateTable
2
- CREATE TABLE "actuate_folders" (
3
- "id" TEXT NOT NULL,
4
- "name" TEXT NOT NULL,
5
- "scope" TEXT NOT NULL,
6
- "parentId" TEXT,
7
- "position" INTEGER NOT NULL DEFAULT 0,
8
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
9
- "updatedAt" TIMESTAMP(3) NOT NULL,
10
-
11
- CONSTRAINT "actuate_folders_pkey" PRIMARY KEY ("id")
12
- );
13
-
14
- -- CreateIndex
15
- CREATE INDEX "actuate_folders_scope_idx" ON "actuate_folders"("scope");
16
-
17
- -- CreateIndex
18
- CREATE INDEX "actuate_folders_parentId_idx" ON "actuate_folders"("parentId");
19
-
20
- -- AddForeignKey (self-relation for nesting)
21
- ALTER TABLE "actuate_folders" ADD CONSTRAINT "actuate_folders_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "actuate_folders"("id") ON DELETE CASCADE ON UPDATE CASCADE;
22
-
23
- -- AlterTable: add folderId to documents
24
- ALTER TABLE "actuate_documents" ADD COLUMN "folderId" TEXT;
25
-
26
- -- CreateIndex
27
- CREATE INDEX "actuate_documents_folderId_idx" ON "actuate_documents"("folderId");
28
-
29
- -- AddForeignKey
30
- ALTER TABLE "actuate_documents" ADD CONSTRAINT "actuate_documents_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "actuate_folders"("id") ON DELETE SET NULL ON UPDATE CASCADE;
31
-
32
- -- AlterTable: add folderId to media
33
- ALTER TABLE "actuate_media" ADD COLUMN "folderId" TEXT;
34
-
35
- -- CreateIndex
36
- CREATE INDEX "actuate_media_folderId_idx" ON "actuate_media"("folderId");
37
-
38
- -- AddForeignKey
39
- ALTER TABLE "actuate_media" ADD CONSTRAINT "actuate_media_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "actuate_folders"("id") ON DELETE SET NULL ON UPDATE CASCADE;
1
+ -- CreateTable
2
+ CREATE TABLE "actuate_folders" (
3
+ "id" TEXT NOT NULL,
4
+ "name" TEXT NOT NULL,
5
+ "scope" TEXT NOT NULL,
6
+ "parentId" TEXT,
7
+ "position" INTEGER NOT NULL DEFAULT 0,
8
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
9
+ "updatedAt" TIMESTAMP(3) NOT NULL,
10
+
11
+ CONSTRAINT "actuate_folders_pkey" PRIMARY KEY ("id")
12
+ );
13
+
14
+ -- CreateIndex
15
+ CREATE INDEX "actuate_folders_scope_idx" ON "actuate_folders"("scope");
16
+
17
+ -- CreateIndex
18
+ CREATE INDEX "actuate_folders_parentId_idx" ON "actuate_folders"("parentId");
19
+
20
+ -- AddForeignKey (self-relation for nesting)
21
+ ALTER TABLE "actuate_folders" ADD CONSTRAINT "actuate_folders_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "actuate_folders"("id") ON DELETE CASCADE ON UPDATE CASCADE;
22
+
23
+ -- AlterTable: add folderId to documents
24
+ ALTER TABLE "actuate_documents" ADD COLUMN "folderId" TEXT;
25
+
26
+ -- CreateIndex
27
+ CREATE INDEX "actuate_documents_folderId_idx" ON "actuate_documents"("folderId");
28
+
29
+ -- AddForeignKey
30
+ ALTER TABLE "actuate_documents" ADD CONSTRAINT "actuate_documents_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "actuate_folders"("id") ON DELETE SET NULL ON UPDATE CASCADE;
31
+
32
+ -- AlterTable: add folderId to media
33
+ ALTER TABLE "actuate_media" ADD COLUMN "folderId" TEXT;
34
+
35
+ -- CreateIndex
36
+ CREATE INDEX "actuate_media_folderId_idx" ON "actuate_media"("folderId");
37
+
38
+ -- AddForeignKey
39
+ ALTER TABLE "actuate_media" ADD CONSTRAINT "actuate_media_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "actuate_folders"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -1,50 +1,50 @@
1
- -- Full-text search: GIN index on documents for fast ts_vector queries
2
- CREATE INDEX IF NOT EXISTS "idx_actuate_documents_fts"
3
- ON "actuate_documents"
4
- USING GIN (to_tsvector('english', COALESCE("title", '') || ' ' || COALESCE("plainText", '')));
5
-
6
- -- Webhook endpoints table
7
- CREATE TABLE IF NOT EXISTS "actuate_webhook_endpoints" (
8
- "id" TEXT NOT NULL,
9
- "url" TEXT NOT NULL,
10
- "events" JSONB NOT NULL,
11
- "secret" TEXT NOT NULL,
12
- "active" BOOLEAN NOT NULL DEFAULT true,
13
- "name" TEXT,
14
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
15
- "updatedAt" TIMESTAMP(3) NOT NULL,
16
-
17
- CONSTRAINT "actuate_webhook_endpoints_pkey" PRIMARY KEY ("id")
18
- );
19
-
20
- -- Webhook delivery log table
21
- CREATE TABLE IF NOT EXISTS "actuate_webhook_deliveries" (
22
- "id" TEXT NOT NULL,
23
- "endpointId" TEXT NOT NULL,
24
- "event" TEXT NOT NULL,
25
- "payload" JSONB NOT NULL,
26
- "status" TEXT NOT NULL DEFAULT 'pending',
27
- "attempts" INTEGER NOT NULL DEFAULT 0,
28
- "maxAttempts" INTEGER NOT NULL DEFAULT 3,
29
- "lastAttemptAt" TIMESTAMP(3),
30
- "nextRetryAt" TIMESTAMP(3),
31
- "responseStatus" INTEGER,
32
- "responseBody" TEXT,
33
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
34
-
35
- CONSTRAINT "actuate_webhook_deliveries_pkey" PRIMARY KEY ("id")
36
- );
37
-
38
- CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_endpointId_idx"
39
- ON "actuate_webhook_deliveries"("endpointId");
40
-
41
- CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_status_idx"
42
- ON "actuate_webhook_deliveries"("status");
43
-
44
- CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_nextRetryAt_idx"
45
- ON "actuate_webhook_deliveries"("nextRetryAt");
46
-
47
- ALTER TABLE "actuate_webhook_deliveries"
48
- ADD CONSTRAINT "actuate_webhook_deliveries_endpointId_fkey"
49
- FOREIGN KEY ("endpointId") REFERENCES "actuate_webhook_endpoints"("id")
50
- ON DELETE CASCADE ON UPDATE CASCADE;
1
+ -- Full-text search: GIN index on documents for fast ts_vector queries
2
+ CREATE INDEX IF NOT EXISTS "idx_actuate_documents_fts"
3
+ ON "actuate_documents"
4
+ USING GIN (to_tsvector('english', COALESCE("title", '') || ' ' || COALESCE("plainText", '')));
5
+
6
+ -- Webhook endpoints table
7
+ CREATE TABLE IF NOT EXISTS "actuate_webhook_endpoints" (
8
+ "id" TEXT NOT NULL,
9
+ "url" TEXT NOT NULL,
10
+ "events" JSONB NOT NULL,
11
+ "secret" TEXT NOT NULL,
12
+ "active" BOOLEAN NOT NULL DEFAULT true,
13
+ "name" TEXT,
14
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
15
+ "updatedAt" TIMESTAMP(3) NOT NULL,
16
+
17
+ CONSTRAINT "actuate_webhook_endpoints_pkey" PRIMARY KEY ("id")
18
+ );
19
+
20
+ -- Webhook delivery log table
21
+ CREATE TABLE IF NOT EXISTS "actuate_webhook_deliveries" (
22
+ "id" TEXT NOT NULL,
23
+ "endpointId" TEXT NOT NULL,
24
+ "event" TEXT NOT NULL,
25
+ "payload" JSONB NOT NULL,
26
+ "status" TEXT NOT NULL DEFAULT 'pending',
27
+ "attempts" INTEGER NOT NULL DEFAULT 0,
28
+ "maxAttempts" INTEGER NOT NULL DEFAULT 3,
29
+ "lastAttemptAt" TIMESTAMP(3),
30
+ "nextRetryAt" TIMESTAMP(3),
31
+ "responseStatus" INTEGER,
32
+ "responseBody" TEXT,
33
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
34
+
35
+ CONSTRAINT "actuate_webhook_deliveries_pkey" PRIMARY KEY ("id")
36
+ );
37
+
38
+ CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_endpointId_idx"
39
+ ON "actuate_webhook_deliveries"("endpointId");
40
+
41
+ CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_status_idx"
42
+ ON "actuate_webhook_deliveries"("status");
43
+
44
+ CREATE INDEX IF NOT EXISTS "actuate_webhook_deliveries_nextRetryAt_idx"
45
+ ON "actuate_webhook_deliveries"("nextRetryAt");
46
+
47
+ ALTER TABLE "actuate_webhook_deliveries"
48
+ ADD CONSTRAINT "actuate_webhook_deliveries_endpointId_fkey"
49
+ FOREIGN KEY ("endpointId") REFERENCES "actuate_webhook_endpoints"("id")
50
+ ON DELETE CASCADE ON UPDATE CASCADE;
@@ -1,21 +1,21 @@
1
- -- CreateTable
2
- CREATE TABLE "actuate_script_tags" (
3
- "id" TEXT NOT NULL,
4
- "name" TEXT NOT NULL,
5
- "code" TEXT NOT NULL,
6
- "placement" TEXT NOT NULL,
7
- "scope" TEXT NOT NULL,
8
- "targetPaths" TEXT[],
9
- "priority" INTEGER NOT NULL DEFAULT 100,
10
- "enabled" BOOLEAN NOT NULL DEFAULT true,
11
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
12
- "updatedAt" TIMESTAMP(3) NOT NULL,
13
-
14
- CONSTRAINT "actuate_script_tags_pkey" PRIMARY KEY ("id")
15
- );
16
-
17
- -- CreateIndex
18
- CREATE INDEX "actuate_script_tags_enabled_idx" ON "actuate_script_tags"("enabled");
19
-
20
- -- CreateIndex
21
- CREATE INDEX "actuate_script_tags_placement_idx" ON "actuate_script_tags"("placement");
1
+ -- CreateTable
2
+ CREATE TABLE "actuate_script_tags" (
3
+ "id" TEXT NOT NULL,
4
+ "name" TEXT NOT NULL,
5
+ "code" TEXT NOT NULL,
6
+ "placement" TEXT NOT NULL,
7
+ "scope" TEXT NOT NULL,
8
+ "targetPaths" TEXT[],
9
+ "priority" INTEGER NOT NULL DEFAULT 100,
10
+ "enabled" BOOLEAN NOT NULL DEFAULT true,
11
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
12
+ "updatedAt" TIMESTAMP(3) NOT NULL,
13
+
14
+ CONSTRAINT "actuate_script_tags_pkey" PRIMARY KEY ("id")
15
+ );
16
+
17
+ -- CreateIndex
18
+ CREATE INDEX "actuate_script_tags_enabled_idx" ON "actuate_script_tags"("enabled");
19
+
20
+ -- CreateIndex
21
+ CREATE INDEX "actuate_script_tags_placement_idx" ON "actuate_script_tags"("placement");
@@ -1,20 +1,20 @@
1
- -- CreateTable
2
- CREATE TABLE "actuate_password_reset_tokens" (
3
- "id" TEXT NOT NULL,
4
- "userId" TEXT NOT NULL,
5
- "tokenHash" TEXT NOT NULL,
6
- "expiresAt" TIMESTAMP(3) NOT NULL,
7
- "usedAt" TIMESTAMP(3),
8
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
9
-
10
- CONSTRAINT "actuate_password_reset_tokens_pkey" PRIMARY KEY ("id")
11
- );
12
-
13
- -- CreateIndex
14
- CREATE INDEX "actuate_password_reset_tokens_tokenHash_idx" ON "actuate_password_reset_tokens"("tokenHash");
15
-
16
- -- CreateIndex
17
- CREATE INDEX "actuate_password_reset_tokens_userId_idx" ON "actuate_password_reset_tokens"("userId");
18
-
19
- -- AddForeignKey
20
- ALTER TABLE "actuate_password_reset_tokens" ADD CONSTRAINT "actuate_password_reset_tokens_userId_fkey" FOREIGN KEY ("userId") REFERENCES "actuate_users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
1
+ -- CreateTable
2
+ CREATE TABLE "actuate_password_reset_tokens" (
3
+ "id" TEXT NOT NULL,
4
+ "userId" TEXT NOT NULL,
5
+ "tokenHash" TEXT NOT NULL,
6
+ "expiresAt" TIMESTAMP(3) NOT NULL,
7
+ "usedAt" TIMESTAMP(3),
8
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
9
+
10
+ CONSTRAINT "actuate_password_reset_tokens_pkey" PRIMARY KEY ("id")
11
+ );
12
+
13
+ -- CreateIndex
14
+ CREATE INDEX "actuate_password_reset_tokens_tokenHash_idx" ON "actuate_password_reset_tokens"("tokenHash");
15
+
16
+ -- CreateIndex
17
+ CREATE INDEX "actuate_password_reset_tokens_userId_idx" ON "actuate_password_reset_tokens"("userId");
18
+
19
+ -- AddForeignKey
20
+ ALTER TABLE "actuate_password_reset_tokens" ADD CONSTRAINT "actuate_password_reset_tokens_userId_fkey" FOREIGN KEY ("userId") REFERENCES "actuate_users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -1,38 +1,38 @@
1
- -- CreateTable
2
- CREATE TABLE "actuate_page_templates" (
3
- "id" TEXT NOT NULL,
4
- "name" TEXT NOT NULL,
5
- "description" TEXT,
6
- "category" TEXT NOT NULL DEFAULT 'content',
7
- "tree" JSONB NOT NULL,
8
- "thumbnail" TEXT,
9
- "builtIn" BOOLEAN NOT NULL DEFAULT false,
10
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
11
- "updatedAt" TIMESTAMP(3) NOT NULL,
12
-
13
- CONSTRAINT "actuate_page_templates_pkey" PRIMARY KEY ("id")
14
- );
15
-
16
- -- CreateTable
17
- CREATE TABLE "actuate_saved_sections" (
18
- "id" TEXT NOT NULL,
19
- "name" TEXT NOT NULL,
20
- "description" TEXT,
21
- "category" TEXT NOT NULL DEFAULT 'content',
22
- "tree" JSONB NOT NULL,
23
- "thumbnail" TEXT,
24
- "usageCount" INTEGER NOT NULL DEFAULT 0,
25
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
26
- "updatedAt" TIMESTAMP(3) NOT NULL,
27
-
28
- CONSTRAINT "actuate_saved_sections_pkey" PRIMARY KEY ("id")
29
- );
30
-
31
- -- CreateIndex
32
- CREATE INDEX "actuate_page_templates_category_idx" ON "actuate_page_templates"("category");
33
-
34
- -- CreateIndex
35
- CREATE INDEX "actuate_page_templates_builtIn_idx" ON "actuate_page_templates"("builtIn");
36
-
37
- -- CreateIndex
38
- CREATE INDEX "actuate_saved_sections_category_idx" ON "actuate_saved_sections"("category");
1
+ -- CreateTable
2
+ CREATE TABLE "actuate_page_templates" (
3
+ "id" TEXT NOT NULL,
4
+ "name" TEXT NOT NULL,
5
+ "description" TEXT,
6
+ "category" TEXT NOT NULL DEFAULT 'content',
7
+ "tree" JSONB NOT NULL,
8
+ "thumbnail" TEXT,
9
+ "builtIn" BOOLEAN NOT NULL DEFAULT false,
10
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
11
+ "updatedAt" TIMESTAMP(3) NOT NULL,
12
+
13
+ CONSTRAINT "actuate_page_templates_pkey" PRIMARY KEY ("id")
14
+ );
15
+
16
+ -- CreateTable
17
+ CREATE TABLE "actuate_saved_sections" (
18
+ "id" TEXT NOT NULL,
19
+ "name" TEXT NOT NULL,
20
+ "description" TEXT,
21
+ "category" TEXT NOT NULL DEFAULT 'content',
22
+ "tree" JSONB NOT NULL,
23
+ "thumbnail" TEXT,
24
+ "usageCount" INTEGER NOT NULL DEFAULT 0,
25
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
26
+ "updatedAt" TIMESTAMP(3) NOT NULL,
27
+
28
+ CONSTRAINT "actuate_saved_sections_pkey" PRIMARY KEY ("id")
29
+ );
30
+
31
+ -- CreateIndex
32
+ CREATE INDEX "actuate_page_templates_category_idx" ON "actuate_page_templates"("category");
33
+
34
+ -- CreateIndex
35
+ CREATE INDEX "actuate_page_templates_builtIn_idx" ON "actuate_page_templates"("builtIn");
36
+
37
+ -- CreateIndex
38
+ CREATE INDEX "actuate_saved_sections_category_idx" ON "actuate_saved_sections"("category");
@@ -1,3 +1,3 @@
1
- # Please do not edit this file manually
2
- # It should be added in your version-control system (e.g., Git)
3
- provider = "postgresql"
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (e.g., Git)
3
+ provider = "postgresql"