@anthusai/papyrus 1.4.0-next.5 → 1.4.0-next.7
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 +67 -0
- package/amplify/data/resource.ts +72 -0
- package/amplify/data/schema.js +67 -0
- package/amplify/data/schema.ts +72 -0
- package/amplify/functions/category-action/handler.ts +172 -2
- 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/renditions/requirements.txt +1 -1
- package/amplify/functions/shared/curation-delegation.ts +67 -0
- package/amplify/functions/shared/reference-curation-metadata.ts +20 -0
- package/amplify/publication/renditions-function.js +1 -1
- package/amplify/publication/renditions-function.ts +1 -1
- package/components/administration-delegations-panel.tsx +204 -0
- package/components/board-card-excerpts.tsx +43 -27
- package/components/curation-delegation-client.ts +81 -0
- package/components/news-desk-taxonomy-client.ts +7 -0
- package/components/newsroom-newsprint-board.css +1 -1
- package/components/newsroom-organizer-shell.tsx +4 -1
- package/components/newsroom-organizer.css +31 -0
- package/components/newsroom-references-view.tsx +56 -21
- package/components/prospectus-account-chooser.tsx +98 -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/topic-steering-workspace.tsx +49 -3
- package/lib/content-source-context.ts +9 -1
- package/lib/curation-delegation-helpers.ts +59 -0
- package/lib/cyclotron-suggestions.ts +263 -0
- package/lib/graphql-content-repository.ts +42 -7
- package/lib/local-preview-seed.ts +141 -3
- package/lib/local-preview-tenant.ts +27 -0
- package/lib/prospectus-tenant.ts +22 -0
- package/lib/relevance-decisions.ts +29 -0
- package/lib/tenant-keys.ts +32 -0
- package/package.json +11 -1
- package/routes.manifest.json +1 -1
package/amplify/data/resource.js
CHANGED
|
@@ -211,6 +211,15 @@ 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
|
+
}),
|
|
214
223
|
ReferenceCurationActionResult: a.customType({
|
|
215
224
|
ok: a.boolean().required(),
|
|
216
225
|
action: a.string().required(),
|
|
@@ -295,6 +304,54 @@ const schema = a.schema({
|
|
|
295
304
|
allow.groups(categoryWriteGroups),
|
|
296
305
|
])
|
|
297
306
|
.handler(a.handler.function(categoryAction)),
|
|
307
|
+
createCurationDelegation: a
|
|
308
|
+
.mutation()
|
|
309
|
+
.arguments({
|
|
310
|
+
agentLabel: a.string().required(),
|
|
311
|
+
hours: a.integer(),
|
|
312
|
+
})
|
|
313
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
314
|
+
.authorization((allow) => [
|
|
315
|
+
allow.groups(categoryWriteGroups),
|
|
316
|
+
])
|
|
317
|
+
.handler(a.handler.function(categoryAction)),
|
|
318
|
+
revokeCurationDelegation: a
|
|
319
|
+
.mutation()
|
|
320
|
+
.arguments({
|
|
321
|
+
delegationId: a.id().required(),
|
|
322
|
+
})
|
|
323
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
324
|
+
.authorization((allow) => [
|
|
325
|
+
allow.groups(categoryWriteGroups),
|
|
326
|
+
])
|
|
327
|
+
.handler(a.handler.function(categoryAction)),
|
|
328
|
+
listCurationDelegations: a
|
|
329
|
+
.query()
|
|
330
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
331
|
+
.authorization((allow) => [
|
|
332
|
+
allow.groups(categoryWriteGroups),
|
|
333
|
+
])
|
|
334
|
+
.handler(a.handler.function(categoryAction)),
|
|
335
|
+
recordDelegatedCuration: a
|
|
336
|
+
.mutation()
|
|
337
|
+
.arguments({
|
|
338
|
+
referenceId: a.id().required(),
|
|
339
|
+
action: a.string().required(),
|
|
340
|
+
delegationId: a.id().required(),
|
|
341
|
+
delegationToken: a.string().required(),
|
|
342
|
+
agentLabel: a.string().required(),
|
|
343
|
+
onBehalfOf: a.string().required(),
|
|
344
|
+
instruction: a.string().required(),
|
|
345
|
+
note: a.string(),
|
|
346
|
+
reasonCode: a.string(),
|
|
347
|
+
decisionRelationId: a.id(),
|
|
348
|
+
shareable: a.boolean(),
|
|
349
|
+
})
|
|
350
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
351
|
+
.authorization((allow) => [
|
|
352
|
+
allow.authenticated("identityPool"),
|
|
353
|
+
])
|
|
354
|
+
.handler(a.handler.function(categoryAction)),
|
|
298
355
|
setReferenceQualityRating: a
|
|
299
356
|
.mutation()
|
|
300
357
|
.arguments({
|
|
@@ -1018,6 +1075,7 @@ const schema = a.schema({
|
|
|
1018
1075
|
NewsroomSection: a
|
|
1019
1076
|
.model({
|
|
1020
1077
|
id: a.id().required(),
|
|
1078
|
+
tenantId: a.string(),
|
|
1021
1079
|
title: a.string().required(),
|
|
1022
1080
|
type: a.string().required(),
|
|
1023
1081
|
editorialMission: a.string().required(),
|
|
@@ -1036,6 +1094,7 @@ const schema = a.schema({
|
|
|
1036
1094
|
})
|
|
1037
1095
|
.secondaryIndexes((index) => [
|
|
1038
1096
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
1097
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
1039
1098
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
1040
1099
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
1041
1100
|
])
|
|
@@ -1624,6 +1683,7 @@ const schema = a.schema({
|
|
|
1624
1683
|
.model({
|
|
1625
1684
|
id: a.id().required(),
|
|
1626
1685
|
lineageId: a.id().required(),
|
|
1686
|
+
tenantId: a.string(),
|
|
1627
1687
|
versionNumber: a.integer().required(),
|
|
1628
1688
|
previousVersionId: a.id(),
|
|
1629
1689
|
versionState: a.string().required(),
|
|
@@ -1636,6 +1696,7 @@ const schema = a.schema({
|
|
|
1636
1696
|
typeStatus: a.string().required(),
|
|
1637
1697
|
stage: a.string(),
|
|
1638
1698
|
slug: a.string().required(),
|
|
1699
|
+
tenantSlug: a.string(),
|
|
1639
1700
|
shortSlug: a.string(),
|
|
1640
1701
|
section: a.string(),
|
|
1641
1702
|
sectionStatus: a.string(),
|
|
@@ -1663,6 +1724,7 @@ const schema = a.schema({
|
|
|
1663
1724
|
.secondaryIndexes((index) => [
|
|
1664
1725
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1665
1726
|
index("slug").queryField("itemBySlug"),
|
|
1727
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1666
1728
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1667
1729
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1668
1730
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1710,6 +1772,7 @@ const schema = a.schema({
|
|
|
1710
1772
|
.model({
|
|
1711
1773
|
id: a.id().required(),
|
|
1712
1774
|
itemId: a.id().required(),
|
|
1775
|
+
tenantId: a.string(),
|
|
1713
1776
|
type: a.string().required(),
|
|
1714
1777
|
role: a.string().required(),
|
|
1715
1778
|
sortKey: a.string().required(),
|
|
@@ -1822,11 +1885,13 @@ const schema = a.schema({
|
|
|
1822
1885
|
id: a.id().required(),
|
|
1823
1886
|
sourceItemId: a.id().required(),
|
|
1824
1887
|
itemLineageId: a.id().required(),
|
|
1888
|
+
tenantId: a.string(),
|
|
1825
1889
|
versionNumber: a.integer().required(),
|
|
1826
1890
|
type: a.string().required(),
|
|
1827
1891
|
status: a.string().required(),
|
|
1828
1892
|
typeStatus: a.string().required(),
|
|
1829
1893
|
slug: a.string().required(),
|
|
1894
|
+
tenantSlug: a.string(),
|
|
1830
1895
|
shortSlug: a.string(),
|
|
1831
1896
|
section: a.string(),
|
|
1832
1897
|
sectionStatus: a.string(),
|
|
@@ -1849,6 +1914,7 @@ const schema = a.schema({
|
|
|
1849
1914
|
})
|
|
1850
1915
|
.secondaryIndexes((index) => [
|
|
1851
1916
|
index("slug").queryField("publishedItemBySlug"),
|
|
1917
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1852
1918
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1853
1919
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1854
1920
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1861,6 +1927,7 @@ const schema = a.schema({
|
|
|
1861
1927
|
.model({
|
|
1862
1928
|
id: a.id().required(),
|
|
1863
1929
|
sourceMediaAssetId: a.id().required(),
|
|
1930
|
+
tenantId: a.string(),
|
|
1864
1931
|
publishedItemId: a.id().required(),
|
|
1865
1932
|
sourceItemId: a.id().required(),
|
|
1866
1933
|
itemLineageId: a.id().required(),
|
package/amplify/data/resource.ts
CHANGED
|
@@ -228,6 +228,16 @@ 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
|
+
}),
|
|
240
|
+
|
|
231
241
|
ReferenceCurationActionResult: a.customType({
|
|
232
242
|
ok: a.boolean().required(),
|
|
233
243
|
action: a.string().required(),
|
|
@@ -321,6 +331,58 @@ const schema = a.schema({
|
|
|
321
331
|
])
|
|
322
332
|
.handler(a.handler.function(categoryAction)),
|
|
323
333
|
|
|
334
|
+
createCurationDelegation: a
|
|
335
|
+
.mutation()
|
|
336
|
+
.arguments({
|
|
337
|
+
agentLabel: a.string().required(),
|
|
338
|
+
hours: a.integer(),
|
|
339
|
+
})
|
|
340
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
341
|
+
.authorization((allow) => [
|
|
342
|
+
allow.groups(categoryWriteGroups),
|
|
343
|
+
])
|
|
344
|
+
.handler(a.handler.function(categoryAction)),
|
|
345
|
+
|
|
346
|
+
revokeCurationDelegation: a
|
|
347
|
+
.mutation()
|
|
348
|
+
.arguments({
|
|
349
|
+
delegationId: a.id().required(),
|
|
350
|
+
})
|
|
351
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
352
|
+
.authorization((allow) => [
|
|
353
|
+
allow.groups(categoryWriteGroups),
|
|
354
|
+
])
|
|
355
|
+
.handler(a.handler.function(categoryAction)),
|
|
356
|
+
|
|
357
|
+
listCurationDelegations: a
|
|
358
|
+
.query()
|
|
359
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
360
|
+
.authorization((allow) => [
|
|
361
|
+
allow.groups(categoryWriteGroups),
|
|
362
|
+
])
|
|
363
|
+
.handler(a.handler.function(categoryAction)),
|
|
364
|
+
|
|
365
|
+
recordDelegatedCuration: a
|
|
366
|
+
.mutation()
|
|
367
|
+
.arguments({
|
|
368
|
+
referenceId: a.id().required(),
|
|
369
|
+
action: a.string().required(),
|
|
370
|
+
delegationId: a.id().required(),
|
|
371
|
+
delegationToken: a.string().required(),
|
|
372
|
+
agentLabel: a.string().required(),
|
|
373
|
+
onBehalfOf: a.string().required(),
|
|
374
|
+
instruction: a.string().required(),
|
|
375
|
+
note: a.string(),
|
|
376
|
+
reasonCode: a.string(),
|
|
377
|
+
decisionRelationId: a.id(),
|
|
378
|
+
shareable: a.boolean(),
|
|
379
|
+
})
|
|
380
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
381
|
+
.authorization((allow) => [
|
|
382
|
+
allow.authenticated("identityPool"),
|
|
383
|
+
])
|
|
384
|
+
.handler(a.handler.function(categoryAction)),
|
|
385
|
+
|
|
324
386
|
setReferenceQualityRating: a
|
|
325
387
|
.mutation()
|
|
326
388
|
.arguments({
|
|
@@ -1100,6 +1162,7 @@ const schema = a.schema({
|
|
|
1100
1162
|
NewsroomSection: a
|
|
1101
1163
|
.model({
|
|
1102
1164
|
id: a.id().required(),
|
|
1165
|
+
tenantId: a.string(),
|
|
1103
1166
|
title: a.string().required(),
|
|
1104
1167
|
type: a.string().required(),
|
|
1105
1168
|
editorialMission: a.string().required(),
|
|
@@ -1118,6 +1181,7 @@ const schema = a.schema({
|
|
|
1118
1181
|
})
|
|
1119
1182
|
.secondaryIndexes((index) => [
|
|
1120
1183
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
1184
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
1121
1185
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
1122
1186
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
1123
1187
|
])
|
|
@@ -1725,6 +1789,7 @@ const schema = a.schema({
|
|
|
1725
1789
|
.model({
|
|
1726
1790
|
id: a.id().required(),
|
|
1727
1791
|
lineageId: a.id().required(),
|
|
1792
|
+
tenantId: a.string(),
|
|
1728
1793
|
versionNumber: a.integer().required(),
|
|
1729
1794
|
previousVersionId: a.id(),
|
|
1730
1795
|
versionState: a.string().required(),
|
|
@@ -1737,6 +1802,7 @@ const schema = a.schema({
|
|
|
1737
1802
|
typeStatus: a.string().required(),
|
|
1738
1803
|
stage: a.string(),
|
|
1739
1804
|
slug: a.string().required(),
|
|
1805
|
+
tenantSlug: a.string(),
|
|
1740
1806
|
shortSlug: a.string(),
|
|
1741
1807
|
section: a.string(),
|
|
1742
1808
|
sectionStatus: a.string(),
|
|
@@ -1764,6 +1830,7 @@ const schema = a.schema({
|
|
|
1764
1830
|
.secondaryIndexes((index) => [
|
|
1765
1831
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1766
1832
|
index("slug").queryField("itemBySlug"),
|
|
1833
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1767
1834
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1768
1835
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1769
1836
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1814,6 +1881,7 @@ const schema = a.schema({
|
|
|
1814
1881
|
.model({
|
|
1815
1882
|
id: a.id().required(),
|
|
1816
1883
|
itemId: a.id().required(),
|
|
1884
|
+
tenantId: a.string(),
|
|
1817
1885
|
type: a.string().required(),
|
|
1818
1886
|
role: a.string().required(),
|
|
1819
1887
|
sortKey: a.string().required(),
|
|
@@ -1930,11 +1998,13 @@ const schema = a.schema({
|
|
|
1930
1998
|
id: a.id().required(),
|
|
1931
1999
|
sourceItemId: a.id().required(),
|
|
1932
2000
|
itemLineageId: a.id().required(),
|
|
2001
|
+
tenantId: a.string(),
|
|
1933
2002
|
versionNumber: a.integer().required(),
|
|
1934
2003
|
type: a.string().required(),
|
|
1935
2004
|
status: a.string().required(),
|
|
1936
2005
|
typeStatus: a.string().required(),
|
|
1937
2006
|
slug: a.string().required(),
|
|
2007
|
+
tenantSlug: a.string(),
|
|
1938
2008
|
shortSlug: a.string(),
|
|
1939
2009
|
section: a.string(),
|
|
1940
2010
|
sectionStatus: a.string(),
|
|
@@ -1957,6 +2027,7 @@ const schema = a.schema({
|
|
|
1957
2027
|
})
|
|
1958
2028
|
.secondaryIndexes((index) => [
|
|
1959
2029
|
index("slug").queryField("publishedItemBySlug"),
|
|
2030
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1960
2031
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1961
2032
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1962
2033
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1970,6 +2041,7 @@ const schema = a.schema({
|
|
|
1970
2041
|
.model({
|
|
1971
2042
|
id: a.id().required(),
|
|
1972
2043
|
sourceMediaAssetId: a.id().required(),
|
|
2044
|
+
tenantId: a.string(),
|
|
1973
2045
|
publishedItemId: a.id().required(),
|
|
1974
2046
|
sourceItemId: a.id().required(),
|
|
1975
2047
|
itemLineageId: a.id().required(),
|
package/amplify/data/schema.js
CHANGED
|
@@ -203,6 +203,15 @@ const baseDefinitions = {
|
|
|
203
203
|
.returns(a.ref("SteeringActionResult"))
|
|
204
204
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
205
205
|
.handler(a.handler.function(categoryAction)),
|
|
206
|
+
CurationDelegationResult: a.customType({
|
|
207
|
+
ok: a.boolean().required(),
|
|
208
|
+
delegationId: a.id().required(),
|
|
209
|
+
token: a.string(),
|
|
210
|
+
agentLabel: a.string().required(),
|
|
211
|
+
grantorLabel: a.string(),
|
|
212
|
+
expiresAt: a.datetime().required(),
|
|
213
|
+
revokedAt: a.datetime(),
|
|
214
|
+
}),
|
|
206
215
|
ReferenceCurationActionResult: a.customType({
|
|
207
216
|
ok: a.boolean().required(),
|
|
208
217
|
action: a.string().required(),
|
|
@@ -253,6 +262,54 @@ const baseDefinitions = {
|
|
|
253
262
|
allow.groups(categoryWriteGroups),
|
|
254
263
|
])
|
|
255
264
|
.handler(a.handler.function(categoryAction)),
|
|
265
|
+
createCurationDelegation: a
|
|
266
|
+
.mutation()
|
|
267
|
+
.arguments({
|
|
268
|
+
agentLabel: a.string().required(),
|
|
269
|
+
hours: a.integer(),
|
|
270
|
+
})
|
|
271
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
272
|
+
.authorization((allow) => [
|
|
273
|
+
allow.groups(categoryWriteGroups),
|
|
274
|
+
])
|
|
275
|
+
.handler(a.handler.function(categoryAction)),
|
|
276
|
+
revokeCurationDelegation: a
|
|
277
|
+
.mutation()
|
|
278
|
+
.arguments({
|
|
279
|
+
delegationId: a.id().required(),
|
|
280
|
+
})
|
|
281
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
282
|
+
.authorization((allow) => [
|
|
283
|
+
allow.groups(categoryWriteGroups),
|
|
284
|
+
])
|
|
285
|
+
.handler(a.handler.function(categoryAction)),
|
|
286
|
+
listCurationDelegations: a
|
|
287
|
+
.query()
|
|
288
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
289
|
+
.authorization((allow) => [
|
|
290
|
+
allow.groups(categoryWriteGroups),
|
|
291
|
+
])
|
|
292
|
+
.handler(a.handler.function(categoryAction)),
|
|
293
|
+
recordDelegatedCuration: a
|
|
294
|
+
.mutation()
|
|
295
|
+
.arguments({
|
|
296
|
+
referenceId: a.id().required(),
|
|
297
|
+
action: a.string().required(),
|
|
298
|
+
delegationId: a.id().required(),
|
|
299
|
+
delegationToken: a.string().required(),
|
|
300
|
+
agentLabel: a.string().required(),
|
|
301
|
+
onBehalfOf: a.string().required(),
|
|
302
|
+
instruction: a.string().required(),
|
|
303
|
+
note: a.string(),
|
|
304
|
+
reasonCode: a.string(),
|
|
305
|
+
decisionRelationId: a.id(),
|
|
306
|
+
shareable: a.boolean(),
|
|
307
|
+
})
|
|
308
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
309
|
+
.authorization((allow) => [
|
|
310
|
+
allow.authenticated("identityPool"),
|
|
311
|
+
])
|
|
312
|
+
.handler(a.handler.function(categoryAction)),
|
|
256
313
|
setReferenceQualityRating: a
|
|
257
314
|
.mutation()
|
|
258
315
|
.arguments({
|
|
@@ -918,6 +975,7 @@ const baseDefinitions = {
|
|
|
918
975
|
]),
|
|
919
976
|
NewsroomSection: modelWithoutSubscriptions({
|
|
920
977
|
id: a.id().required(),
|
|
978
|
+
tenantId: a.string(),
|
|
921
979
|
title: a.string().required(),
|
|
922
980
|
type: a.string().required(),
|
|
923
981
|
editorialMission: a.string().required(),
|
|
@@ -936,6 +994,7 @@ const baseDefinitions = {
|
|
|
936
994
|
})
|
|
937
995
|
.secondaryIndexes((index) => [
|
|
938
996
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
997
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
939
998
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
940
999
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
941
1000
|
])
|
|
@@ -1503,6 +1562,7 @@ const baseDefinitions = {
|
|
|
1503
1562
|
Item: modelWithoutSubscriptions({
|
|
1504
1563
|
id: a.id().required(),
|
|
1505
1564
|
lineageId: a.id().required(),
|
|
1565
|
+
tenantId: a.string(),
|
|
1506
1566
|
versionNumber: a.integer().required(),
|
|
1507
1567
|
previousVersionId: a.id(),
|
|
1508
1568
|
versionState: a.string().required(),
|
|
@@ -1515,6 +1575,7 @@ const baseDefinitions = {
|
|
|
1515
1575
|
status: a.string().required(),
|
|
1516
1576
|
typeStatus: a.string().required(),
|
|
1517
1577
|
slug: a.string().required(),
|
|
1578
|
+
tenantSlug: a.string(),
|
|
1518
1579
|
shortSlug: a.string(),
|
|
1519
1580
|
section: a.string(),
|
|
1520
1581
|
sectionStatus: a.string(),
|
|
@@ -1542,6 +1603,7 @@ const baseDefinitions = {
|
|
|
1542
1603
|
.secondaryIndexes((index) => [
|
|
1543
1604
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1544
1605
|
index("slug").queryField("itemBySlug"),
|
|
1606
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1545
1607
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1546
1608
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1547
1609
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1586,6 +1648,7 @@ const baseDefinitions = {
|
|
|
1586
1648
|
MediaAsset: modelWithoutSubscriptions({
|
|
1587
1649
|
id: a.id().required(),
|
|
1588
1650
|
itemId: a.id().required(),
|
|
1651
|
+
tenantId: a.string(),
|
|
1589
1652
|
type: a.string().required(),
|
|
1590
1653
|
role: a.string().required(),
|
|
1591
1654
|
sortKey: a.string().required(),
|
|
@@ -1669,11 +1732,13 @@ const baseDefinitions = {
|
|
|
1669
1732
|
id: a.id().required(),
|
|
1670
1733
|
sourceItemId: a.id().required(),
|
|
1671
1734
|
itemLineageId: a.id().required(),
|
|
1735
|
+
tenantId: a.string(),
|
|
1672
1736
|
versionNumber: a.integer().required(),
|
|
1673
1737
|
type: a.string().required(),
|
|
1674
1738
|
status: a.string().required(),
|
|
1675
1739
|
typeStatus: a.string().required(),
|
|
1676
1740
|
slug: a.string().required(),
|
|
1741
|
+
tenantSlug: a.string(),
|
|
1677
1742
|
shortSlug: a.string(),
|
|
1678
1743
|
section: a.string(),
|
|
1679
1744
|
sectionStatus: a.string(),
|
|
@@ -1696,6 +1761,7 @@ const baseDefinitions = {
|
|
|
1696
1761
|
})
|
|
1697
1762
|
.secondaryIndexes((index) => [
|
|
1698
1763
|
index("slug").queryField("publishedItemBySlug"),
|
|
1764
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1699
1765
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1700
1766
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1701
1767
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1707,6 +1773,7 @@ const baseDefinitions = {
|
|
|
1707
1773
|
PublishedMediaAsset: modelWithoutSubscriptions({
|
|
1708
1774
|
id: a.id().required(),
|
|
1709
1775
|
sourceMediaAssetId: a.id().required(),
|
|
1776
|
+
tenantId: a.string(),
|
|
1710
1777
|
publishedItemId: a.id().required(),
|
|
1711
1778
|
sourceItemId: a.id().required(),
|
|
1712
1779
|
itemLineageId: a.id().required(),
|
package/amplify/data/schema.ts
CHANGED
|
@@ -222,6 +222,16 @@ const baseDefinitions = {
|
|
|
222
222
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
223
223
|
.handler(a.handler.function(categoryAction)),
|
|
224
224
|
|
|
225
|
+
CurationDelegationResult: a.customType({
|
|
226
|
+
ok: a.boolean().required(),
|
|
227
|
+
delegationId: a.id().required(),
|
|
228
|
+
token: a.string(),
|
|
229
|
+
agentLabel: a.string().required(),
|
|
230
|
+
grantorLabel: a.string(),
|
|
231
|
+
expiresAt: a.datetime().required(),
|
|
232
|
+
revokedAt: a.datetime(),
|
|
233
|
+
}),
|
|
234
|
+
|
|
225
235
|
ReferenceCurationActionResult: a.customType({
|
|
226
236
|
ok: a.boolean().required(),
|
|
227
237
|
action: a.string().required(),
|
|
@@ -277,6 +287,58 @@ const baseDefinitions = {
|
|
|
277
287
|
])
|
|
278
288
|
.handler(a.handler.function(categoryAction)),
|
|
279
289
|
|
|
290
|
+
createCurationDelegation: a
|
|
291
|
+
.mutation()
|
|
292
|
+
.arguments({
|
|
293
|
+
agentLabel: a.string().required(),
|
|
294
|
+
hours: a.integer(),
|
|
295
|
+
})
|
|
296
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
297
|
+
.authorization((allow) => [
|
|
298
|
+
allow.groups(categoryWriteGroups),
|
|
299
|
+
])
|
|
300
|
+
.handler(a.handler.function(categoryAction)),
|
|
301
|
+
|
|
302
|
+
revokeCurationDelegation: a
|
|
303
|
+
.mutation()
|
|
304
|
+
.arguments({
|
|
305
|
+
delegationId: a.id().required(),
|
|
306
|
+
})
|
|
307
|
+
.returns(a.ref("CurationDelegationResult"))
|
|
308
|
+
.authorization((allow) => [
|
|
309
|
+
allow.groups(categoryWriteGroups),
|
|
310
|
+
])
|
|
311
|
+
.handler(a.handler.function(categoryAction)),
|
|
312
|
+
|
|
313
|
+
listCurationDelegations: a
|
|
314
|
+
.query()
|
|
315
|
+
.returns(a.ref("CurationDelegationResult").array())
|
|
316
|
+
.authorization((allow) => [
|
|
317
|
+
allow.groups(categoryWriteGroups),
|
|
318
|
+
])
|
|
319
|
+
.handler(a.handler.function(categoryAction)),
|
|
320
|
+
|
|
321
|
+
recordDelegatedCuration: a
|
|
322
|
+
.mutation()
|
|
323
|
+
.arguments({
|
|
324
|
+
referenceId: a.id().required(),
|
|
325
|
+
action: a.string().required(),
|
|
326
|
+
delegationId: a.id().required(),
|
|
327
|
+
delegationToken: a.string().required(),
|
|
328
|
+
agentLabel: a.string().required(),
|
|
329
|
+
onBehalfOf: a.string().required(),
|
|
330
|
+
instruction: a.string().required(),
|
|
331
|
+
note: a.string(),
|
|
332
|
+
reasonCode: a.string(),
|
|
333
|
+
decisionRelationId: a.id(),
|
|
334
|
+
shareable: a.boolean(),
|
|
335
|
+
})
|
|
336
|
+
.returns(a.ref("ReferenceCurationActionResult"))
|
|
337
|
+
.authorization((allow) => [
|
|
338
|
+
allow.authenticated("identityPool"),
|
|
339
|
+
])
|
|
340
|
+
.handler(a.handler.function(categoryAction)),
|
|
341
|
+
|
|
280
342
|
setReferenceQualityRating: a
|
|
281
343
|
.mutation()
|
|
282
344
|
.arguments({
|
|
@@ -994,6 +1056,7 @@ const baseDefinitions = {
|
|
|
994
1056
|
|
|
995
1057
|
NewsroomSection: modelWithoutSubscriptions({
|
|
996
1058
|
id: a.id().required(),
|
|
1059
|
+
tenantId: a.string(),
|
|
997
1060
|
title: a.string().required(),
|
|
998
1061
|
type: a.string().required(),
|
|
999
1062
|
editorialMission: a.string().required(),
|
|
@@ -1012,6 +1075,7 @@ const baseDefinitions = {
|
|
|
1012
1075
|
})
|
|
1013
1076
|
.secondaryIndexes((index) => [
|
|
1014
1077
|
index("sortOrder").sortKeys(["id"]).queryField("listNewsroomSectionsBySortOrder"),
|
|
1078
|
+
index("tenantId").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTenantAndSortOrder"),
|
|
1015
1079
|
index("type").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByTypeAndSortOrder"),
|
|
1016
1080
|
index("enabledStatus").sortKeys(["sortOrder"]).queryField("listNewsroomSectionsByEnabledStatusAndSortOrder"),
|
|
1017
1081
|
])
|
|
@@ -1598,6 +1662,7 @@ const baseDefinitions = {
|
|
|
1598
1662
|
Item: modelWithoutSubscriptions({
|
|
1599
1663
|
id: a.id().required(),
|
|
1600
1664
|
lineageId: a.id().required(),
|
|
1665
|
+
tenantId: a.string(),
|
|
1601
1666
|
versionNumber: a.integer().required(),
|
|
1602
1667
|
previousVersionId: a.id(),
|
|
1603
1668
|
versionState: a.string().required(),
|
|
@@ -1610,6 +1675,7 @@ const baseDefinitions = {
|
|
|
1610
1675
|
status: a.string().required(),
|
|
1611
1676
|
typeStatus: a.string().required(),
|
|
1612
1677
|
slug: a.string().required(),
|
|
1678
|
+
tenantSlug: a.string(),
|
|
1613
1679
|
shortSlug: a.string(),
|
|
1614
1680
|
section: a.string(),
|
|
1615
1681
|
sectionStatus: a.string(),
|
|
@@ -1637,6 +1703,7 @@ const baseDefinitions = {
|
|
|
1637
1703
|
.secondaryIndexes((index) => [
|
|
1638
1704
|
index("lineageId").sortKeys(["versionNumber"]).queryField("listItemsByLineageAndVersion"),
|
|
1639
1705
|
index("slug").queryField("itemBySlug"),
|
|
1706
|
+
index("tenantSlug").queryField("itemByTenantSlug"),
|
|
1640
1707
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
|
|
1641
1708
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
|
|
1642
1709
|
index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
|
|
@@ -1684,6 +1751,7 @@ const baseDefinitions = {
|
|
|
1684
1751
|
MediaAsset: modelWithoutSubscriptions({
|
|
1685
1752
|
id: a.id().required(),
|
|
1686
1753
|
itemId: a.id().required(),
|
|
1754
|
+
tenantId: a.string(),
|
|
1687
1755
|
type: a.string().required(),
|
|
1688
1756
|
role: a.string().required(),
|
|
1689
1757
|
sortKey: a.string().required(),
|
|
@@ -1770,11 +1838,13 @@ const baseDefinitions = {
|
|
|
1770
1838
|
id: a.id().required(),
|
|
1771
1839
|
sourceItemId: a.id().required(),
|
|
1772
1840
|
itemLineageId: a.id().required(),
|
|
1841
|
+
tenantId: a.string(),
|
|
1773
1842
|
versionNumber: a.integer().required(),
|
|
1774
1843
|
type: a.string().required(),
|
|
1775
1844
|
status: a.string().required(),
|
|
1776
1845
|
typeStatus: a.string().required(),
|
|
1777
1846
|
slug: a.string().required(),
|
|
1847
|
+
tenantSlug: a.string(),
|
|
1778
1848
|
shortSlug: a.string(),
|
|
1779
1849
|
section: a.string(),
|
|
1780
1850
|
sectionStatus: a.string(),
|
|
@@ -1797,6 +1867,7 @@ const baseDefinitions = {
|
|
|
1797
1867
|
})
|
|
1798
1868
|
.secondaryIndexes((index) => [
|
|
1799
1869
|
index("slug").queryField("publishedItemBySlug"),
|
|
1870
|
+
index("tenantSlug").queryField("publishedItemByTenantSlug"),
|
|
1800
1871
|
index("typeStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsByTypeStatusAndPublishedAt"),
|
|
1801
1872
|
index("sectionStatus").sortKeys(["publishedAt"]).queryField("listPublishedItemsBySectionStatusAndPublishedAt"),
|
|
1802
1873
|
index("itemLineageId").sortKeys(["versionNumber"]).queryField("listPublishedItemsByLineageAndVersion"),
|
|
@@ -1809,6 +1880,7 @@ const baseDefinitions = {
|
|
|
1809
1880
|
PublishedMediaAsset: modelWithoutSubscriptions({
|
|
1810
1881
|
id: a.id().required(),
|
|
1811
1882
|
sourceMediaAssetId: a.id().required(),
|
|
1883
|
+
tenantId: a.string(),
|
|
1812
1884
|
publishedItemId: a.id().required(),
|
|
1813
1885
|
sourceItemId: a.id().required(),
|
|
1814
1886
|
itemLineageId: a.id().required(),
|