@anthusai/papyrus 2.0.0-next.4 → 2.0.0-next.40
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 +22 -3
- package/amplify/data/resource.ts +24 -3
- package/amplify/data/schema.js +2029 -1967
- package/amplify/data/schema.ts +72 -2
- package/amplify/functions/assignment-action/data-access.js +88 -0
- package/amplify/functions/assignment-action/data-access.ts +87 -0
- package/amplify/functions/content-actions/handler.py +33 -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/python-bundle.js +20 -14
- package/amplify/functions/shared/python-bundle.ts +25 -18
- 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/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 +4 -4
- 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 +76 -16
- package/infra/amplify-app-shell.ts +86 -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 +75 -6
- package/infra/site-config.ts +106 -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 +171 -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 +14 -14
- package/lib/prospectus-sign-in-routes.ts +52 -11
- 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 +48 -4
- package/routes.manifest.json +34 -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() })
|
|
@@ -2146,12 +2159,14 @@ const schema = a.schema({
|
|
|
2146
2159
|
allow.groups(contentWriteGroups),
|
|
2147
2160
|
]),
|
|
2148
2161
|
}).authorization((allow) => [
|
|
2162
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2149
2163
|
allow.resource(categoryAction),
|
|
2150
2164
|
allow.resource(contentActions),
|
|
2151
2165
|
allow.resource(manageUserRole),
|
|
2152
2166
|
allow.resource(modelAttachmentUpload),
|
|
2153
2167
|
allow.resource(newsroomSummary),
|
|
2154
2168
|
allow.resource(procedureAction),
|
|
2169
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2155
2170
|
allow.resource(sesInboundReceive),
|
|
2156
2171
|
allow.resource(emailSubmissionProcessor),
|
|
2157
2172
|
allow.resource(slackEvents),
|
|
@@ -2161,10 +2176,14 @@ const schema = a.schema({
|
|
|
2161
2176
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2162
2177
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2163
2178
|
*/
|
|
2164
|
-
export function defineSiteData(pluginDefinitions = {}) {
|
|
2179
|
+
export function defineSiteData(pluginDefinitions = {}, excludeModelGroups = []) {
|
|
2180
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2181
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2165
2182
|
return defineData({
|
|
2166
2183
|
name: "PapyrusCmsApi",
|
|
2167
|
-
schema:
|
|
2184
|
+
schema: excludeModelGroups.length > 0
|
|
2185
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2186
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2168
2187
|
authorizationModes: {
|
|
2169
2188
|
defaultAuthorizationMode: "userPool",
|
|
2170
2189
|
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() })
|
|
@@ -2271,12 +2286,14 @@ const schema = a.schema({
|
|
|
2271
2286
|
allow.groups(contentWriteGroups),
|
|
2272
2287
|
]),
|
|
2273
2288
|
}).authorization((allow) => [
|
|
2289
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2274
2290
|
allow.resource(categoryAction),
|
|
2275
2291
|
allow.resource(contentActions),
|
|
2276
2292
|
allow.resource(manageUserRole),
|
|
2277
2293
|
allow.resource(modelAttachmentUpload),
|
|
2278
2294
|
allow.resource(newsroomSummary),
|
|
2279
2295
|
allow.resource(procedureAction),
|
|
2296
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2280
2297
|
allow.resource(sesInboundReceive),
|
|
2281
2298
|
allow.resource(emailSubmissionProcessor),
|
|
2282
2299
|
allow.resource(slackEvents),
|
|
@@ -2289,10 +2306,14 @@ export type Schema = ClientSchema<typeof schema>;
|
|
|
2289
2306
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2290
2307
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2291
2308
|
*/
|
|
2292
|
-
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}) {
|
|
2309
|
+
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}, excludeModelGroups: readonly string[] = []) {
|
|
2310
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2311
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2293
2312
|
return defineData({
|
|
2294
2313
|
name: "PapyrusCmsApi",
|
|
2295
|
-
schema:
|
|
2314
|
+
schema: excludeModelGroups.length > 0
|
|
2315
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2316
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2296
2317
|
authorizationModes: {
|
|
2297
2318
|
defaultAuthorizationMode: "userPool",
|
|
2298
2319
|
apiKeyAuthorizationMode: {
|