@anthusai/papyrus 1.3.0 → 1.4.0-next.10
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/amplify/data/resource.js +134 -3
- package/amplify/data/resource.ts +145 -3
- package/amplify/data/schema.js +131 -0
- package/amplify/data/schema.ts +142 -0
- package/amplify/functions/category-action/handler.ts +272 -20
- package/amplify/functions/console-chat-responder/src/main.rs +1 -1
- package/amplify/functions/content-actions/handler.py +23 -0
- package/amplify/functions/content-actions/requirements.txt +1 -1
- package/amplify/functions/content-actions/resource.js +1 -1
- package/amplify/functions/content-actions/resource.ts +1 -1
- package/amplify/functions/model-attachment-upload/handler.ts +1 -0
- package/amplify/functions/renditions/requirements.txt +1 -1
- package/amplify/functions/shared/curation-delegation-flow.ts +147 -0
- package/amplify/functions/shared/curation-delegation.ts +115 -0
- package/amplify/functions/shared/python-bundle.js +3 -3
- package/amplify/functions/shared/python-bundle.ts +3 -3
- package/amplify/functions/shared/reference-curation-metadata.ts +51 -0
- package/amplify/functions/shared/slack-events.ts +2 -2
- package/amplify/publication/renditions-function.js +1 -1
- package/amplify/publication/renditions-function.ts +1 -1
- package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +2 -1
- package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -1
- package/app/[year]/[month]/[day]/page/[pageNumber]/page.tsx +2 -1
- package/app/[year]/[month]/[day]/page.tsx +3 -0
- package/app/[year]/[month]/[day]/section/[sectionKey]/page.tsx +2 -0
- package/app/api/archive/editions/route.ts +2 -0
- package/app/api/auth/prospectus/accounts/route.ts +9 -0
- package/app/api/local-preview/derive/route.ts +28 -0
- package/app/api/local-preview/media/route.ts +25 -0
- package/app/archive/page.tsx +3 -0
- package/app/globals.css +28 -28
- package/app/layout.tsx +8 -5
- package/app/newsroom/[section]/[...selection]/page.tsx +0 -1
- package/app/newsroom/[section]/page.tsx +8 -1
- package/app/newsroom/articles/page.tsx +10 -0
- package/app/newsroom/insights/[threadId]/page.tsx +5 -16
- package/app/newsroom/insights/page.tsx +4 -12
- package/app/newsroom/sections/[sectionId]/page.tsx +3 -0
- package/app/page.tsx +30 -1
- package/components/administration-delegations-panel.tsx +156 -0
- package/components/curation-delegation-client.ts +104 -0
- package/components/item-stream-view.tsx +63 -0
- package/components/markus-ir-preview.tsx +47 -2
- package/components/news-desk-client-provider.tsx +17 -2
- package/components/news-desk-page.tsx +0 -1
- package/components/news-desk-taxonomy-client.ts +154 -240
- package/components/newspaper.tsx +4 -4
- package/components/newsroom-article-editor.tsx +138 -40
- package/components/newsroom-assignment-detail.tsx +79 -0
- package/components/newsroom-assignments-view.tsx +1 -1
- package/components/newsroom-board-view.tsx +153 -43
- package/components/newsroom-client-shell.tsx +8 -1
- package/components/newsroom-newsprint-board.css +5 -46
- package/components/newsroom-ops-overview.tsx +27 -5
- package/components/newsroom-organizer-shell.tsx +36 -13
- package/components/newsroom-organizer.css +269 -13
- package/components/newsroom-references-view.tsx +118 -23
- package/components/newsroom-topics-view.tsx +1 -1
- package/components/priming-proof-page.tsx +17 -8
- package/components/prospectus-account-chooser.tsx +131 -0
- package/components/reference-cyclotron-priming.tsx +85 -0
- package/components/reference-cyclotron-status.tsx +5 -5
- package/components/reference-cyclotron-suggestion.tsx +143 -0
- package/components/reference-live-agreement.tsx +62 -0
- package/components/reference-section-suggestion.tsx +104 -0
- package/components/story-reporting-trail-client.ts +91 -0
- package/components/story-reporting-trail.tsx +115 -0
- package/components/topic-steering-workspace.tsx +280 -679
- package/components/ui/sheet.tsx +10 -4
- package/components/use-paged-content-item-versions.ts +151 -0
- package/components/wiki-concepts-view.tsx +153 -0
- package/components/wiki-index-client.ts +51 -0
- package/infra/amplify-app-shell.js +17 -3
- package/infra/amplify-app-shell.ts +18 -3
- package/infra/site-config.js +6 -1
- package/infra/site-config.ts +7 -1
- package/lib/approved-priming-proof-reports.ts +6 -3
- package/lib/approved-priming-proofs/papyrus.json +90 -0
- package/lib/article-flow.ts +95 -0
- package/lib/article-frame-solver.ts +519 -0
- package/lib/blog-feature-solver.ts +1 -109
- package/lib/category-repository.ts +1 -1
- package/lib/chrome-text.ts +504 -0
- package/lib/content-actions-client.ts +3 -0
- package/lib/content-actions-demo.ts +55 -0
- package/lib/content-item-lifecycle.ts +34 -5
- package/lib/content-source-context.ts +9 -1
- package/lib/curation-delegation-helpers.ts +69 -0
- package/lib/cyclotron-suggestions.ts +263 -0
- package/lib/front-matter-fields.ts +42 -0
- package/lib/front-mosaic.ts +1133 -0
- package/lib/furniture.ts +385 -0
- package/lib/graphql-content-repository.ts +42 -7
- package/lib/item-stream.ts +47 -0
- package/lib/labels.ts +37 -0
- package/lib/layout-config.ts +237 -0
- package/lib/layout-plan.ts +40 -11
- package/lib/layout-scenarios.ts +21 -11
- package/lib/layout-types.ts +457 -0
- package/lib/layout-warnings.ts +8 -0
- package/lib/local-preview-section-fixtures.ts +72 -0
- package/lib/local-preview-seed.ts +286 -0
- package/lib/local-preview-tenant.ts +27 -0
- package/lib/local-preview.ts +3 -0
- package/lib/newspaper-layout.ts +17 -3410
- package/lib/newsroom-articles.ts +2 -0
- package/lib/newsroom-assignments.ts +14 -1
- package/lib/newsroom-board.ts +99 -47
- package/lib/newsroom-demo-dashboard.ts +1 -1
- package/lib/newsroom-forum-routes.ts +2 -43
- package/lib/newsroom-index-filters.ts +3 -40
- package/lib/newsroom-media-backend.ts +5 -0
- package/lib/newsroom-nav.ts +1 -3
- package/lib/newsroom-organizer-nav.ts +9 -16
- package/lib/newsroom-section-routing.ts +1 -1
- package/lib/newsroom-sections.ts +12 -0
- package/lib/papyrus-web-locations.ts +3 -24
- package/lib/pretext-layout.ts +22 -0
- package/lib/priming-proof-report.ts +1 -0
- package/lib/prospectus-account-client.ts +90 -0
- package/lib/prospectus-sign-in-routes.ts +45 -0
- package/lib/prospectus-site-identity.ts +13 -1
- package/lib/prospectus-tenant.ts +22 -0
- package/lib/reader-static-params.ts +2 -1
- package/lib/relevance-decisions.ts +29 -0
- package/lib/relevance-status.ts +73 -0
- package/lib/reporting-story-budget.ts +2 -2
- package/lib/semantic-graph.ts +5 -5
- package/lib/site-brand.ts +28 -1
- package/lib/site-env.ts +5 -0
- package/lib/site-section-suggestions.ts +120 -0
- package/lib/site-stack.ts +1 -1
- package/lib/story-reporting-trail.ts +106 -0
- package/lib/tenant-keys.ts +32 -0
- package/lib/text-columns.ts +251 -0
- package/lib/wiki.ts +56 -0
- package/package.json +46 -3
- package/renderers/pretext/presentation-shell.tsx +1 -1
- package/renderers/pretext/rhythm-article-page.tsx +1 -18
- package/routes.manifest.json +34 -15
- package/app/newsroom/work/page.tsx +0 -10
package/amplify/data/resource.js
CHANGED
|
@@ -211,6 +211,34 @@ const schema = a.schema({
|
|
|
211
211
|
.returns(a.ref("SteeringActionResult"))
|
|
212
212
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
213
213
|
.handler(a.handler.function(categoryAction)),
|
|
214
|
+
CurationDelegationResult: a.customType({
|
|
215
|
+
ok: a.boolean().required(),
|
|
216
|
+
delegationId: a.id().required(),
|
|
217
|
+
token: a.string(),
|
|
218
|
+
agentLabel: a.string().required(),
|
|
219
|
+
grantorLabel: a.string(),
|
|
220
|
+
expiresAt: a.datetime().required(),
|
|
221
|
+
revokedAt: a.datetime(),
|
|
222
|
+
state: a.string(),
|
|
223
|
+
userCode: a.string(),
|
|
224
|
+
requestedHours: a.integer(),
|
|
225
|
+
pendingExpiresAt: a.datetime(),
|
|
226
|
+
approvedAt: a.datetime(),
|
|
227
|
+
deniedAt: a.datetime(),
|
|
228
|
+
}),
|
|
229
|
+
CurationDelegationRequestResult: a.customType({
|
|
230
|
+
ok: a.boolean().required(),
|
|
231
|
+
delegationId: a.id().required(),
|
|
232
|
+
userCode: a.string().required(),
|
|
233
|
+
pendingExpiresAt: a.datetime().required(),
|
|
234
|
+
requestedHours: a.integer().required(),
|
|
235
|
+
}),
|
|
236
|
+
CurationDelegationStatusResult: a.customType({
|
|
237
|
+
delegationId: a.id().required(),
|
|
238
|
+
state: a.string().required(),
|
|
239
|
+
expiresAt: a.datetime().required(),
|
|
240
|
+
grantorLabel: a.string(),
|
|
241
|
+
}),
|
|
214
242
|
ReferenceCurationActionResult: a.customType({
|
|
215
243
|
ok: a.boolean().required(),
|
|
216
244
|
action: a.string().required(),
|
|
@@ -227,7 +255,7 @@ const schema = a.schema({
|
|
|
227
255
|
status: a.string().required(),
|
|
228
256
|
relationId: a.id(),
|
|
229
257
|
}),
|
|
230
|
-
|
|
258
|
+
ReferenceNoteActionResult: a.customType({
|
|
231
259
|
ok: a.boolean().required(),
|
|
232
260
|
referenceId: a.id().required(),
|
|
233
261
|
messageId: a.id().required(),
|
|
@@ -289,12 +317,105 @@ const schema = a.schema({
|
|
|
289
317
|
reasonCode: a.string(),
|
|
290
318
|
decisionRelationId: a.id(),
|
|
291
319
|
shareable: a.boolean(),
|
|
320
|
+
sectionId: a.id(),
|
|
292
321
|
})
|
|
293
322
|
.returns(a.ref("ReferenceCurationActionResult"))
|
|
294
323
|
.authorization((allow) => [
|
|
295
324
|
allow.groups(categoryWriteGroups),
|
|
296
325
|
])
|
|
297
326
|
.handler(a.handler.function(categoryAction)),
|
|
327
|
+
createCurationDelegation: a
|
|
328
|
+
.mutation()
|
|
329
|
+
.arguments({
|
|
330
|
+
agentLabel: a.string().required(),
|
|
331
|
+
hours: a.integer(),
|
|
332
|
+
})
|
|
333
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
334
|
+
.authorization((allow) => [
|
|
335
|
+
allow.groups(categoryWriteGroups),
|
|
336
|
+
])
|
|
337
|
+
.handler(a.handler.function(categoryAction)),
|
|
338
|
+
revokeCurationDelegation: a
|
|
339
|
+
.mutation()
|
|
340
|
+
.arguments({
|
|
341
|
+
delegationId: a.id().required(),
|
|
342
|
+
})
|
|
343
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
344
|
+
.authorization((allow) => [
|
|
345
|
+
allow.groups(categoryWriteGroups),
|
|
346
|
+
])
|
|
347
|
+
.handler(a.handler.function(categoryAction)),
|
|
348
|
+
listCurationDelegations: a
|
|
349
|
+
.query()
|
|
350
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
351
|
+
.authorization((allow) => [
|
|
352
|
+
allow.groups(categoryWriteGroups),
|
|
353
|
+
])
|
|
354
|
+
.handler(a.handler.function(categoryAction)),
|
|
355
|
+
requestCurationDelegation: a
|
|
356
|
+
.mutation()
|
|
357
|
+
.arguments({
|
|
358
|
+
delegationId: a.id().required(),
|
|
359
|
+
tokenHash: a.string().required(),
|
|
360
|
+
agentLabel: a.string().required(),
|
|
361
|
+
hours: a.integer(),
|
|
362
|
+
})
|
|
363
|
+
.returns(a.ref("CurationDelegationRequestResult"))
|
|
364
|
+
.authorization((allow) => [
|
|
365
|
+
allow.authenticated("identityPool"),
|
|
366
|
+
])
|
|
367
|
+
.handler(a.handler.function(categoryAction)),
|
|
368
|
+
approveCurationDelegation: a
|
|
369
|
+
.mutation()
|
|
370
|
+
.arguments({
|
|
371
|
+
userCode: a.string().required(),
|
|
372
|
+
})
|
|
373
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
374
|
+
.authorization((allow) => [
|
|
375
|
+
allow.groups(categoryWriteGroups),
|
|
376
|
+
])
|
|
377
|
+
.handler(a.handler.function(categoryAction)),
|
|
378
|
+
denyCurationDelegation: a
|
|
379
|
+
.mutation()
|
|
380
|
+
.arguments({
|
|
381
|
+
userCode: a.string().required(),
|
|
382
|
+
})
|
|
383
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
384
|
+
.authorization((allow) => [
|
|
385
|
+
allow.groups(categoryWriteGroups),
|
|
386
|
+
])
|
|
387
|
+
.handler(a.handler.function(categoryAction)),
|
|
388
|
+
getCurationDelegationStatus: a
|
|
389
|
+
.query()
|
|
390
|
+
.arguments({
|
|
391
|
+
delegationId: a.id().required(),
|
|
392
|
+
})
|
|
393
|
+
.returns(a.ref("CurationDelegationStatusResult"))
|
|
394
|
+
.authorization((allow) => [
|
|
395
|
+
allow.authenticated("identityPool"),
|
|
396
|
+
])
|
|
397
|
+
.handler(a.handler.function(categoryAction)),
|
|
398
|
+
recordDelegatedCuration: a
|
|
399
|
+
.mutation()
|
|
400
|
+
.arguments({
|
|
401
|
+
referenceId: a.id().required(),
|
|
402
|
+
action: a.string().required(),
|
|
403
|
+
delegationId: a.id().required(),
|
|
404
|
+
delegationToken: a.string().required(),
|
|
405
|
+
agentLabel: a.string().required(),
|
|
406
|
+
onBehalfOf: a.string().required(),
|
|
407
|
+
instruction: a.string().required(),
|
|
408
|
+
note: a.string(),
|
|
409
|
+
reasonCode: a.string(),
|
|
410
|
+
decisionRelationId: a.id(),
|
|
411
|
+
shareable: a.boolean(),
|
|
412
|
+
sectionId: a.id(),
|
|
413
|
+
})
|
|
414
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
415
|
+
.authorization((allow) => [
|
|
416
|
+
allow.authenticated("identityPool"),
|
|
417
|
+
])
|
|
418
|
+
.handler(a.handler.function(categoryAction)),
|
|
298
419
|
setReferenceQualityRating: a
|
|
299
420
|
.mutation()
|
|
300
421
|
.arguments({
|
|
@@ -309,7 +430,7 @@ const schema = a.schema({
|
|
|
309
430
|
allow.groups(categoryWriteGroups),
|
|
310
431
|
])
|
|
311
432
|
.handler(a.handler.function(categoryAction)),
|
|
312
|
-
|
|
433
|
+
createReferenceNote: a
|
|
313
434
|
.mutation()
|
|
314
435
|
.arguments({
|
|
315
436
|
referenceId: a.id().required(),
|
|
@@ -318,7 +439,7 @@ const schema = a.schema({
|
|
|
318
439
|
actorSub: a.string(),
|
|
319
440
|
actorLabel: a.string(),
|
|
320
441
|
})
|
|
321
|
-
.returns(a.ref("
|
|
442
|
+
.returns(a.ref("ReferenceNoteActionResult"))
|
|
322
443
|
.authorization((allow) => [
|
|
323
444
|
allow.groups(categoryWriteGroups),
|
|
324
445
|
])
|
|
@@ -1018,6 +1139,7 @@ const schema = a.schema({
|
|
|
1018
1139
|
NewsroomSection: a
|
|
1019
1140
|
.model({
|
|
1020
1141
|
id: a.id().required(),
|
|
1142
|
+
tenantId: a.string(),
|
|
1021
1143
|
title: a.string().required(),
|
|
1022
1144
|
type: a.string().required(),
|
|
1023
1145
|
editorialMission: a.string().required(),
|
|
@@ -1036,6 +1158,7 @@ const schema = a.schema({
|
|
|
1036
1158
|
})
|
|
1037
1159
|
.secondaryIndexes((index) => [
|
|
1038
1160
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
1161
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
1039
1162
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
1040
1163
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
1041
1164
|
])
|
|
@@ -1624,6 +1747,7 @@ const schema = a.schema({
|
|
|
1624
1747
|
.model({
|
|
1625
1748
|
id: a.id().required(),
|
|
1626
1749
|
lineageId: a.id().required(),
|
|
1750
|
+
tenantId: a.string(),
|
|
1627
1751
|
versionNumber: a.integer().required(),
|
|
1628
1752
|
previousVersionId: a.id(),
|
|
1629
1753
|
versionState: a.string().required(),
|
|
@@ -1636,6 +1760,7 @@ const schema = a.schema({
|
|
|
1636
1760
|
typeStatus: a.string().required(),
|
|
1637
1761
|
stage: a.string(),
|
|
1638
1762
|
slug: a.string().required(),
|
|
1763
|
+
tenantSlug: a.string(),
|
|
1639
1764
|
shortSlug: a.string(),
|
|
1640
1765
|
section: a.string(),
|
|
1641
1766
|
sectionStatus: a.string(),
|
|
@@ -1663,6 +1788,7 @@ const schema = a.schema({
|
|
|
1663
1788
|
.secondaryIndexes((index) => [
|
|
1664
1789
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1665
1790
|
index("slug").queryField("itemBySlug"),
|
|
1791
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1666
1792
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1667
1793
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1668
1794
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1710,6 +1836,7 @@ const schema = a.schema({
|
|
|
1710
1836
|
.model({
|
|
1711
1837
|
id: a.id().required(),
|
|
1712
1838
|
itemId: a.id().required(),
|
|
1839
|
+
tenantId: a.string(),
|
|
1713
1840
|
type: a.string().required(),
|
|
1714
1841
|
role: a.string().required(),
|
|
1715
1842
|
sortKey: a.string().required(),
|
|
@@ -1822,11 +1949,13 @@ const schema = a.schema({
|
|
|
1822
1949
|
id: a.id().required(),
|
|
1823
1950
|
sourceItemId: a.id().required(),
|
|
1824
1951
|
itemLineageId: a.id().required(),
|
|
1952
|
+
tenantId: a.string(),
|
|
1825
1953
|
versionNumber: a.integer().required(),
|
|
1826
1954
|
type: a.string().required(),
|
|
1827
1955
|
status: a.string().required(),
|
|
1828
1956
|
typeStatus: a.string().required(),
|
|
1829
1957
|
slug: a.string().required(),
|
|
1958
|
+
tenantSlug: a.string(),
|
|
1830
1959
|
shortSlug: a.string(),
|
|
1831
1960
|
section: a.string(),
|
|
1832
1961
|
sectionStatus: a.string(),
|
|
@@ -1849,6 +1978,7 @@ const schema = a.schema({
|
|
|
1849
1978
|
})
|
|
1850
1979
|
.secondaryIndexes((index) => [
|
|
1851
1980
|
index("slug").queryField("publishedItemBySlug"),
|
|
1981
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1852
1982
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1853
1983
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1854
1984
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1861,6 +1991,7 @@ const schema = a.schema({
|
|
|
1861
1991
|
.model({
|
|
1862
1992
|
id: a.id().required(),
|
|
1863
1993
|
sourceMediaAssetId: a.id().required(),
|
|
1994
|
+
tenantId: a.string(),
|
|
1864
1995
|
publishedItemId: a.id().required(),
|
|
1865
1996
|
sourceItemId: a.id().required(),
|
|
1866
1997
|
itemLineageId: a.id().required(),
|
package/amplify/data/resource.ts
CHANGED
|
@@ -228,6 +228,37 @@ const schema = a.schema({
|
|
|
228
228
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
229
229
|
.handler(a.handler.function(categoryAction)),
|
|
230
230
|
|
|
231
|
+
CurationDelegationResult: a.customType({
|
|
232
|
+
ok: a.boolean().required(),
|
|
233
|
+
delegationId: a.id().required(),
|
|
234
|
+
token: a.string(),
|
|
235
|
+
agentLabel: a.string().required(),
|
|
236
|
+
grantorLabel: a.string(),
|
|
237
|
+
expiresAt: a.datetime().required(),
|
|
238
|
+
revokedAt: a.datetime(),
|
|
239
|
+
state: a.string(),
|
|
240
|
+
userCode: a.string(),
|
|
241
|
+
requestedHours: a.integer(),
|
|
242
|
+
pendingExpiresAt: a.datetime(),
|
|
243
|
+
approvedAt: a.datetime(),
|
|
244
|
+
deniedAt: a.datetime(),
|
|
245
|
+
}),
|
|
246
|
+
|
|
247
|
+
CurationDelegationRequestResult: a.customType({
|
|
248
|
+
ok: a.boolean().required(),
|
|
249
|
+
delegationId: a.id().required(),
|
|
250
|
+
userCode: a.string().required(),
|
|
251
|
+
pendingExpiresAt: a.datetime().required(),
|
|
252
|
+
requestedHours: a.integer().required(),
|
|
253
|
+
}),
|
|
254
|
+
|
|
255
|
+
CurationDelegationStatusResult: a.customType({
|
|
256
|
+
delegationId: a.id().required(),
|
|
257
|
+
state: a.string().required(),
|
|
258
|
+
expiresAt: a.datetime().required(),
|
|
259
|
+
grantorLabel: a.string(),
|
|
260
|
+
}),
|
|
261
|
+
|
|
231
262
|
ReferenceCurationActionResult: a.customType({
|
|
232
263
|
ok: a.boolean().required(),
|
|
233
264
|
action: a.string().required(),
|
|
@@ -246,7 +277,7 @@ const schema = a.schema({
|
|
|
246
277
|
relationId: a.id(),
|
|
247
278
|
}),
|
|
248
279
|
|
|
249
|
-
|
|
280
|
+
ReferenceNoteActionResult: a.customType({
|
|
250
281
|
ok: a.boolean().required(),
|
|
251
282
|
referenceId: a.id().required(),
|
|
252
283
|
messageId: a.id().required(),
|
|
@@ -314,6 +345,7 @@ const schema = a.schema({
|
|
|
314
345
|
reasonCode: a.string(),
|
|
315
346
|
decisionRelationId: a.id(),
|
|
316
347
|
shareable: a.boolean(),
|
|
348
|
+
sectionId: a.id(),
|
|
317
349
|
})
|
|
318
350
|
.returns(a.ref("ReferenceCurationActionResult"))
|
|
319
351
|
.authorization((allow) => [
|
|
@@ -321,6 +353,106 @@ const schema = a.schema({
|
|
|
321
353
|
])
|
|
322
354
|
.handler(a.handler.function(categoryAction)),
|
|
323
355
|
|
|
356
|
+
createCurationDelegation: a
|
|
357
|
+
.mutation()
|
|
358
|
+
.arguments({
|
|
359
|
+
agentLabel: a.string().required(),
|
|
360
|
+
hours: a.integer(),
|
|
361
|
+
})
|
|
362
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
363
|
+
.authorization((allow) => [
|
|
364
|
+
allow.groups(categoryWriteGroups),
|
|
365
|
+
])
|
|
366
|
+
.handler(a.handler.function(categoryAction)),
|
|
367
|
+
|
|
368
|
+
revokeCurationDelegation: a
|
|
369
|
+
.mutation()
|
|
370
|
+
.arguments({
|
|
371
|
+
delegationId: a.id().required(),
|
|
372
|
+
})
|
|
373
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
374
|
+
.authorization((allow) => [
|
|
375
|
+
allow.groups(categoryWriteGroups),
|
|
376
|
+
])
|
|
377
|
+
.handler(a.handler.function(categoryAction)),
|
|
378
|
+
|
|
379
|
+
listCurationDelegations: a
|
|
380
|
+
.query()
|
|
381
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
382
|
+
.authorization((allow) => [
|
|
383
|
+
allow.groups(categoryWriteGroups),
|
|
384
|
+
])
|
|
385
|
+
.handler(a.handler.function(categoryAction)),
|
|
386
|
+
|
|
387
|
+
requestCurationDelegation: a
|
|
388
|
+
.mutation()
|
|
389
|
+
.arguments({
|
|
390
|
+
delegationId: a.id().required(),
|
|
391
|
+
tokenHash: a.string().required(),
|
|
392
|
+
agentLabel: a.string().required(),
|
|
393
|
+
hours: a.integer(),
|
|
394
|
+
})
|
|
395
|
+
.returns(a.ref("CurationDelegationRequestResult"))
|
|
396
|
+
.authorization((allow) => [
|
|
397
|
+
allow.authenticated("identityPool"),
|
|
398
|
+
])
|
|
399
|
+
.handler(a.handler.function(categoryAction)),
|
|
400
|
+
|
|
401
|
+
approveCurationDelegation: a
|
|
402
|
+
.mutation()
|
|
403
|
+
.arguments({
|
|
404
|
+
userCode: a.string().required(),
|
|
405
|
+
})
|
|
406
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
407
|
+
.authorization((allow) => [
|
|
408
|
+
allow.groups(categoryWriteGroups),
|
|
409
|
+
])
|
|
410
|
+
.handler(a.handler.function(categoryAction)),
|
|
411
|
+
|
|
412
|
+
denyCurationDelegation: a
|
|
413
|
+
.mutation()
|
|
414
|
+
.arguments({
|
|
415
|
+
userCode: a.string().required(),
|
|
416
|
+
})
|
|
417
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
418
|
+
.authorization((allow) => [
|
|
419
|
+
allow.groups(categoryWriteGroups),
|
|
420
|
+
])
|
|
421
|
+
.handler(a.handler.function(categoryAction)),
|
|
422
|
+
|
|
423
|
+
getCurationDelegationStatus: a
|
|
424
|
+
.query()
|
|
425
|
+
.arguments({
|
|
426
|
+
delegationId: a.id().required(),
|
|
427
|
+
})
|
|
428
|
+
.returns(a.ref("CurationDelegationStatusResult"))
|
|
429
|
+
.authorization((allow) => [
|
|
430
|
+
allow.authenticated("identityPool"),
|
|
431
|
+
])
|
|
432
|
+
.handler(a.handler.function(categoryAction)),
|
|
433
|
+
|
|
434
|
+
recordDelegatedCuration: a
|
|
435
|
+
.mutation()
|
|
436
|
+
.arguments({
|
|
437
|
+
referenceId: a.id().required(),
|
|
438
|
+
action: a.string().required(),
|
|
439
|
+
delegationId: a.id().required(),
|
|
440
|
+
delegationToken: a.string().required(),
|
|
441
|
+
agentLabel: a.string().required(),
|
|
442
|
+
onBehalfOf: a.string().required(),
|
|
443
|
+
instruction: a.string().required(),
|
|
444
|
+
note: a.string(),
|
|
445
|
+
reasonCode: a.string(),
|
|
446
|
+
decisionRelationId: a.id(),
|
|
447
|
+
shareable: a.boolean(),
|
|
448
|
+
sectionId: a.id(),
|
|
449
|
+
})
|
|
450
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
451
|
+
.authorization((allow) => [
|
|
452
|
+
allow.authenticated("identityPool"),
|
|
453
|
+
])
|
|
454
|
+
.handler(a.handler.function(categoryAction)),
|
|
455
|
+
|
|
324
456
|
setReferenceQualityRating: a
|
|
325
457
|
.mutation()
|
|
326
458
|
.arguments({
|
|
@@ -336,7 +468,7 @@ const schema = a.schema({
|
|
|
336
468
|
])
|
|
337
469
|
.handler(a.handler.function(categoryAction)),
|
|
338
470
|
|
|
339
|
-
|
|
471
|
+
createReferenceNote: a
|
|
340
472
|
.mutation()
|
|
341
473
|
.arguments({
|
|
342
474
|
referenceId: a.id().required(),
|
|
@@ -345,7 +477,7 @@ const schema = a.schema({
|
|
|
345
477
|
actorSub: a.string(),
|
|
346
478
|
actorLabel: a.string(),
|
|
347
479
|
})
|
|
348
|
-
.returns(a.ref("
|
|
480
|
+
.returns(a.ref("ReferenceNoteActionResult"))
|
|
349
481
|
.authorization((allow) => [
|
|
350
482
|
allow.groups(categoryWriteGroups),
|
|
351
483
|
])
|
|
@@ -1100,6 +1232,7 @@ const schema = a.schema({
|
|
|
1100
1232
|
NewsroomSection: a
|
|
1101
1233
|
.model({
|
|
1102
1234
|
id: a.id().required(),
|
|
1235
|
+
tenantId: a.string(),
|
|
1103
1236
|
title: a.string().required(),
|
|
1104
1237
|
type: a.string().required(),
|
|
1105
1238
|
editorialMission: a.string().required(),
|
|
@@ -1118,6 +1251,7 @@ const schema = a.schema({
|
|
|
1118
1251
|
})
|
|
1119
1252
|
.secondaryIndexes((index) => [
|
|
1120
1253
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
1254
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
1121
1255
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
1122
1256
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
1123
1257
|
])
|
|
@@ -1725,6 +1859,7 @@ const schema = a.schema({
|
|
|
1725
1859
|
.model({
|
|
1726
1860
|
id: a.id().required(),
|
|
1727
1861
|
lineageId: a.id().required(),
|
|
1862
|
+
tenantId: a.string(),
|
|
1728
1863
|
versionNumber: a.integer().required(),
|
|
1729
1864
|
previousVersionId: a.id(),
|
|
1730
1865
|
versionState: a.string().required(),
|
|
@@ -1737,6 +1872,7 @@ const schema = a.schema({
|
|
|
1737
1872
|
typeStatus: a.string().required(),
|
|
1738
1873
|
stage: a.string(),
|
|
1739
1874
|
slug: a.string().required(),
|
|
1875
|
+
tenantSlug: a.string(),
|
|
1740
1876
|
shortSlug: a.string(),
|
|
1741
1877
|
section: a.string(),
|
|
1742
1878
|
sectionStatus: a.string(),
|
|
@@ -1764,6 +1900,7 @@ const schema = a.schema({
|
|
|
1764
1900
|
.secondaryIndexes((index) => [
|
|
1765
1901
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1766
1902
|
index("slug").queryField("itemBySlug"),
|
|
1903
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1767
1904
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1768
1905
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1769
1906
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1814,6 +1951,7 @@ const schema = a.schema({
|
|
|
1814
1951
|
.model({
|
|
1815
1952
|
id: a.id().required(),
|
|
1816
1953
|
itemId: a.id().required(),
|
|
1954
|
+
tenantId: a.string(),
|
|
1817
1955
|
type: a.string().required(),
|
|
1818
1956
|
role: a.string().required(),
|
|
1819
1957
|
sortKey: a.string().required(),
|
|
@@ -1930,11 +2068,13 @@ const schema = a.schema({
|
|
|
1930
2068
|
id: a.id().required(),
|
|
1931
2069
|
sourceItemId: a.id().required(),
|
|
1932
2070
|
itemLineageId: a.id().required(),
|
|
2071
|
+
tenantId: a.string(),
|
|
1933
2072
|
versionNumber: a.integer().required(),
|
|
1934
2073
|
type: a.string().required(),
|
|
1935
2074
|
status: a.string().required(),
|
|
1936
2075
|
typeStatus: a.string().required(),
|
|
1937
2076
|
slug: a.string().required(),
|
|
2077
|
+
tenantSlug: a.string(),
|
|
1938
2078
|
shortSlug: a.string(),
|
|
1939
2079
|
section: a.string(),
|
|
1940
2080
|
sectionStatus: a.string(),
|
|
@@ -1957,6 +2097,7 @@ const schema = a.schema({
|
|
|
1957
2097
|
})
|
|
1958
2098
|
.secondaryIndexes((index) => [
|
|
1959
2099
|
index("slug").queryField("publishedItemBySlug"),
|
|
2100
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1960
2101
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1961
2102
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1962
2103
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1970,6 +2111,7 @@ const schema = a.schema({
|
|
|
1970
2111
|
.model({
|
|
1971
2112
|
id: a.id().required(),
|
|
1972
2113
|
sourceMediaAssetId: a.id().required(),
|
|
2114
|
+
tenantId: a.string(),
|
|
1973
2115
|
publishedItemId: a.id().required(),
|
|
1974
2116
|
sourceItemId: a.id().required(),
|
|
1975
2117
|
itemLineageId: a.id().required(),
|