@actuate-media/cms-core 0.90.1 → 0.91.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 (88) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/actions.d.ts +31 -1
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +76 -21
  5. package/dist/actions.js.map +1 -1
  6. package/dist/api/route-helpers.d.ts +4 -1
  7. package/dist/api/route-helpers.d.ts.map +1 -1
  8. package/dist/api/route-helpers.js +2 -2
  9. package/dist/api/route-helpers.js.map +1 -1
  10. package/dist/api/routes/documents.d.ts.map +1 -1
  11. package/dist/api/routes/documents.js +4 -1
  12. package/dist/api/routes/documents.js.map +1 -1
  13. package/dist/api/routes/media.d.ts.map +1 -1
  14. package/dist/api/routes/media.js +10 -0
  15. package/dist/api/routes/media.js.map +1 -1
  16. package/dist/api/routes/url-resolution.d.ts.map +1 -1
  17. package/dist/api/routes/url-resolution.js +4 -1
  18. package/dist/api/routes/url-resolution.js.map +1 -1
  19. package/dist/config/index.d.ts +16 -0
  20. package/dist/config/index.d.ts.map +1 -1
  21. package/dist/config/index.js +59 -2
  22. package/dist/config/index.js.map +1 -1
  23. package/dist/config/runtime.d.ts +8 -0
  24. package/dist/config/runtime.d.ts.map +1 -1
  25. package/dist/config/runtime.js.map +1 -1
  26. package/dist/config/types.d.ts +35 -4
  27. package/dist/config/types.d.ts.map +1 -1
  28. package/dist/index.d.ts +3 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/media/usage-sync.d.ts +37 -0
  33. package/dist/media/usage-sync.d.ts.map +1 -0
  34. package/dist/media/usage-sync.js +234 -0
  35. package/dist/media/usage-sync.js.map +1 -0
  36. package/dist/realtime/comments.d.ts +1 -1
  37. package/dist/realtime/comments.js +1 -1
  38. package/dist/realtime/notifications.d.ts +1 -1
  39. package/dist/realtime/notifications.js +1 -1
  40. package/dist/realtime/persistence.d.ts +1 -1
  41. package/dist/search/index.d.ts.map +1 -1
  42. package/dist/search/index.js +58 -35
  43. package/dist/search/index.js.map +1 -1
  44. package/generated/browser.ts +229 -0
  45. package/generated/client.ts +253 -0
  46. package/generated/commonInputTypes.ts +1024 -0
  47. package/generated/enums.ts +211 -0
  48. package/generated/internal/class.ts +547 -0
  49. package/generated/internal/prismaNamespace.ts +4596 -0
  50. package/generated/internal/prismaNamespaceBrowser.ts +1188 -0
  51. package/generated/models/AiCrawlerHit.ts +1275 -0
  52. package/generated/models/ApiKey.ts +1559 -0
  53. package/generated/models/ApiRequestMetric.ts +1390 -0
  54. package/generated/models/AuditLog.ts +1215 -0
  55. package/generated/models/BackupRecord.ts +1259 -0
  56. package/generated/models/ContentIssue.ts +1496 -0
  57. package/generated/models/ContentLock.ts +1481 -0
  58. package/generated/models/ContentTemplate.ts +1425 -0
  59. package/generated/models/Document.ts +3486 -0
  60. package/generated/models/Folder.ts +1905 -0
  61. package/generated/models/FormSchemaVersion.ts +1265 -0
  62. package/generated/models/FormSubmission.ts +2105 -0
  63. package/generated/models/FormSubmissionFile.ts +1615 -0
  64. package/generated/models/FormWebhook.ts +1371 -0
  65. package/generated/models/InAppNotification.ts +1466 -0
  66. package/generated/models/Invite.ts +1393 -0
  67. package/generated/models/Media.ts +2887 -0
  68. package/generated/models/MediaUsage.ts +1488 -0
  69. package/generated/models/OAuthAccount.ts +1472 -0
  70. package/generated/models/PageTemplate.ts +1271 -0
  71. package/generated/models/PasswordResetToken.ts +1396 -0
  72. package/generated/models/Redirect.ts +1501 -0
  73. package/generated/models/Redirect404Hit.ts +1266 -0
  74. package/generated/models/RedirectSuggestion.ts +1344 -0
  75. package/generated/models/SavedSection.ts +1315 -0
  76. package/generated/models/ScriptTag.ts +1453 -0
  77. package/generated/models/SeoAuditRun.ts +1745 -0
  78. package/generated/models/SeoIssue.ts +2047 -0
  79. package/generated/models/Session.ts +1501 -0
  80. package/generated/models/Site.ts +1215 -0
  81. package/generated/models/User.ts +4558 -0
  82. package/generated/models/Version.ts +1520 -0
  83. package/generated/models/WebhookDeliveryLog.ts +1656 -0
  84. package/generated/models/WebhookEndpoint.ts +1433 -0
  85. package/generated/models/WorkflowState.ts +1523 -0
  86. package/generated/models.ts +46 -0
  87. package/package.json +5 -3
  88. package/{prisma → schema-fragments}/cms-schema.prisma +15 -2
