@happyvertical/smrt-content 0.44.0 → 0.45.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.
- package/agents/content-list.md +93 -14
- package/dist/chunks/{content-corrections-BxfA3tW1.js → content-corrections-B4mPd_th.js} +6 -3
- package/dist/chunks/content-corrections-B4mPd_th.js.map +1 -0
- package/dist/chunks/{content-query-B4cHfrig.js → content-query-BV41W2Dq.js} +6 -6
- package/dist/chunks/{content-query-B4cHfrig.js.map → content-query-BV41W2Dq.js.map} +1 -1
- package/dist/chunks/{content-reviews-BWrYEQc6.js → content-reviews-lBoqJY7Y.js} +6 -3
- package/dist/chunks/content-reviews-lBoqJY7Y.js.map +1 -0
- package/dist/chunks/{content-versions-OEYQVrUf.js → content-versions-dZSBU8UF.js} +6 -3
- package/dist/chunks/content-versions-dZSBU8UF.js.map +1 -0
- package/dist/chunks/{contents-BrGxWH3s.js → contents-Ba7JHu2K.js} +2 -2
- package/dist/chunks/{contents-BrGxWH3s.js.map → contents-Ba7JHu2K.js.map} +1 -1
- package/dist/content-contribution.d.ts +1 -1
- package/dist/content-contribution.d.ts.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2268 -4345
- package/dist/server/content-list-actions.d.ts +10 -3
- package/dist/server/content-list-actions.d.ts.map +1 -1
- package/dist/server/content-list-data-surface.d.ts +29 -0
- package/dist/server/content-list-data-surface.d.ts.map +1 -0
- package/dist/server/content-list-lifecycle.d.ts +20 -0
- package/dist/server/content-list-lifecycle.d.ts.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +247 -25
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +4291 -2510
- package/dist/svelte/components/ContentList.svelte +538 -40
- package/dist/svelte/components/ContentList.svelte.d.ts +6 -1
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentListLifecyclePanel.svelte +387 -0
- package/dist/svelte/components/ContentListLifecyclePanel.svelte.d.ts +17 -0
- package/dist/svelte/components/ContentListLifecyclePanel.svelte.d.ts.map +1 -0
- package/dist/svelte/content-list-controller.d.ts +10 -0
- package/dist/svelte/content-list-controller.d.ts.map +1 -1
- package/dist/svelte/content-list-controller.js +111 -26
- package/dist/svelte/content-list-data-surface.d.ts +45 -0
- package/dist/svelte/content-list-data-surface.d.ts.map +1 -0
- package/dist/svelte/content-list-data-surface.js +196 -0
- package/dist/svelte/content-list-lifecycle.d.ts +132 -0
- package/dist/svelte/content-list-lifecycle.d.ts.map +1 -0
- package/dist/svelte/content-list-lifecycle.js +439 -0
- package/dist/svelte/i18n.contribution.d.ts +27 -0
- package/dist/svelte/i18n.contribution.d.ts.map +1 -1
- package/dist/svelte/i18n.contribution.js +27 -0
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +2 -0
- package/package.json +15 -15
- package/dist/chunks/content-corrections-BxfA3tW1.js.map +0 -1
- package/dist/chunks/content-reviews-BWrYEQc6.js.map +0 -1
- package/dist/chunks/content-versions-OEYQVrUf.js.map +0 -1
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe trash, restore, and permanent-delete orchestration for
|
|
3
|
+
* ContentList (#2454).
|
|
4
|
+
*
|
|
5
|
+
* Lifecycle authority stays on the server. The browser supplies a selection
|
|
6
|
+
* hint and expected count, then renders the server's resolved preview. Apply
|
|
7
|
+
* must reuse that preview's opaque confirmation token and authority-bound
|
|
8
|
+
* selection while using a fresh request id for each transport attempt; a
|
|
9
|
+
* changed query, count, permission, row revision, or eligibility is therefore
|
|
10
|
+
* rejected by the principal-bound server adapter rather than being guessed
|
|
11
|
+
* from stale list rows.
|
|
12
|
+
*/
|
|
13
|
+
export const CONTENT_LIST_LIFECYCLE_ACTION_IDS = [
|
|
14
|
+
'move-to-trash',
|
|
15
|
+
'restore',
|
|
16
|
+
'permanent-delete',
|
|
17
|
+
];
|
|
18
|
+
export class ContentListLifecycleTransportError extends Error {
|
|
19
|
+
status;
|
|
20
|
+
reason;
|
|
21
|
+
constructor(message, status, reason = 'http_error') {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = 'ContentListLifecycleTransportError';
|
|
24
|
+
this.status = status;
|
|
25
|
+
this.reason = reason;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const DEFAULT_IDENTITY = {
|
|
29
|
+
surfaceId: 'content-list',
|
|
30
|
+
kind: 'table',
|
|
31
|
+
};
|
|
32
|
+
const RENEWAL_REASONS = new Set([
|
|
33
|
+
'stale_preview',
|
|
34
|
+
'stale_revision',
|
|
35
|
+
'invalid_or_expired_confirmation',
|
|
36
|
+
'confirmation_mismatch',
|
|
37
|
+
'confirmation_replayed',
|
|
38
|
+
'count_drifted',
|
|
39
|
+
'matching_count_drifted',
|
|
40
|
+
'row_revision_drifted',
|
|
41
|
+
'stale_query_fingerprint',
|
|
42
|
+
]);
|
|
43
|
+
function isRecord(value) {
|
|
44
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
45
|
+
}
|
|
46
|
+
function identityMatches(value, expected) {
|
|
47
|
+
if (!isRecord(value))
|
|
48
|
+
return false;
|
|
49
|
+
const expectedSubject = expected.subject;
|
|
50
|
+
const subject = isRecord(value.subject) ? value.subject : undefined;
|
|
51
|
+
return (value.surfaceId === expected.surfaceId &&
|
|
52
|
+
value.kind === expected.kind &&
|
|
53
|
+
(expectedSubject
|
|
54
|
+
? subject?.type === expectedSubject.type &&
|
|
55
|
+
subject.id === expectedSubject.id
|
|
56
|
+
: value.subject === undefined));
|
|
57
|
+
}
|
|
58
|
+
function joinUrl(base, path) {
|
|
59
|
+
return `${base.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}`;
|
|
60
|
+
}
|
|
61
|
+
function messageOf(error) {
|
|
62
|
+
if (error instanceof Error && error.message.trim())
|
|
63
|
+
return error.message;
|
|
64
|
+
if (typeof error === 'string' && error.trim())
|
|
65
|
+
return error;
|
|
66
|
+
return 'The content lifecycle request failed.';
|
|
67
|
+
}
|
|
68
|
+
function boundedId(prefix) {
|
|
69
|
+
const random = globalThis.crypto?.randomUUID?.();
|
|
70
|
+
if (random)
|
|
71
|
+
return `${prefix}-${random}`;
|
|
72
|
+
return `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
73
|
+
}
|
|
74
|
+
/** Authenticated fetch transport for the host's lifecycle route. */
|
|
75
|
+
export function createContentListLifecycleTransport(options = {}) {
|
|
76
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
77
|
+
if (typeof fetchImpl !== 'function') {
|
|
78
|
+
throw new TypeError('createContentListLifecycleTransport requires a fetch implementation');
|
|
79
|
+
}
|
|
80
|
+
const url = joinUrl(options.apiBaseUrl ?? '/api/v1', options.path ?? 'contents/lifecycle');
|
|
81
|
+
async function invoke(request) {
|
|
82
|
+
let headers;
|
|
83
|
+
try {
|
|
84
|
+
const provided = typeof options.headers === 'function'
|
|
85
|
+
? await options.headers()
|
|
86
|
+
: options.headers;
|
|
87
|
+
headers = new Headers(provided);
|
|
88
|
+
headers.set('content-type', 'application/json');
|
|
89
|
+
if (!headers.has('accept'))
|
|
90
|
+
headers.set('accept', 'application/json');
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
throw new ContentListLifecycleTransportError('The content lifecycle request could not be prepared.', undefined, 'network_failure');
|
|
94
|
+
}
|
|
95
|
+
let response;
|
|
96
|
+
try {
|
|
97
|
+
response = await fetchImpl(url, {
|
|
98
|
+
method: 'POST',
|
|
99
|
+
headers,
|
|
100
|
+
body: JSON.stringify(request),
|
|
101
|
+
...(options.credentials ? { credentials: options.credentials } : {}),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
throw new ContentListLifecycleTransportError('The content lifecycle request failed.', undefined, 'network_failure');
|
|
106
|
+
}
|
|
107
|
+
let payload;
|
|
108
|
+
try {
|
|
109
|
+
const text = await response.text();
|
|
110
|
+
payload = text ? JSON.parse(text) : undefined;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
throw new ContentListLifecycleTransportError('The content lifecycle route returned invalid JSON.', response.status, 'invalid_json');
|
|
114
|
+
}
|
|
115
|
+
if (!response.ok) {
|
|
116
|
+
const error = isRecord(payload) && isRecord(payload.error)
|
|
117
|
+
? payload.error
|
|
118
|
+
: undefined;
|
|
119
|
+
throw new ContentListLifecycleTransportError(typeof error?.message === 'string'
|
|
120
|
+
? error.message
|
|
121
|
+
: `The content lifecycle request failed with HTTP ${response.status}.`, response.status, 'http_error');
|
|
122
|
+
}
|
|
123
|
+
const result = isRecord(payload) && Object.hasOwn(payload, 'result')
|
|
124
|
+
? payload.result
|
|
125
|
+
: payload;
|
|
126
|
+
if (!isRecord(result) ||
|
|
127
|
+
result.version !== 1 ||
|
|
128
|
+
typeof result.ok !== 'boolean' ||
|
|
129
|
+
result.requestId !== request.requestId ||
|
|
130
|
+
result.actionId !== request.actionId ||
|
|
131
|
+
result.phase !== request.phase ||
|
|
132
|
+
!identityMatches(result.identity, request.identity)) {
|
|
133
|
+
throw new ContentListLifecycleTransportError('The content lifecycle route returned an invalid result.', response.status, 'invalid_result');
|
|
134
|
+
}
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
return { preview: invoke, apply: invoke };
|
|
138
|
+
}
|
|
139
|
+
/** Parse the bounded, optional preview/apply details without trusting casts. */
|
|
140
|
+
export function readContentListLifecycleSummary(result) {
|
|
141
|
+
const details = isRecord(result.details) ? result.details : {};
|
|
142
|
+
const outcomes = Array.isArray(details.outcomes)
|
|
143
|
+
? details.outcomes.flatMap((entry) => {
|
|
144
|
+
if (!isRecord(entry))
|
|
145
|
+
return [];
|
|
146
|
+
if ((typeof entry.rowId !== 'string' &&
|
|
147
|
+
typeof entry.rowId !== 'number') ||
|
|
148
|
+
!['accepted', 'skipped', 'failed'].includes(String(entry.status)))
|
|
149
|
+
return [];
|
|
150
|
+
return [
|
|
151
|
+
{
|
|
152
|
+
rowId: entry.rowId,
|
|
153
|
+
status: entry.status,
|
|
154
|
+
...(typeof entry.reason === 'string'
|
|
155
|
+
? { reason: entry.reason }
|
|
156
|
+
: {}),
|
|
157
|
+
...(typeof entry.resourceType === 'string'
|
|
158
|
+
? { resourceType: entry.resourceType }
|
|
159
|
+
: {}),
|
|
160
|
+
...(typeof entry.resourceId === 'string'
|
|
161
|
+
? { resourceId: entry.resourceId }
|
|
162
|
+
: {}),
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
})
|
|
166
|
+
: [];
|
|
167
|
+
const number = (value) => Number.isSafeInteger(value) && Number(value) >= 0 ? Number(value) : 0;
|
|
168
|
+
const representativeLabels = Array.isArray(details.representativeLabels)
|
|
169
|
+
? details.representativeLabels.filter((label) => typeof label === 'string')
|
|
170
|
+
: [];
|
|
171
|
+
return {
|
|
172
|
+
resolvedCount: number(details.count),
|
|
173
|
+
accepted: number(details.accepted),
|
|
174
|
+
skipped: number(details.skipped),
|
|
175
|
+
failed: number(details.failed),
|
|
176
|
+
outcomes,
|
|
177
|
+
representativeLabels,
|
|
178
|
+
...(typeof details.expiresAt === 'number' &&
|
|
179
|
+
Number.isFinite(details.expiresAt)
|
|
180
|
+
? { expiresAt: details.expiresAt }
|
|
181
|
+
: {}),
|
|
182
|
+
auditReference: typeof details.auditReference === 'string'
|
|
183
|
+
? details.auditReference
|
|
184
|
+
: result.requestId,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function cloneSelection(selection) {
|
|
188
|
+
return selection.scope === 'explicit-ids'
|
|
189
|
+
? { scope: 'explicit-ids', rowIds: [...selection.rowIds] }
|
|
190
|
+
: { ...selection };
|
|
191
|
+
}
|
|
192
|
+
function requestPayload(input) {
|
|
193
|
+
return input.actionId === 'restore'
|
|
194
|
+
? { status: input.restoreStatus ?? 'draft' }
|
|
195
|
+
: undefined;
|
|
196
|
+
}
|
|
197
|
+
/** Framework-free state machine shared by UI and agent-driven lifecycle flows. */
|
|
198
|
+
export function createContentListLifecycleController(options) {
|
|
199
|
+
const listeners = new Set();
|
|
200
|
+
const identity = options.identity ?? DEFAULT_IDENTITY;
|
|
201
|
+
const createRequestId = options.createRequestId ?? (() => boundedId('lifecycle'));
|
|
202
|
+
const createIdempotencyKey = options.createIdempotencyKey ?? (() => boundedId('lifecycle-apply'));
|
|
203
|
+
let state = {
|
|
204
|
+
status: 'idle',
|
|
205
|
+
renewalRequired: false,
|
|
206
|
+
};
|
|
207
|
+
let generation = 0;
|
|
208
|
+
let previewViewKey;
|
|
209
|
+
let frozen;
|
|
210
|
+
let pendingApply;
|
|
211
|
+
const publish = (next) => {
|
|
212
|
+
state = next;
|
|
213
|
+
for (const listener of listeners)
|
|
214
|
+
listener({ ...state });
|
|
215
|
+
};
|
|
216
|
+
const reset = () => {
|
|
217
|
+
if (pendingApply)
|
|
218
|
+
return;
|
|
219
|
+
generation += 1;
|
|
220
|
+
previewViewKey = undefined;
|
|
221
|
+
frozen = undefined;
|
|
222
|
+
pendingApply = undefined;
|
|
223
|
+
publish({ status: 'idle', renewalRequired: false });
|
|
224
|
+
};
|
|
225
|
+
const preview = async (input) => {
|
|
226
|
+
if (pendingApply)
|
|
227
|
+
return state;
|
|
228
|
+
const currentGeneration = ++generation;
|
|
229
|
+
previewViewKey = input.viewKey;
|
|
230
|
+
frozen = undefined;
|
|
231
|
+
const selection = cloneSelection(input.selection);
|
|
232
|
+
if (input.expectedCount < 0 ||
|
|
233
|
+
!Number.isSafeInteger(input.expectedCount) ||
|
|
234
|
+
input.expectedCount > (options.maxSelectionSize ?? 200) ||
|
|
235
|
+
(selection.scope === 'all-matching' && !input.query) ||
|
|
236
|
+
(selection.scope === 'explicit-ids' && selection.rowIds.length === 0)) {
|
|
237
|
+
const failed = {
|
|
238
|
+
status: 'failed',
|
|
239
|
+
actionId: input.actionId,
|
|
240
|
+
selection,
|
|
241
|
+
error: 'The lifecycle selection is invalid.',
|
|
242
|
+
renewalRequired: true,
|
|
243
|
+
};
|
|
244
|
+
publish(failed);
|
|
245
|
+
return failed;
|
|
246
|
+
}
|
|
247
|
+
const payload = requestPayload(input);
|
|
248
|
+
const request = {
|
|
249
|
+
version: 1,
|
|
250
|
+
requestId: createRequestId(),
|
|
251
|
+
identity,
|
|
252
|
+
actionId: input.actionId,
|
|
253
|
+
phase: 'preview',
|
|
254
|
+
selection,
|
|
255
|
+
expectedRevision: options.revision ?? 0,
|
|
256
|
+
target: {
|
|
257
|
+
expectedCount: input.expectedCount,
|
|
258
|
+
...(input.query ? { query: input.query } : {}),
|
|
259
|
+
},
|
|
260
|
+
...(payload === undefined ? {} : { payload }),
|
|
261
|
+
};
|
|
262
|
+
publish({
|
|
263
|
+
status: 'previewing',
|
|
264
|
+
actionId: input.actionId,
|
|
265
|
+
selection,
|
|
266
|
+
renewalRequired: false,
|
|
267
|
+
});
|
|
268
|
+
try {
|
|
269
|
+
const result = await options.client.preview(request);
|
|
270
|
+
if (currentGeneration !== generation)
|
|
271
|
+
return state;
|
|
272
|
+
previewViewKey = undefined;
|
|
273
|
+
const summary = readContentListLifecycleSummary(result);
|
|
274
|
+
if (!result.ok || !result.confirmationToken) {
|
|
275
|
+
const reason = result.reason ?? 'preview_failed';
|
|
276
|
+
publish({
|
|
277
|
+
status: 'failed',
|
|
278
|
+
actionId: input.actionId,
|
|
279
|
+
selection,
|
|
280
|
+
result,
|
|
281
|
+
summary,
|
|
282
|
+
error: reason,
|
|
283
|
+
renewalRequired: RENEWAL_REASONS.has(reason),
|
|
284
|
+
});
|
|
285
|
+
return state;
|
|
286
|
+
}
|
|
287
|
+
frozen = { request, viewKey: input.viewKey, result };
|
|
288
|
+
publish({
|
|
289
|
+
status: 'ready',
|
|
290
|
+
actionId: input.actionId,
|
|
291
|
+
selection,
|
|
292
|
+
result,
|
|
293
|
+
summary,
|
|
294
|
+
renewalRequired: false,
|
|
295
|
+
});
|
|
296
|
+
return state;
|
|
297
|
+
}
|
|
298
|
+
catch (error) {
|
|
299
|
+
if (currentGeneration !== generation)
|
|
300
|
+
return state;
|
|
301
|
+
previewViewKey = undefined;
|
|
302
|
+
publish({
|
|
303
|
+
status: 'failed',
|
|
304
|
+
actionId: input.actionId,
|
|
305
|
+
selection,
|
|
306
|
+
error: messageOf(error),
|
|
307
|
+
renewalRequired: true,
|
|
308
|
+
});
|
|
309
|
+
return state;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const apply = async (confirmedCount) => {
|
|
313
|
+
const previewed = frozen;
|
|
314
|
+
const summary = state.summary;
|
|
315
|
+
const expired = summary?.expiresAt !== undefined && summary.expiresAt <= Date.now();
|
|
316
|
+
const retry = state.status === 'failed' ? pendingApply : undefined;
|
|
317
|
+
if ((state.status !== 'ready' && !retry) ||
|
|
318
|
+
!previewed ||
|
|
319
|
+
!summary ||
|
|
320
|
+
confirmedCount !== summary.resolvedCount ||
|
|
321
|
+
(retry !== undefined && retry.confirmedCount !== confirmedCount) ||
|
|
322
|
+
expired) {
|
|
323
|
+
frozen = undefined;
|
|
324
|
+
publish({
|
|
325
|
+
...state,
|
|
326
|
+
status: 'failed',
|
|
327
|
+
error: expired
|
|
328
|
+
? 'The lifecycle preview expired and must be renewed.'
|
|
329
|
+
: 'The confirmed count no longer matches the lifecycle preview.',
|
|
330
|
+
renewalRequired: true,
|
|
331
|
+
});
|
|
332
|
+
return state;
|
|
333
|
+
}
|
|
334
|
+
const currentGeneration = ++generation;
|
|
335
|
+
const request = retry
|
|
336
|
+
? { ...retry.request, requestId: createRequestId() }
|
|
337
|
+
: {
|
|
338
|
+
...previewed.request,
|
|
339
|
+
requestId: createRequestId(),
|
|
340
|
+
phase: 'apply',
|
|
341
|
+
target: {
|
|
342
|
+
...previewed.request.target,
|
|
343
|
+
...(previewed.request.actionId === 'permanent-delete'
|
|
344
|
+
? { confirmedCount }
|
|
345
|
+
: {}),
|
|
346
|
+
},
|
|
347
|
+
confirmationToken: previewed.result.confirmationToken,
|
|
348
|
+
idempotencyKey: createIdempotencyKey(),
|
|
349
|
+
};
|
|
350
|
+
pendingApply = { request, confirmedCount };
|
|
351
|
+
publish({ ...state, status: 'applying', error: undefined });
|
|
352
|
+
try {
|
|
353
|
+
const result = await options.client.apply(request);
|
|
354
|
+
if (currentGeneration !== generation)
|
|
355
|
+
return state;
|
|
356
|
+
const nextSummary = readContentListLifecycleSummary(result);
|
|
357
|
+
if (!result.ok) {
|
|
358
|
+
const reason = result.reason ?? 'apply_failed';
|
|
359
|
+
if (reason === 'idempotency_in_progress') {
|
|
360
|
+
publish({
|
|
361
|
+
...state,
|
|
362
|
+
status: 'failed',
|
|
363
|
+
result,
|
|
364
|
+
error: reason,
|
|
365
|
+
renewalRequired: false,
|
|
366
|
+
replayRequired: true,
|
|
367
|
+
});
|
|
368
|
+
return state;
|
|
369
|
+
}
|
|
370
|
+
frozen = undefined;
|
|
371
|
+
pendingApply = undefined;
|
|
372
|
+
publish({
|
|
373
|
+
...state,
|
|
374
|
+
status: 'failed',
|
|
375
|
+
result,
|
|
376
|
+
summary: nextSummary,
|
|
377
|
+
error: reason,
|
|
378
|
+
renewalRequired: RENEWAL_REASONS.has(reason),
|
|
379
|
+
replayRequired: false,
|
|
380
|
+
});
|
|
381
|
+
return state;
|
|
382
|
+
}
|
|
383
|
+
frozen = undefined;
|
|
384
|
+
pendingApply = undefined;
|
|
385
|
+
publish({
|
|
386
|
+
...state,
|
|
387
|
+
status: 'succeeded',
|
|
388
|
+
result,
|
|
389
|
+
summary: nextSummary,
|
|
390
|
+
renewalRequired: false,
|
|
391
|
+
replayRequired: false,
|
|
392
|
+
});
|
|
393
|
+
return state;
|
|
394
|
+
}
|
|
395
|
+
catch (error) {
|
|
396
|
+
if (currentGeneration !== generation)
|
|
397
|
+
return state;
|
|
398
|
+
publish({
|
|
399
|
+
...state,
|
|
400
|
+
status: 'failed',
|
|
401
|
+
error: messageOf(error),
|
|
402
|
+
// The server may have committed before the response was lost. Retain
|
|
403
|
+
// the exact authority/idempotency envelope so retry can replay safely
|
|
404
|
+
// with a fresh transport correlation id.
|
|
405
|
+
renewalRequired: false,
|
|
406
|
+
replayRequired: true,
|
|
407
|
+
});
|
|
408
|
+
return state;
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
return {
|
|
412
|
+
snapshot: () => ({ ...state }),
|
|
413
|
+
subscribe(listener) {
|
|
414
|
+
listeners.add(listener);
|
|
415
|
+
listener({ ...state });
|
|
416
|
+
return () => listeners.delete(listener);
|
|
417
|
+
},
|
|
418
|
+
preview,
|
|
419
|
+
apply,
|
|
420
|
+
invalidate(viewKey) {
|
|
421
|
+
// Once apply starts, the server-authorized mutation owns completion.
|
|
422
|
+
// A changing view must not discard its refresh, audit, or reconciliation.
|
|
423
|
+
if (state.status === 'applying' || pendingApply)
|
|
424
|
+
return;
|
|
425
|
+
if ((previewViewKey !== undefined && previewViewKey !== viewKey) ||
|
|
426
|
+
(frozen !== undefined && frozen.viewKey !== viewKey)) {
|
|
427
|
+
reset();
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
reset,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
/** Keep unsuccessful rows selected so partial failures are visible/retryable. */
|
|
434
|
+
export function reconcileContentListLifecycleSelection(selectedRowIds, result) {
|
|
435
|
+
const accepted = new Set(readContentListLifecycleSummary(result)
|
|
436
|
+
.outcomes.filter((outcome) => outcome.status === 'accepted')
|
|
437
|
+
.map((outcome) => String(outcome.rowId)));
|
|
438
|
+
return selectedRowIds.filter((rowId) => !accepted.has(String(rowId)));
|
|
439
|
+
}
|
|
@@ -202,6 +202,33 @@ export declare const M: {
|
|
|
202
202
|
readonly 'content.content_list.compact_list': "content.content_list.compact_list";
|
|
203
203
|
readonly 'content.content_list.add_content': "content.content_list.add_content";
|
|
204
204
|
readonly 'content.content_list.empty': "content.content_list.empty";
|
|
205
|
+
readonly 'content.content_list.trash_empty': "content.content_list.trash_empty";
|
|
206
|
+
readonly 'content.content_list.lifecycle_actions': "content.content_list.lifecycle_actions";
|
|
207
|
+
readonly 'content.content_list.trash_actions': "content.content_list.trash_actions";
|
|
208
|
+
readonly 'content.content_list.move_selected_to_trash': "content.content_list.move_selected_to_trash";
|
|
209
|
+
readonly 'content.content_list.restore_destination': "content.content_list.restore_destination";
|
|
210
|
+
readonly 'content.content_list.restore_as_draft': "content.content_list.restore_as_draft";
|
|
211
|
+
readonly 'content.content_list.restore_for_review': "content.content_list.restore_for_review";
|
|
212
|
+
readonly 'content.content_list.restore_and_publish': "content.content_list.restore_and_publish";
|
|
213
|
+
readonly 'content.content_list.restore_selected': "content.content_list.restore_selected";
|
|
214
|
+
readonly 'content.content_list.delete_selected_permanently': "content.content_list.delete_selected_permanently";
|
|
215
|
+
readonly 'content.content_list.empty_trash': "content.content_list.empty_trash";
|
|
216
|
+
readonly 'content.content_list.empty_trash_limit': "content.content_list.empty_trash_limit";
|
|
217
|
+
readonly 'content.content_list.permanent_delete_title': "content.content_list.permanent_delete_title";
|
|
218
|
+
readonly 'content.content_list.restore_title': "content.content_list.restore_title";
|
|
219
|
+
readonly 'content.content_list.move_to_trash_title': "content.content_list.move_to_trash_title";
|
|
220
|
+
readonly 'content.content_list.lifecycle_resolving': "content.content_list.lifecycle_resolving";
|
|
221
|
+
readonly 'content.content_list.lifecycle_resolved': "content.content_list.lifecycle_resolved";
|
|
222
|
+
readonly 'content.content_list.lifecycle_examples': "content.content_list.lifecycle_examples";
|
|
223
|
+
readonly 'content.content_list.lifecycle_eligibility': "content.content_list.lifecycle_eligibility";
|
|
224
|
+
readonly 'content.content_list.permanent_delete_warning': "content.content_list.permanent_delete_warning";
|
|
225
|
+
readonly 'content.content_list.permanent_delete_count_label': "content.content_list.permanent_delete_count_label";
|
|
226
|
+
readonly 'content.content_list.lifecycle_completed_audit': "content.content_list.lifecycle_completed_audit";
|
|
227
|
+
readonly 'content.content_list.lifecycle_completed_summary': "content.content_list.lifecycle_completed_summary";
|
|
228
|
+
readonly 'content.content_list.lifecycle_exceptions': "content.content_list.lifecycle_exceptions";
|
|
229
|
+
readonly 'content.content_list.lifecycle_close': "content.content_list.lifecycle_close";
|
|
230
|
+
readonly 'content.content_list.lifecycle_renew_preview': "content.content_list.lifecycle_renew_preview";
|
|
231
|
+
readonly 'content.content_list.lifecycle_confirm_count': "content.content_list.lifecycle_confirm_count";
|
|
205
232
|
readonly 'content.content_list.view_published_article': "content.content_list.view_published_article";
|
|
206
233
|
readonly 'content.content_list.edit': "content.content_list.edit";
|
|
207
234
|
readonly 'content.content_list.delete': "content.content_list.delete";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.contribution.d.ts","sourceRoot":"","sources":["../../src/svelte/i18n.contribution.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"i18n.contribution.d.ts","sourceRoot":"","sources":["../../src/svelte/i18n.contribution.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgXZ,CAAC"}
|
|
@@ -210,6 +210,33 @@ export const M = defineMessages({
|
|
|
210
210
|
'content.content_list.compact_list': 'Compact List',
|
|
211
211
|
'content.content_list.add_content': 'Add Content',
|
|
212
212
|
'content.content_list.empty': 'No contents match your filters.',
|
|
213
|
+
'content.content_list.trash_empty': 'Trash is empty.',
|
|
214
|
+
'content.content_list.lifecycle_actions': 'Content lifecycle actions',
|
|
215
|
+
'content.content_list.trash_actions': 'Trash actions',
|
|
216
|
+
'content.content_list.move_selected_to_trash': 'Move selected to trash',
|
|
217
|
+
'content.content_list.restore_destination': 'Restore destination',
|
|
218
|
+
'content.content_list.restore_as_draft': 'Restore as draft',
|
|
219
|
+
'content.content_list.restore_for_review': 'Restore for review',
|
|
220
|
+
'content.content_list.restore_and_publish': 'Restore and publish',
|
|
221
|
+
'content.content_list.restore_selected': 'Restore selected',
|
|
222
|
+
'content.content_list.delete_selected_permanently': 'Delete selected permanently',
|
|
223
|
+
'content.content_list.empty_trash': 'Empty trash',
|
|
224
|
+
'content.content_list.empty_trash_limit': 'Empty trash is limited to {count} items. Narrow the current trash query before previewing permanent deletion.',
|
|
225
|
+
'content.content_list.permanent_delete_title': 'Permanently delete content?',
|
|
226
|
+
'content.content_list.restore_title': 'Restore content?',
|
|
227
|
+
'content.content_list.move_to_trash_title': 'Move content to trash?',
|
|
228
|
+
'content.content_list.lifecycle_resolving': 'Resolving the current selection on the server…',
|
|
229
|
+
'content.content_list.lifecycle_resolved': 'The server resolved {count} content items.',
|
|
230
|
+
'content.content_list.lifecycle_examples': 'Examples: {examples}',
|
|
231
|
+
'content.content_list.lifecycle_eligibility': 'Eligible: {accepted}; skipped: {skipped}; failed: {failed}.',
|
|
232
|
+
'content.content_list.permanent_delete_warning': 'This cannot be undone. Type {count} to confirm the exact scope.',
|
|
233
|
+
'content.content_list.permanent_delete_count_label': 'Type the resolved item count to confirm permanent deletion',
|
|
234
|
+
'content.content_list.lifecycle_completed_audit': 'Completed. Audit reference: {reference}',
|
|
235
|
+
'content.content_list.lifecycle_completed_summary': 'Completed: {accepted} accepted, {skipped} skipped, {failed} failed. Audit reference: {reference}',
|
|
236
|
+
'content.content_list.lifecycle_exceptions': 'Lifecycle exceptions',
|
|
237
|
+
'content.content_list.lifecycle_close': 'Close',
|
|
238
|
+
'content.content_list.lifecycle_renew_preview': 'Renew preview',
|
|
239
|
+
'content.content_list.lifecycle_confirm_count': 'Confirm {count}',
|
|
213
240
|
'content.content_list.view_published_article': 'View published article',
|
|
214
241
|
'content.content_list.edit': 'Edit',
|
|
215
242
|
'content.content_list.delete': 'Delete',
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export type ContentTitleFieldProps = ComponentProps<typeof ContentTitleField>;
|
|
|
68
68
|
export type ContentListProps = ComponentProps<typeof ContentList>;
|
|
69
69
|
export type { ContentListUrlStateBinding } from './components/ContentList.svelte';
|
|
70
70
|
export { applyContentListFilter, buildContentListColumns, buildContentListSurfaceDescriptor, CONTENT_LIST_ACTIONS_COLUMN_ID, CONTENT_LIST_COLUMN_IDS, CONTENT_LIST_HIDDEN_COLUMN_IDS, CONTENT_LIST_ROW_KEY, CONTENT_LIST_SCHEMA_VERSION, CONTENT_LIST_SELECTION_COLUMN_ID, CONTENT_LIST_STATUS_FILTER_ID, CONTENT_LIST_STATUS_OPTIONS, CONTENT_LIST_SURFACE_ID, CONTENT_LIST_TABLE_COLUMN_IDS, CONTENT_LIST_TOKEN_COLUMN_IDS, CONTENT_LIST_TYPE_FILTER_ID, CONTENT_LIST_TYPE_OPTIONS, CONTENT_LIST_UNREPRESENTABLE_OPTION, CONTENT_LIST_VISIBLE_COLUMN_IDS, type ContentListActionId, type ContentListActionOptions, type ContentListColumnId, type ContentListColumnLabels, type ContentListControllerOptions, type ContentListDataSurface, type ContentListRow, type ContentListSelectFilterState, type ContentListSurfaceDescriptorOptions, type ContentListViewMode, contentListFilters, contentListRowActions, contentStateVariant, contentStatusVariant, contentTypeLabel, createContentListController, formatContentListDate, isContentListFilterExactly, normalizeContentListTypeLock, normalizeContentToken, normalizeContentType, paginateContentListRows, readContentListFilter, readContentListSelectFilter, resolveContentHref, resolveSelectedContentListRows, resolveSelectedContents, selectableContentListRowIds, selectContentListRows, toContentListRows, } from './content-list-controller.js';
|
|
71
|
+
export { type ContentListSurfaceContext, type ContentListSurfaceFreshness, type ContentListSurfaceHandle, type ContentListSurfaceRegistrationOptions, registerContentListDataSurface, } from './content-list-data-surface.js';
|
|
72
|
+
export { CONTENT_LIST_LIFECYCLE_ACTION_IDS, type ContentListLifecycleActionId, type ContentListLifecycleBinding, type ContentListLifecycleClient, type ContentListLifecycleController, type ContentListLifecyclePreviewInput, type ContentListLifecycleRequest, type ContentListLifecycleSnapshot, type ContentListLifecycleSummary, type ContentListLifecycleTarget, ContentListLifecycleTransportError, type ContentListRestoreStatus, createContentListLifecycleController, createContentListLifecycleTransport, readContentListLifecycleSummary, reconcileContentListLifecycleSelection, } from './content-list-lifecycle.js';
|
|
71
73
|
export { CONTENT_LIST_QUERY_DEFAULT_PAGE_SIZE, CONTENT_LIST_QUERY_DEFAULT_SORT, CONTENT_LIST_QUERY_FIELDS, CONTENT_LIST_QUERY_IDENTITY_FIELD, CONTENT_LIST_QUERY_MAX_FIELD_ID_LENGTH, CONTENT_LIST_QUERY_MAX_FILTER_NODES, CONTENT_LIST_QUERY_MAX_IN_VALUES, CONTENT_LIST_QUERY_MAX_OFFSET, CONTENT_LIST_QUERY_MAX_OR_BRANCHES, CONTENT_LIST_QUERY_MAX_PROJECTION_FIELDS, CONTENT_LIST_QUERY_MAX_REQUEST_BYTES, CONTENT_LIST_QUERY_MAX_REQUEST_ID_LENGTH, CONTENT_LIST_QUERY_MAX_VALUE_LENGTH, CONTENT_LIST_QUERY_PROJECTABLE_FIELDS, CONTENT_LIST_QUERY_PROJECTION, CONTENT_LIST_QUERY_SEARCH_FIELDS, type ContentListDataQueryRequest, type ContentListDataQueryResult, type ContentListQueryBinding, type ContentListQueryDrop, type ContentListQueryDropReason, ContentListQueryError, type ContentListQueryField, type ContentListQueryFieldType, type ContentListQueryFilter, type ContentListQueryFilterOperator, type ContentListQueryNotices, type ContentListQueryRequestOptions, type ContentListQueryScalar, type ContentListQuerySource, type ContentListQueryTotal, type ContentListQueryTranslation, type ContentListQueryTransport, type ContentListQueryTransportOptions, contentFromContentListQueryRow, contentListQueryErrorMessage, contentListQueryExactTotal, contentListQueryRequestKey, contentListQueryRowsToContents, contentListQueryTotalValue, contentListViewStateToDataQueryRequest, createContentListQueryTransport, escapeContentListQueryLikeValue, readContentListQueryNotices, resolveContentListMaxPageSize, } from './content-list-query.js';
|
|
72
74
|
export { type ContentListJob, type ContentListJobBinding, type ContentListJobController, type ContentListJobControllerOptions, type ContentListJobSnapshot, type ContentListJobStatus, type ContentListJobSubmission, type ContentListJobTarget, contentListJobAffectsQuery, createContentListJobController, } from './content-list-runtime.js';
|
|
73
75
|
export { CONTENT_LIST_SAVED_VIEW_SCHEMA_VERSION, CONTENT_LIST_SAVED_VIEW_STORAGE_PREFIX, type ContentListLocalSavedViewStore, type ContentListSavedView, type ContentListSavedViewInput, type ContentListSavedViewRestoration, type ContentListSavedViewStorage, type ContentListSavedViewStore, type ContentListSavedViewStoreOptions, createContentListMemorySavedViewStore, createContentListSavedViewStore, type RawContentListViewSnapshot, restoreContentListSavedView, toContentListSavedViewInput, } from './content-list-saved-views.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svelte/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAI7C,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,qBAAqB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,uBAAuB,MAAM,6CAA6C,CAAC;AAClF,OAAO,wBAAwB,MAAM,8CAA8C,CAAC;AACpF,OAAO,yBAAyB,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,MAAM,oDAAoD,CAAC;AAChG,OAAO,yBAAyB,MAAM,+CAA+C,CAAC;AACtF,OAAO,sBAAsB,MAAM,4CAA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A2B,CAAC;AACnC,YAAY,EACV,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,cAAc,EACd,eAAe,EACf,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,OAAO,EACP,gBAAgB,IAAI,sBAAsB,EAC1C,gBAAgB,IAAI,sBAAsB,EAC1C,aAAa,IAAI,mBAAmB,GACrC,MAAM,YAAY,CAAC"}
|
package/dist/svelte/index.js
CHANGED
|
@@ -52,6 +52,8 @@ export { ArticleCard, ArticleList, buildPublishedArticlePath, CONTENT_DEFAULT_RO
|
|
|
52
52
|
// Shared content-list adapter: columns, rows, filters, and the data surface
|
|
53
53
|
// descriptor every ContentList presentation is built from.
|
|
54
54
|
export { applyContentListFilter, buildContentListColumns, buildContentListSurfaceDescriptor, CONTENT_LIST_ACTIONS_COLUMN_ID, CONTENT_LIST_COLUMN_IDS, CONTENT_LIST_HIDDEN_COLUMN_IDS, CONTENT_LIST_ROW_KEY, CONTENT_LIST_SCHEMA_VERSION, CONTENT_LIST_SELECTION_COLUMN_ID, CONTENT_LIST_STATUS_FILTER_ID, CONTENT_LIST_STATUS_OPTIONS, CONTENT_LIST_SURFACE_ID, CONTENT_LIST_TABLE_COLUMN_IDS, CONTENT_LIST_TOKEN_COLUMN_IDS, CONTENT_LIST_TYPE_FILTER_ID, CONTENT_LIST_TYPE_OPTIONS, CONTENT_LIST_UNREPRESENTABLE_OPTION, CONTENT_LIST_VISIBLE_COLUMN_IDS, contentListFilters, contentListRowActions, contentStateVariant, contentStatusVariant, contentTypeLabel, createContentListController, formatContentListDate, isContentListFilterExactly, normalizeContentListTypeLock, normalizeContentToken, normalizeContentType, paginateContentListRows, readContentListFilter, readContentListSelectFilter, resolveContentHref, resolveSelectedContentListRows, resolveSelectedContents, selectableContentListRowIds, selectContentListRows, toContentListRows, } from './content-list-controller.js';
|
|
55
|
+
export { registerContentListDataSurface, } from './content-list-data-surface.js';
|
|
56
|
+
export { CONTENT_LIST_LIFECYCLE_ACTION_IDS, ContentListLifecycleTransportError, createContentListLifecycleController, createContentListLifecycleTransport, readContentListLifecycleSummary, reconcileContentListLifecycleSelection, } from './content-list-lifecycle.js';
|
|
55
57
|
// Server-backed ContentList queries (#2452): view state → DataQueryRequest,
|
|
56
58
|
// the `POST /api/v1/contents/query` transport, and the binding seam.
|
|
57
59
|
export { CONTENT_LIST_QUERY_DEFAULT_PAGE_SIZE, CONTENT_LIST_QUERY_DEFAULT_SORT, CONTENT_LIST_QUERY_FIELDS, CONTENT_LIST_QUERY_IDENTITY_FIELD, CONTENT_LIST_QUERY_MAX_FIELD_ID_LENGTH, CONTENT_LIST_QUERY_MAX_FILTER_NODES, CONTENT_LIST_QUERY_MAX_IN_VALUES, CONTENT_LIST_QUERY_MAX_OFFSET, CONTENT_LIST_QUERY_MAX_OR_BRANCHES, CONTENT_LIST_QUERY_MAX_PROJECTION_FIELDS, CONTENT_LIST_QUERY_MAX_REQUEST_BYTES, CONTENT_LIST_QUERY_MAX_REQUEST_ID_LENGTH, CONTENT_LIST_QUERY_MAX_VALUE_LENGTH, CONTENT_LIST_QUERY_PROJECTABLE_FIELDS, CONTENT_LIST_QUERY_PROJECTION, CONTENT_LIST_QUERY_SEARCH_FIELDS, ContentListQueryError, contentFromContentListQueryRow, contentListQueryErrorMessage, contentListQueryExactTotal, contentListQueryRequestKey, contentListQueryRowsToContents, contentListQueryTotalValue, contentListViewStateToDataQueryRequest, createContentListQueryTransport, escapeContentListQueryLikeValue, readContentListQueryNotices, resolveContentListMaxPageSize, } from './content-list-query.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Content processing module for SMRT framework - handles documents, web content, and media",
|
|
6
6
|
"type": "module",
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
"@happyvertical/utils": "^0.89.4",
|
|
61
61
|
"fast-xml-parser": "^5.10.1",
|
|
62
62
|
"yaml": "^2.9.0",
|
|
63
|
-
"@happyvertical/smrt-assets": "0.
|
|
64
|
-
"@happyvertical/smrt-agents": "0.
|
|
65
|
-
"@happyvertical/smrt-
|
|
66
|
-
"@happyvertical/smrt-
|
|
67
|
-
"@happyvertical/smrt-
|
|
68
|
-
"@happyvertical/smrt-
|
|
69
|
-
"@happyvertical/smrt-
|
|
70
|
-
"@happyvertical/smrt-
|
|
71
|
-
"@happyvertical/smrt-
|
|
72
|
-
"@happyvertical/smrt-
|
|
73
|
-
"@happyvertical/smrt-
|
|
74
|
-
"@happyvertical/smrt-ui": "0.
|
|
63
|
+
"@happyvertical/smrt-assets": "0.45.0",
|
|
64
|
+
"@happyvertical/smrt-agents": "0.45.0",
|
|
65
|
+
"@happyvertical/smrt-chat": "0.45.0",
|
|
66
|
+
"@happyvertical/smrt-core": "0.45.0",
|
|
67
|
+
"@happyvertical/smrt-facts": "0.45.0",
|
|
68
|
+
"@happyvertical/smrt-messages": "0.45.0",
|
|
69
|
+
"@happyvertical/smrt-images": "0.45.0",
|
|
70
|
+
"@happyvertical/smrt-profiles": "0.45.0",
|
|
71
|
+
"@happyvertical/smrt-prompts": "0.45.0",
|
|
72
|
+
"@happyvertical/smrt-tenancy": "0.45.0",
|
|
73
|
+
"@happyvertical/smrt-types": "0.45.0",
|
|
74
|
+
"@happyvertical/smrt-ui": "0.45.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"svelte": "^5.56.4"
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"typescript": "5.9.3",
|
|
93
93
|
"vite": "8.1.4",
|
|
94
94
|
"vitest": "4.1.10",
|
|
95
|
-
"@happyvertical/smrt-playground": "0.
|
|
96
|
-
"@happyvertical/smrt-vitest": "0.
|
|
95
|
+
"@happyvertical/smrt-playground": "0.45.0",
|
|
96
|
+
"@happyvertical/smrt-vitest": "0.45.0"
|
|
97
97
|
},
|
|
98
98
|
"keywords": [
|
|
99
99
|
"ai",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-corrections-BxfA3tW1.js","names":[],"sources":["../../src/content-correction.ts","../../src/content-corrections.ts"],"sourcesContent":["import type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type {\n ContentCorrectionStatus,\n ContentCorrectionType,\n} from './content-governance';\n\nexport interface ContentCorrectionOptions extends SmrtObjectOptions {\n contentId?: string;\n contentVersionId?: string;\n factId?: string;\n replacementFactId?: string;\n correctionType?: ContentCorrectionType;\n status?: ContentCorrectionStatus;\n summary?: string;\n incorrectText?: string;\n correctedText?: string;\n publicNote?: string;\n metadata?: string | Record<string, unknown>;\n tenantId?: string | null;\n publishedAt?: Date | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: 'content_corrections',\n api: { include: ['list', 'get', 'create', 'update'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: true,\n})\nexport class ContentCorrection extends SmrtObject {\n @foreignKey('Content', { required: true })\n contentId = '';\n\n @foreignKey('ContentVersion')\n contentVersionId = '';\n\n @crossPackageRef('@happyvertical/smrt-facts:Fact')\n factId = '';\n\n @crossPackageRef('@happyvertical/smrt-facts:Fact')\n replacementFactId = '';\n correctionType: ContentCorrectionType = 'fact';\n status: ContentCorrectionStatus = 'draft';\n summary = '';\n incorrectText = '';\n correctedText = '';\n publicNote = '';\n metadata = '';\n\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n publishedAt: Date | null = null;\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: ContentCorrectionOptions = {}) {\n super(options);\n if (options.contentId) this.contentId = options.contentId;\n if (options.contentVersionId !== undefined)\n this.contentVersionId = options.contentVersionId;\n if (options.factId !== undefined) this.factId = options.factId;\n if (options.replacementFactId !== undefined)\n this.replacementFactId = options.replacementFactId;\n if (options.correctionType !== undefined)\n this.correctionType = options.correctionType;\n if (options.status !== undefined) this.status = options.status;\n if (options.summary !== undefined) this.summary = options.summary;\n if (options.incorrectText !== undefined)\n this.incorrectText = options.incorrectText;\n if (options.correctedText !== undefined)\n this.correctedText = options.correctedText;\n if (options.publicNote !== undefined) this.publicNote = options.publicNote;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.publishedAt !== undefined)\n this.publishedAt = options.publishedAt;\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n\n if (options.metadata !== undefined) {\n this.metadata =\n typeof options.metadata === 'string'\n ? options.metadata\n : JSON.stringify(options.metadata);\n }\n }\n\n getMetadata(): Record<string, unknown> {\n try {\n return this.metadata ? JSON.parse(this.metadata) : {};\n } catch {\n return {};\n }\n }\n}\n","import { SmrtCollection } from '@happyvertical/smrt-core';\nimport { ContentCorrection } from './content-correction';\n\nexport class ContentCorrectionCollection extends SmrtCollection<ContentCorrection> {\n static readonly _itemClass = ContentCorrection;\n\n async listForContent(contentId: string): Promise<ContentCorrection[]> {\n return this.list({\n where: { contentId },\n orderBy: 'created_at DESC',\n });\n }\n\n async getPublishedForContent(\n contentId: string,\n ): Promise<ContentCorrection[]> {\n return this.list({\n where: { contentId, status: 'published' },\n orderBy: 'published_at DESC',\n });\n }\n\n async issue(\n options: ConstructorParameters<typeof ContentCorrection>[0],\n ): Promise<ContentCorrection> {\n if (!options) {\n return this.create({});\n }\n\n return this.create({\n ...options,\n metadata:\n typeof options.metadata === 'string'\n ? options.metadata\n : options.metadata\n ? JSON.stringify(options.metad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