@anthusai/papyrus 2.0.0-next.4 → 2.0.0-next.41
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 +23 -3
- package/amplify/data/resource.ts +25 -3
- package/amplify/data/schema.js +2030 -1967
- package/amplify/data/schema.ts +73 -2
- package/amplify/functions/assignment-action/data-access.js +88 -0
- package/amplify/functions/assignment-action/data-access.ts +87 -0
- package/amplify/functions/assignment-action/handler.ts +1 -1
- package/amplify/functions/content-actions/handler.py +36 -0
- package/amplify/functions/content-actions/requirements.txt +1 -0
- package/amplify/functions/content-actions/resource.js +1 -1
- package/amplify/functions/content-actions/resource.ts +1 -1
- package/amplify/functions/editorial-checks/handler.py +14 -0
- package/amplify/functions/editorial-checks/requirements.txt +1 -0
- package/amplify/functions/editorial-checks/resource.js +43 -0
- package/amplify/functions/editorial-checks/resource.ts +60 -0
- package/amplify/functions/editorial-checks/schema.js +121 -0
- package/amplify/functions/editorial-checks/schema.ts +123 -0
- package/amplify/functions/editorial-checks/wire.js +53 -0
- package/amplify/functions/editorial-checks/wire.ts +61 -0
- package/amplify/functions/monitoring-view/handler.py +11 -0
- package/amplify/functions/monitoring-view/resource.js +24 -0
- package/amplify/functions/monitoring-view/resource.ts +34 -0
- package/amplify/functions/monitoring-view/schema.js +16 -0
- package/amplify/functions/monitoring-view/schema.ts +18 -0
- package/amplify/functions/monitoring-view/wire.js +37 -0
- package/amplify/functions/monitoring-view/wire.ts +47 -0
- package/amplify/functions/public-forms/core.js +247 -0
- package/amplify/functions/public-forms/core.ts +310 -0
- package/amplify/functions/public-forms/handler.ts +41 -0
- package/amplify/functions/public-forms/origins.js +35 -0
- package/amplify/functions/public-forms/origins.ts +43 -0
- package/amplify/functions/public-forms/resource.js +9 -0
- package/amplify/functions/public-forms/resource.ts +10 -0
- package/amplify/functions/public-forms/wire.js +25 -0
- package/amplify/functions/public-forms/wire.ts +32 -0
- package/amplify/functions/shared/editorial-context.ts +9 -3
- package/amplify/functions/shared/python-bundle.js +20 -14
- package/amplify/functions/shared/python-bundle.ts +25 -18
- package/amplify/plugins/reader-steering/config.js +110 -0
- package/amplify/plugins/reader-steering/config.ts +153 -0
- package/amplify/plugins/reader-steering/function/handler.py +544 -0
- package/amplify/plugins/reader-steering/function/resource.js +27 -0
- package/amplify/plugins/reader-steering/function/resource.ts +35 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.js +103 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.ts +122 -0
- package/amplify/plugins/reader-steering/schema.js +40 -0
- package/amplify/plugins/reader-steering/schema.ts +42 -0
- package/amplify/plugins/registry.js +2 -0
- package/amplify/plugins/registry.ts +2 -0
- package/amplify/plugins/types.ts +3 -0
- package/amplify/plugins/wire.js +1 -0
- package/amplify/plugins/wire.ts +1 -0
- package/amplify/publication/redirect-and-index.js +105 -0
- package/amplify/publication/redirect-rules.js +73 -0
- package/amplify/publication/redirect-rules.ts +93 -0
- package/amplify/publication/s3-projection.js +7 -1
- package/amplify/publication/s3-projection.ts +9 -1
- package/amplify/site-backend-config.ts +17 -0
- package/amplify/site-backend.js +36 -1
- package/amplify/site-backend.ts +44 -1
- package/app/api/newsroom/curation/context/route.ts +9 -0
- package/app/api/newsroom/curation/priming/route.ts +9 -0
- package/app/api/newsroom/curation/publication/route.ts +9 -0
- package/app/api/reader/handle/route.ts +9 -0
- package/app/api/reader/me/route.ts +9 -0
- package/app/api/reader/rating/route.ts +9 -0
- package/app/api/reader/retired/route.ts +9 -0
- package/app/api/reader/vote/route.ts +9 -0
- package/bin/papyrus-infra.mjs +20 -1
- package/components/editorial-checks-admin-panel.tsx +362 -0
- package/components/editorial-finding-card.tsx +162 -0
- package/components/editorial-findings-panel.tsx +91 -0
- package/components/editorial-preview-popover.tsx +103 -0
- package/components/markus-body-editor.tsx +213 -0
- package/components/markus-ir-preview.tsx +147 -6
- package/components/monitoring-overview-view.tsx +241 -0
- package/components/monitoring-panel.tsx +40 -0
- package/components/newsroom-article-editor.tsx +136 -11
- package/components/newsroom-board-view.tsx +6 -7
- package/components/newsroom-curation-bootstrap.tsx +45 -0
- package/components/newsroom-ops-shell.tsx +7 -3
- package/components/newsroom-organizer.css +74 -61
- package/components/newsroom-references-view.tsx +14 -14
- package/components/newsroom-theme-fonts/broadsheet-green.css +10 -0
- package/components/newsroom-theme-fonts/broadsheet-green.tsx +6 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.css +9 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.tsx +6 -0
- package/components/newsroom-theme-fonts/night-desk.css +10 -0
- package/components/newsroom-theme-fonts/night-desk.tsx +6 -0
- package/components/newsroom-theme-fonts/refined-newsprint.css +11 -0
- package/components/newsroom-theme-fonts/refined-newsprint.tsx +6 -0
- package/components/newsroom-theme.css +39 -0
- package/components/newsroom-theme.tsx +33 -0
- package/components/publication-cyclotron-panel.tsx +15 -10
- package/components/reference-add-entry.tsx +75 -0
- package/components/reference-curation-controls.tsx +31 -22
- package/components/reference-cyclotron-priming.tsx +58 -19
- package/components/reference-cyclotron-suggestion.tsx +1 -1
- package/components/reference-priming.tsx +14 -10
- package/components/reference-section-suggestion.tsx +1 -1
- package/components/topic-steering-workspace.tsx +27 -2
- package/components/use-editorial-checks.ts +133 -0
- package/infra/amplify-app-shell.js +90 -16
- package/infra/amplify-app-shell.ts +102 -18
- package/infra/index.js +1 -0
- package/infra/secure-string-parameter-handler.js +41 -0
- package/infra/secure-string-parameter-handler.ts +41 -0
- package/infra/secure-string-parameter.js +79 -0
- package/infra/secure-string-parameter.ts +91 -0
- package/infra/site-config.js +85 -6
- package/infra/site-config.ts +123 -6
- package/lib/category-repository.ts +11 -9
- package/lib/curation-routes.ts +345 -0
- package/lib/editorial-checks-backend.ts +16 -0
- package/lib/editorial-checks-client.ts +212 -0
- package/lib/editorial-checks-demo.ts +147 -0
- package/lib/editorial-checks-settings.ts +27 -0
- package/lib/editorial-checks.ts +173 -0
- package/lib/editorial-preview.ts +228 -0
- package/lib/monitoring-client.ts +29 -0
- package/lib/monitoring-overview-fixture.ts +51 -0
- package/lib/monitoring-overview.ts +145 -0
- package/lib/newsroom-board.ts +27 -2
- package/lib/prospectus-session.ts +15 -14
- package/lib/prospectus-sign-in-routes.ts +54 -13
- package/lib/prospectus-site-identity.ts +24 -1
- package/lib/reader-api.ts +143 -0
- package/lib/reader-retirement-route.ts +89 -0
- package/lib/reader-subject.md +29 -0
- package/lib/reader-subject.ts +53 -0
- package/lib/relevance-status.ts +2 -2
- package/lib/site-brand-tenant.ts +11 -6
- package/lib/site-brand.ts +23 -3
- package/lib/site-origin.ts +67 -0
- package/middleware.ts +14 -3
- package/package.json +56 -4
- package/routes.manifest.json +89 -1
- package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-OFL.txt +0 -93
- package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +0 -93
- package/components/newsroom-newsprint-board.css +0 -7
package/amplify/data/resource.js
CHANGED
|
@@ -6,13 +6,14 @@ import { knowledgeQuery } from "../functions/knowledge-query/resource.js";
|
|
|
6
6
|
import { manageUserRole } from "../functions/manage-user-role/resource.js";
|
|
7
7
|
import { modelAttachmentUpload } from "../functions/model-attachment-upload/resource.js";
|
|
8
8
|
import { newsroomSummary } from "../functions/newsroom-summary/resource.js";
|
|
9
|
+
import { publicForms } from "../functions/public-forms/resource.js";
|
|
9
10
|
import { procedureAction } from "../functions/procedure-action/resource.js";
|
|
10
11
|
import { readerSettings } from "../functions/reader-settings/resource.js";
|
|
11
12
|
import { emailSubmissionProcessor } from "../functions/email-submission-processor/resource.js";
|
|
12
13
|
import { sesInboundReceive } from "../functions/ses-inbound-receive/resource.js";
|
|
13
14
|
import { slackDelivery } from "../functions/slack-delivery/resource.js";
|
|
14
15
|
import { slackEvents } from "../functions/slack-events/resource.js";
|
|
15
|
-
import { schema as leanSchema, schemaWithPlugins } from "./schema.js";
|
|
16
|
+
import { assertKnownModelGroups, schema as leanSchema, schemaExcludingGroups, schemaWithPlugins } from "./schema.js";
|
|
16
17
|
const authoringOperations = [
|
|
17
18
|
"read",
|
|
18
19
|
"create",
|
|
@@ -589,6 +590,12 @@ const schema = a.schema({
|
|
|
589
590
|
.returns(a.json())
|
|
590
591
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
591
592
|
.handler(a.handler.function(contentActions)),
|
|
593
|
+
intakePendingReferences: a
|
|
594
|
+
.mutation()
|
|
595
|
+
.arguments({ input: a.json().required() })
|
|
596
|
+
.returns(a.json())
|
|
597
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
598
|
+
.handler(a.handler.function(contentActions)),
|
|
592
599
|
saveItemDraft: a
|
|
593
600
|
.mutation()
|
|
594
601
|
.arguments({ input: a.json().required() })
|
|
@@ -601,6 +608,12 @@ const schema = a.schema({
|
|
|
601
608
|
.returns(a.json())
|
|
602
609
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
603
610
|
.handler(a.handler.function(contentActions)),
|
|
611
|
+
moveStoryStage: a
|
|
612
|
+
.mutation()
|
|
613
|
+
.arguments({ input: a.json().required() })
|
|
614
|
+
.returns(a.json())
|
|
615
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
616
|
+
.handler(a.handler.function(contentActions)),
|
|
604
617
|
unpublishItem: a
|
|
605
618
|
.mutation()
|
|
606
619
|
.arguments({ input: a.json().required() })
|
|
@@ -843,6 +856,7 @@ const schema = a.schema({
|
|
|
843
856
|
storyLineageId: a.id(),
|
|
844
857
|
assignmentId: a.id(),
|
|
845
858
|
maxCharacters: a.integer(),
|
|
859
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
846
860
|
})
|
|
847
861
|
.returns(a.json().required())
|
|
848
862
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
@@ -2146,12 +2160,14 @@ const schema = a.schema({
|
|
|
2146
2160
|
allow.groups(contentWriteGroups),
|
|
2147
2161
|
]),
|
|
2148
2162
|
}).authorization((allow) => [
|
|
2163
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2149
2164
|
allow.resource(categoryAction),
|
|
2150
2165
|
allow.resource(contentActions),
|
|
2151
2166
|
allow.resource(manageUserRole),
|
|
2152
2167
|
allow.resource(modelAttachmentUpload),
|
|
2153
2168
|
allow.resource(newsroomSummary),
|
|
2154
2169
|
allow.resource(procedureAction),
|
|
2170
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2155
2171
|
allow.resource(sesInboundReceive),
|
|
2156
2172
|
allow.resource(emailSubmissionProcessor),
|
|
2157
2173
|
allow.resource(slackEvents),
|
|
@@ -2161,10 +2177,14 @@ const schema = a.schema({
|
|
|
2161
2177
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2162
2178
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2163
2179
|
*/
|
|
2164
|
-
export function defineSiteData(pluginDefinitions = {}) {
|
|
2180
|
+
export function defineSiteData(pluginDefinitions = {}, excludeModelGroups = []) {
|
|
2181
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2182
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2165
2183
|
return defineData({
|
|
2166
2184
|
name: "PapyrusCmsApi",
|
|
2167
|
-
schema:
|
|
2185
|
+
schema: excludeModelGroups.length > 0
|
|
2186
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2187
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2168
2188
|
authorizationModes: {
|
|
2169
2189
|
defaultAuthorizationMode: "userPool",
|
|
2170
2190
|
apiKeyAuthorizationMode: {
|
package/amplify/data/resource.ts
CHANGED
|
@@ -6,13 +6,14 @@ import { knowledgeQuery } from "../functions/knowledge-query/resource";
|
|
|
6
6
|
import { manageUserRole } from "../functions/manage-user-role/resource";
|
|
7
7
|
import { modelAttachmentUpload } from "../functions/model-attachment-upload/resource";
|
|
8
8
|
import { newsroomSummary } from "../functions/newsroom-summary/resource";
|
|
9
|
+
import { publicForms } from "../functions/public-forms/resource";
|
|
9
10
|
import { procedureAction } from "../functions/procedure-action/resource";
|
|
10
11
|
import { readerSettings } from "../functions/reader-settings/resource";
|
|
11
12
|
import { emailSubmissionProcessor } from "../functions/email-submission-processor/resource";
|
|
12
13
|
import { sesInboundReceive } from "../functions/ses-inbound-receive/resource";
|
|
13
14
|
import { slackDelivery } from "../functions/slack-delivery/resource";
|
|
14
15
|
import { slackEvents } from "../functions/slack-events/resource";
|
|
15
|
-
import { schema as leanSchema, schemaWithPlugins } from "./schema";
|
|
16
|
+
import { assertKnownModelGroups, schema as leanSchema, schemaExcludingGroups, schemaWithPlugins } from "./schema";
|
|
16
17
|
const authoringOperations: ("read" | "create" | "update" | "delete")[] = [
|
|
17
18
|
"read",
|
|
18
19
|
"create",
|
|
@@ -641,6 +642,13 @@ const schema = a.schema({
|
|
|
641
642
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
642
643
|
.handler(a.handler.function(contentActions)),
|
|
643
644
|
|
|
645
|
+
intakePendingReferences: a
|
|
646
|
+
.mutation()
|
|
647
|
+
.arguments({ input: a.json().required() })
|
|
648
|
+
.returns(a.json())
|
|
649
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
650
|
+
.handler(a.handler.function(contentActions)),
|
|
651
|
+
|
|
644
652
|
saveItemDraft: a
|
|
645
653
|
.mutation()
|
|
646
654
|
.arguments({ input: a.json().required() })
|
|
@@ -655,6 +663,13 @@ const schema = a.schema({
|
|
|
655
663
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
656
664
|
.handler(a.handler.function(contentActions)),
|
|
657
665
|
|
|
666
|
+
moveStoryStage: a
|
|
667
|
+
.mutation()
|
|
668
|
+
.arguments({ input: a.json().required() })
|
|
669
|
+
.returns(a.json())
|
|
670
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
671
|
+
.handler(a.handler.function(contentActions)),
|
|
672
|
+
|
|
658
673
|
unpublishItem: a
|
|
659
674
|
.mutation()
|
|
660
675
|
.arguments({ input: a.json().required() })
|
|
@@ -916,6 +931,7 @@ const schema = a.schema({
|
|
|
916
931
|
storyLineageId: a.id(),
|
|
917
932
|
assignmentId: a.id(),
|
|
918
933
|
maxCharacters: a.integer(),
|
|
934
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
919
935
|
})
|
|
920
936
|
.returns(a.json().required())
|
|
921
937
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
@@ -2271,12 +2287,14 @@ const schema = a.schema({
|
|
|
2271
2287
|
allow.groups(contentWriteGroups),
|
|
2272
2288
|
]),
|
|
2273
2289
|
}).authorization((allow) => [
|
|
2290
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2274
2291
|
allow.resource(categoryAction),
|
|
2275
2292
|
allow.resource(contentActions),
|
|
2276
2293
|
allow.resource(manageUserRole),
|
|
2277
2294
|
allow.resource(modelAttachmentUpload),
|
|
2278
2295
|
allow.resource(newsroomSummary),
|
|
2279
2296
|
allow.resource(procedureAction),
|
|
2297
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2280
2298
|
allow.resource(sesInboundReceive),
|
|
2281
2299
|
allow.resource(emailSubmissionProcessor),
|
|
2282
2300
|
allow.resource(slackEvents),
|
|
@@ -2289,10 +2307,14 @@ export type Schema = ClientSchema<typeof schema>;
|
|
|
2289
2307
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2290
2308
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2291
2309
|
*/
|
|
2292
|
-
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}) {
|
|
2310
|
+
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}, excludeModelGroups: readonly string[] = []) {
|
|
2311
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2312
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2293
2313
|
return defineData({
|
|
2294
2314
|
name: "PapyrusCmsApi",
|
|
2295
|
-
schema:
|
|
2315
|
+
schema: excludeModelGroups.length > 0
|
|
2316
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2317
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2296
2318
|
authorizationModes: {
|
|
2297
2319
|
defaultAuthorizationMode: "userPool",
|
|
2298
2320
|
apiKeyAuthorizationMode: {
|