@@ -0,0 +1,229 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma-related types and utilities in a browser.
8
+ * Use it to get access to models, enums, and input types.
9
+ *
10
+ * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
11
+ * See `client.ts` for the standard, server-side entry point.
12
+ *
13
+ * 🟢 You can import this file directly.
14
+ */
15
+
16
+ import * as Prisma from './internal/prismaNamespaceBrowser.js'
17
+ export { Prisma }
18
+ export * as $Enums from './enums.js'
19
+ export * from './enums.js';
20
+ /**
21
+ * Model User
22
+ *
23
+ */
24
+ export type User = Prisma.UserModel
25
+ /**
26
+ * Model OAuthAccount
27
+ *
28
+ */
29
+ export type OAuthAccount = Prisma.OAuthAccountModel
30
+ /**
31
+ * Model Session
32
+ *
33
+ */
34
+ export type Session = Prisma.SessionModel
35
+ /**
36
+ * Model ApiKey
37
+ *
38
+ */
39
+ export type ApiKey = Prisma.ApiKeyModel
40
+ /**
41
+ * Model AuditLog
42
+ *
43
+ */
44
+ export type AuditLog = Prisma.AuditLogModel
45
+ /**
46
+ * Model Folder
47
+ *
48
+ */
49
+ export type Folder = Prisma.FolderModel
50
+ /**
51
+ * Model Document
52
+ *
53
+ */
54
+ export type Document = Prisma.DocumentModel
55
+ /**
56
+ * Model Version
57
+ *
58
+ */
59
+ export type Version = Prisma.VersionModel
60
+ /**
61
+ * Model Media
62
+ *
63
+ */
64
+ export type Media = Prisma.MediaModel
65
+ /**
66
+ * Model MediaUsage
67
+ *
68
+ */
69
+ export type MediaUsage = Prisma.MediaUsageModel
70
+ /**
71
+ * Model ContentLock
72
+ *
73
+ */
74
+ export type ContentLock = Prisma.ContentLockModel
75
+ /**
76
+ * Model InAppNotification
77
+ *
78
+ */
79
+ export type InAppNotification = Prisma.InAppNotificationModel
80
+ /**
81
+ * Model ContentTemplate
82
+ *
83
+ */
84
+ export type ContentTemplate = Prisma.ContentTemplateModel
85
+ /**
86
+ * Model Site
87
+ *
88
+ */
89
+ export type Site = Prisma.SiteModel
90
+ /**
91
+ * Model WorkflowState
92
+ *
93
+ */
94
+ export type WorkflowState = Prisma.WorkflowStateModel
95
+ /**
96
+ * Model Redirect
97
+ *
98
+ */
99
+ export type Redirect = Prisma.RedirectModel
100
+ /**
101
+ * Model SeoAuditRun
102
+ * One execution of the SEO audit engine. Holds a snapshot of the site
103
+ * score and issue counts so the Audit tab can show run history without
104
+ * recomputing. Issues belong to a run via SEOIssue.auditRunId.
105
+ */
106
+ export type SeoAuditRun = Prisma.SeoAuditRunModel
107
+ /**
108
+ * Model SeoIssue
109
+ * A single SEO problem detected by an audit run. `issueKey` is a stable
110
+ * hash of (type + entityId/url) used to carry status across runs so a
111
+ * resolved/ignored issue stays resolved/ignored when re-detected.
112
+ */
113
+ export type SeoIssue = Prisma.SeoIssueModel
114
+ /**
115
+ * Model Redirect404Hit
116
+ * A 404 hit observed by the redirect middleware. Aggregated per path so
117
+ * the Redirects tab can surface "broken URLs still getting traffic".
118
+ */
119
+ export type Redirect404Hit = Prisma.Redirect404HitModel
120
+ /**
121
+ * Model AiCrawlerHit
122
+ * Aggregated AI-crawler activity for the admin "AI crawler activity" panel.
123
+ * One row per (bot token, surface), upserted on each hit so the table stays
124
+ * bounded (~known bots × surfaces) and needs no periodic pruning.
125
+ * `surface` ∈ "llms" | "llms-full" | "md" | "honeypot".
126
+ * `category` mirrors the ai-bots taxonomy: "training" | "retrieval" | "other".
127
+ */
128
+ export type AiCrawlerHit = Prisma.AiCrawlerHitModel
129
+ /**
130
+ * Model RedirectSuggestion
131
+ * An AI/heuristic suggestion for a 404 destination. Confidence-scored and
132
+ * never auto-applied below the configured threshold.
133
+ */
134
+ export type RedirectSuggestion = Prisma.RedirectSuggestionModel
135
+ /**
136
+ * Model FormSchemaVersion
137
+ *
138
+ */
139
+ export type FormSchemaVersion = Prisma.FormSchemaVersionModel
140
+ /**
141
+ * Model FormSubmission
142
+ *
143
+ */
144
+ export type FormSubmission = Prisma.FormSubmissionModel
145
+ /**
146
+ * Model FormSubmissionFile
147
+ *
148
+ */
149
+ export type FormSubmissionFile = Prisma.FormSubmissionFileModel
150
+ /**
151
+ * Model FormWebhook
152
+ *
153
+ */
154
+ export type FormWebhook = Prisma.FormWebhookModel
155
+ /**
156
+ * Model BackupRecord
157
+ *
158
+ */
159
+ export type BackupRecord = Prisma.BackupRecordModel
160
+ /**
161
+ * Model WebhookEndpoint
162
+ *
163
+ */
164
+ export type WebhookEndpoint = Prisma.WebhookEndpointModel
165
+ /**
166
+ * Model WebhookDeliveryLog
167
+ *
168
+ */
169
+ export type WebhookDeliveryLog = Prisma.WebhookDeliveryLogModel
170
+ /**
171
+ * Model PasswordResetToken
172
+ *
173
+ */
174
+ export type PasswordResetToken = Prisma.PasswordResetTokenModel
175
+ /**
176
+ * Model Invite
177
+ *
178
+ */
179
+ export type Invite = Prisma.InviteModel
180
+ /**
181
+ * Model ScriptTag
182
+ *
183
+ */
184
+ export type ScriptTag = Prisma.ScriptTagModel
185
+ /**
186
+ * Model PageTemplate
187
+ *
188
+ */
189
+ export type PageTemplate = Prisma.PageTemplateModel
190
+ /**
191
+ * Model SavedSection
192
+ *
193
+ */
194
+ export type SavedSection = Prisma.SavedSectionModel
195
+ /**
196
+ * Model ApiRequestMetric
197
+ * Per-minute pre-aggregated request counters that power the
198
+ * "Delivery API" dashboard tiles (request volume, error rate,
199
+ * average latency, p95). One row per (bucketStart × route × statusBucket).
200
+ *
201
+ * Why pre-aggregated minute buckets and not per-request rows:
202
+ * - 24h of traffic at 10 req/s on 20 routes ≈ 17M raw rows; the
203
+ * equivalent minute-bucketed table is ≤ 28,800 rows (1440 × 20).
204
+ * - Vercel Functions are concurrency-bounded; an O(1) UPSERT per
205
+ * request is cheaper than O(write+query) per dashboard load.
206
+ * - 7-day retention is enforced by the
207
+ * `/api/cms/cron/api-metrics-prune` cron, so the table stays
208
+ * bounded.
209
+ *
210
+ * `latencyHistogram` is a fixed 12-bucket log-scale array (ms):
211
+ * [<1, 1-2, 2-4, 4-8, 8-16, 16-32, 32-64, 64-128, 128-256,
212
+ * 256-512, 512-1024, >1024]
213
+ * Cumulative-sum to estimate p95 with ~10% accuracy without
214
+ * per-request samples. The `delivery-stats` reader merges
215
+ * histograms across buckets before estimating.
216
+ */
217
+ export type ApiRequestMetric = Prisma.ApiRequestMetricModel
218
+ /**
219
+ * Model ContentIssue
220
+ * Persisted content-quality issues surfaced by the nightly
221
+ * content-health scan. The Dashboard's "Content Health" card
222
+ * aggregates these rows by `type` to produce the issue list.
223
+ *
224
+ * Upsert key is `(documentId, type)` so the scanner is
225
+ * idempotent — re-running yields the same row count, and a row
226
+ * "self-resolves" by being absent from the next scan (the
227
+ * scanner uses a `firstScanAt`-watermark + delete pattern).
228
+ */
229
+ export type ContentIssue = Prisma.ContentIssueModel
@@ -0,0 +1,253 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
8
+ * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
9
+ *
10
+ * 🟢 You can import this file directly.
11
+ */
12
+
13
+ import * as process from 'node:process'
14
+ import * as path from 'node:path'
15
+ import { fileURLToPath } from 'node:url'
16
+ globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
17
+
18
+ import * as runtime from "@prisma/client/runtime/client"
19
+ import * as $Enums from "./enums.js"
20
+ import * as $Class from "./internal/class.js"
21
+ import * as Prisma from "./internal/prismaNamespace.js"
22
+
23
+ export * as $Enums from './enums.js'
24
+ export * from "./enums.js"
25
+ /**
26
+ * ## Prisma Client
27
+ *
28
+ * Type-safe database client for TypeScript
29
+ * @example
30
+ * ```
31
+ * const prisma = new PrismaClient({
32
+ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
33
+ * })
34
+ * // Fetch zero or more Users
35
+ * const users = await prisma.user.findMany()
36
+ * ```
37
+ *
38
+ * Read more in our [docs](https://pris.ly/d/client).
39
+ */
40
+ export const PrismaClient = $Class.getPrismaClientClass()
41
+ export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
42
+ export { Prisma }
43
+
44
+ /**
45
+ * Model User
46
+ *
47
+ */
48
+ export type User = Prisma.UserModel
49
+ /**
50
+ * Model OAuthAccount
51
+ *
52
+ */
53
+ export type OAuthAccount = Prisma.OAuthAccountModel
54
+ /**
55
+ * Model Session
56
+ *
57
+ */
58
+ export type Session = Prisma.SessionModel
59
+ /**
60
+ * Model ApiKey
61
+ *
62
+ */
63
+ export type ApiKey = Prisma.ApiKeyModel
64
+ /**
65
+ * Model AuditLog
66
+ *
67
+ */
68
+ export type AuditLog = Prisma.AuditLogModel
69
+ /**
70
+ * Model Folder
71
+ *
72
+ */
73
+ export type Folder = Prisma.FolderModel
74
+ /**
75
+ * Model Document
76
+ *
77
+ */
78
+ export type Document = Prisma.DocumentModel
79
+ /**
80
+ * Model Version
81
+ *
82
+ */
83
+ export type Version = Prisma.VersionModel
84
+ /**
85
+ * Model Media
86
+ *
87
+ */
88
+ export type Media = Prisma.MediaModel
89
+ /**
90
+ * Model MediaUsage
91
+ *
92
+ */
93
+ export type MediaUsage = Prisma.MediaUsageModel
94
+ /**
95
+ * Model ContentLock
96
+ *
97
+ */
98
+ export type ContentLock = Prisma.ContentLockModel
99
+ /**
100
+ * Model InAppNotification
101
+ *
102
+ */
103
+ export type InAppNotification = Prisma.InAppNotificationModel
104
+ /**
105
+ * Model ContentTemplate
106
+ *
107
+ */
108
+ export type ContentTemplate = Prisma.ContentTemplateModel
109
+ /**
110
+ * Model Site
111
+ *
112
+ */
113
+ export type Site = Prisma.SiteModel
114
+ /**
115
+ * Model WorkflowState
116
+ *
117
+ */
118
+ export type WorkflowState = Prisma.WorkflowStateModel
119
+ /**
120
+ * Model Redirect
121
+ *
122
+ */
123
+ export type Redirect = Prisma.RedirectModel
124
+ /**
125
+ * Model SeoAuditRun
126
+ * One execution of the SEO audit engine. Holds a snapshot of the site
127
+ * score and issue counts so the Audit tab can show run history without
128
+ * recomputing. Issues belong to a run via SEOIssue.auditRunId.
129
+ */
130
+ export type SeoAuditRun = Prisma.SeoAuditRunModel
131
+ /**
132
+ * Model SeoIssue
133
+ * A single SEO problem detected by an audit run. `issueKey` is a stable
134
+ * hash of (type + entityId/url) used to carry status across runs so a
135
+ * resolved/ignored issue stays resolved/ignored when re-detected.
136
+ */
137
+ export type SeoIssue = Prisma.SeoIssueModel
138
+ /**
139
+ * Model Redirect404Hit
140
+ * A 404 hit observed by the redirect middleware. Aggregated per path so
141
+ * the Redirects tab can surface "broken URLs still getting traffic".
142
+ */
143
+ export type Redirect404Hit = Prisma.Redirect404HitModel
144
+ /**
145
+ * Model AiCrawlerHit
146
+ * Aggregated AI-crawler activity for the admin "AI crawler activity" panel.
147
+ * One row per (bot token, surface), upserted on each hit so the table stays
148
+ * bounded (~known bots × surfaces) and needs no periodic pruning.
149
+ * `surface` ∈ "llms" | "llms-full" | "md" | "honeypot".
150
+ * `category` mirrors the ai-bots taxonomy: "training" | "retrieval" | "other".
151
+ */
152
+ export type AiCrawlerHit = Prisma.AiCrawlerHitModel
153
+ /**
154
+ * Model RedirectSuggestion
155
+ * An AI/heuristic suggestion for a 404 destination. Confidence-scored and
156
+ * never auto-applied below the configured threshold.
157
+ */
158
+ export type RedirectSuggestion = Prisma.RedirectSuggestionModel
159
+ /**
160
+ * Model FormSchemaVersion
161
+ *
162
+ */
163
+ export type FormSchemaVersion = Prisma.FormSchemaVersionModel
164
+ /**
165
+ * Model FormSubmission
166
+ *
167
+ */
168
+ export type FormSubmission = Prisma.FormSubmissionModel
169
+ /**
170
+ * Model FormSubmissionFile
171
+ *
172
+ */
173
+ export type FormSubmissionFile = Prisma.FormSubmissionFileModel
174
+ /**
175
+ * Model FormWebhook
176
+ *
177
+ */
178
+ export type FormWebhook = Prisma.FormWebhookModel
179
+ /**
180
+ * Model BackupRecord
181
+ *
182
+ */
183
+ export type BackupRecord = Prisma.BackupRecordModel
184
+ /**
185
+ * Model WebhookEndpoint
186
+ *
187
+ */
188
+ export type WebhookEndpoint = Prisma.WebhookEndpointModel
189
+ /**
190
+ * Model WebhookDeliveryLog
191
+ *
192
+ */
193
+ export type WebhookDeliveryLog = Prisma.WebhookDeliveryLogModel
194
+ /**
195
+ * Model PasswordResetToken
196
+ *
197
+ */
198
+ export type PasswordResetToken = Prisma.PasswordResetTokenModel
199
+ /**
200
+ * Model Invite
201
+ *
202
+ */
203
+ export type Invite = Prisma.InviteModel
204
+ /**
205
+ * Model ScriptTag
206
+ *
207
+ */
208
+ export type ScriptTag = Prisma.ScriptTagModel
209
+ /**
210
+ * Model PageTemplate
211
+ *
212
+ */
213
+ export type PageTemplate = Prisma.PageTemplateModel
214
+ /**
215
+ * Model SavedSection
216
+ *
217
+ */
218
+ export type SavedSection = Prisma.SavedSectionModel
219
+ /**
220
+ * Model ApiRequestMetric
221
+ * Per-minute pre-aggregated request counters that power the
222
+ * "Delivery API" dashboard tiles (request volume, error rate,
223
+ * average latency, p95). One row per (bucketStart × route × statusBucket).
224
+ *
225
+ * Why pre-aggregated minute buckets and not per-request rows:
226
+ * - 24h of traffic at 10 req/s on 20 routes ≈ 17M raw rows; the
227
+ * equivalent minute-bucketed table is ≤ 28,800 rows (1440 × 20).
228
+ * - Vercel Functions are concurrency-bounded; an O(1) UPSERT per
229
+ * request is cheaper than O(write+query) per dashboard load.
230
+ * - 7-day retention is enforced by the
231
+ * `/api/cms/cron/api-metrics-prune` cron, so the table stays
232
+ * bounded.
233
+ *
234
+ * `latencyHistogram` is a fixed 12-bucket log-scale array (ms):
235
+ * [<1, 1-2, 2-4, 4-8, 8-16, 16-32, 32-64, 64-128, 128-256,
236
+ * 256-512, 512-1024, >1024]
237
+ * Cumulative-sum to estimate p95 with ~10% accuracy without
238
+ * per-request samples. The `delivery-stats` reader merges
239
+ * histograms across buckets before estimating.
240
+ */
241
+ export type ApiRequestMetric = Prisma.ApiRequestMetricModel
242
+ /**
243
+ * Model ContentIssue
244
+ * Persisted content-quality issues surfaced by the nightly
245
+ * content-health scan. The Dashboard's "Content Health" card
246
+ * aggregates these rows by `type` to produce the issue list.
247
+ *
248
+ * Upsert key is `(documentId, type)` so the scanner is
249
+ * idempotent — re-running yields the same row count, and a row
250
+ * "self-resolves" by being absent from the next scan (the
251
+ * scanner uses a `firstScanAt`-watermark + delete pattern).
252
+ */
253
+ export type ContentIssue = Prisma.ContentIssueModel