@anthusai/papyrus 2.0.0-next.3 → 2.0.0-next.31

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.
Files changed (105) hide show
  1. package/amplify/data/resource.js +22 -3
  2. package/amplify/data/resource.ts +24 -3
  3. package/amplify/data/schema.js +2029 -1967
  4. package/amplify/data/schema.ts +72 -2
  5. package/amplify/functions/assignment-action/data-access.js +88 -0
  6. package/amplify/functions/assignment-action/data-access.ts +87 -0
  7. package/amplify/functions/content-actions/handler.py +33 -0
  8. package/amplify/functions/content-actions/requirements.txt +1 -0
  9. package/amplify/functions/content-actions/resource.js +1 -1
  10. package/amplify/functions/content-actions/resource.ts +1 -1
  11. package/amplify/functions/editorial-checks/handler.py +14 -0
  12. package/amplify/functions/editorial-checks/requirements.txt +1 -0
  13. package/amplify/functions/editorial-checks/resource.js +43 -0
  14. package/amplify/functions/editorial-checks/resource.ts +60 -0
  15. package/amplify/functions/editorial-checks/schema.js +121 -0
  16. package/amplify/functions/editorial-checks/schema.ts +123 -0
  17. package/amplify/functions/editorial-checks/wire.js +53 -0
  18. package/amplify/functions/editorial-checks/wire.ts +61 -0
  19. package/amplify/functions/monitoring-view/handler.py +11 -0
  20. package/amplify/functions/monitoring-view/resource.js +24 -0
  21. package/amplify/functions/monitoring-view/resource.ts +34 -0
  22. package/amplify/functions/monitoring-view/schema.js +16 -0
  23. package/amplify/functions/monitoring-view/schema.ts +18 -0
  24. package/amplify/functions/monitoring-view/wire.js +37 -0
  25. package/amplify/functions/monitoring-view/wire.ts +47 -0
  26. package/amplify/functions/public-forms/core.js +247 -0
  27. package/amplify/functions/public-forms/core.ts +310 -0
  28. package/amplify/functions/public-forms/handler.ts +41 -0
  29. package/amplify/functions/public-forms/origins.js +35 -0
  30. package/amplify/functions/public-forms/origins.ts +43 -0
  31. package/amplify/functions/public-forms/resource.js +9 -0
  32. package/amplify/functions/public-forms/resource.ts +10 -0
  33. package/amplify/functions/public-forms/wire.js +25 -0
  34. package/amplify/functions/public-forms/wire.ts +32 -0
  35. package/amplify/functions/shared/python-bundle.js +20 -14
  36. package/amplify/functions/shared/python-bundle.ts +25 -18
  37. package/amplify/publication/redirect-and-index.js +83 -0
  38. package/amplify/publication/redirect-rules.js +61 -0
  39. package/amplify/publication/redirect-rules.ts +79 -0
  40. package/amplify/publication/s3-projection.js +5 -1
  41. package/amplify/publication/s3-projection.ts +7 -1
  42. package/amplify/site-backend-config.ts +17 -0
  43. package/amplify/site-backend.js +36 -1
  44. package/amplify/site-backend.ts +44 -1
  45. package/app/api/newsroom/curation/context/route.ts +9 -0
  46. package/app/api/newsroom/curation/priming/route.ts +9 -0
  47. package/app/api/newsroom/curation/publication/route.ts +9 -0
  48. package/bin/papyrus-infra.mjs +20 -1
  49. package/components/editorial-checks-admin-panel.tsx +362 -0
  50. package/components/editorial-finding-card.tsx +162 -0
  51. package/components/editorial-findings-panel.tsx +91 -0
  52. package/components/editorial-preview-popover.tsx +103 -0
  53. package/components/markus-body-editor.tsx +213 -0
  54. package/components/markus-ir-preview.tsx +147 -6
  55. package/components/monitoring-overview-view.tsx +240 -0
  56. package/components/monitoring-panel.tsx +40 -0
  57. package/components/newsroom-article-editor.tsx +136 -11
  58. package/components/newsroom-board-view.tsx +6 -7
  59. package/components/newsroom-curation-bootstrap.tsx +45 -0
  60. package/components/newsroom-ops-shell.tsx +7 -3
  61. package/components/newsroom-organizer.css +74 -61
  62. package/components/newsroom-references-view.tsx +14 -14
  63. package/components/newsroom-theme-fonts/broadsheet-green.css +10 -0
  64. package/components/newsroom-theme-fonts/broadsheet-green.tsx +6 -0
  65. package/components/newsroom-theme-fonts/newspaper-gothic.css +9 -0
  66. package/components/newsroom-theme-fonts/newspaper-gothic.tsx +6 -0
  67. package/components/newsroom-theme-fonts/night-desk.css +10 -0
  68. package/components/newsroom-theme-fonts/night-desk.tsx +6 -0
  69. package/components/newsroom-theme-fonts/refined-newsprint.css +11 -0
  70. package/components/newsroom-theme-fonts/refined-newsprint.tsx +6 -0
  71. package/components/newsroom-theme.css +39 -0
  72. package/components/newsroom-theme.tsx +33 -0
  73. package/components/publication-cyclotron-panel.tsx +10 -10
  74. package/components/reference-add-entry.tsx +75 -0
  75. package/components/reference-curation-controls.tsx +30 -21
  76. package/components/reference-cyclotron-priming.tsx +4 -4
  77. package/components/reference-cyclotron-suggestion.tsx +1 -1
  78. package/components/reference-priming.tsx +14 -10
  79. package/components/reference-section-suggestion.tsx +1 -1
  80. package/components/topic-steering-workspace.tsx +27 -2
  81. package/components/use-editorial-checks.ts +133 -0
  82. package/lib/category-repository.ts +11 -9
  83. package/lib/curation-routes.ts +342 -0
  84. package/lib/editorial-checks-backend.ts +16 -0
  85. package/lib/editorial-checks-client.ts +212 -0
  86. package/lib/editorial-checks-demo.ts +147 -0
  87. package/lib/editorial-checks-settings.ts +27 -0
  88. package/lib/editorial-checks.ts +171 -0
  89. package/lib/editorial-preview.ts +228 -0
  90. package/lib/monitoring-client.ts +29 -0
  91. package/lib/monitoring-overview-fixture.ts +51 -0
  92. package/lib/monitoring-overview.ts +144 -0
  93. package/lib/newsroom-board.ts +27 -2
  94. package/lib/relevance-status.ts +2 -2
  95. package/lib/site-brand-tenant.ts +11 -6
  96. package/lib/site-brand.ts +23 -3
  97. package/package.json +47 -3
  98. package/routes.manifest.json +34 -1
  99. package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
  100. package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
  101. package/components/newsroom-fonts/playfair-display-OFL.txt +0 -93
  102. package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
  103. package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
  104. package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +0 -93
  105. package/components/newsroom-newsprint-board.css +0 -7
@@ -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: Object.keys(pluginDefinitions).length === 0 ? leanSchema : schemaWithPlugins(pluginDefinitions),
2184
+ schema: excludeModelGroups.length > 0
2185
+ ? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
2186
+ : hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
2168
2187
  authorizationModes: {
2169
2188
  defaultAuthorizationMode: "userPool",
2170
2189
  apiKeyAuthorizationMode: {
@@ -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: Object.keys(pluginDefinitions).length === 0 ? leanSchema : schemaWithPlugins(pluginDefinitions),
2314
+ schema: excludeModelGroups.length > 0
2315
+ ? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
2316
+ : hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
2296
2317
  authorizationModes: {
2297
2318
  defaultAuthorizationMode: "userPool",
2298
2319
  apiKeyAuthorizationMode: {