@anthusai/papyrus 1.0.0-next.9 → 1.1.0

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 (222) hide show
  1. package/amplify/auth/prospectus-google-client.js +66 -0
  2. package/amplify/auth/prospectus-google-client.ts +71 -0
  3. package/amplify/auth/redirect-urls.js +54 -0
  4. package/amplify/auth/redirect-urls.ts +66 -0
  5. package/amplify/auth/resource.js +23 -5
  6. package/amplify/auth/resource.ts +31 -5
  7. package/amplify/data/resource.js +42 -80
  8. package/amplify/data/resource.ts +42 -80
  9. package/amplify/data/schema.js +45 -62
  10. package/amplify/data/schema.ts +47 -62
  11. package/amplify/functions/category-action/handler.ts +5 -3
  12. package/amplify/functions/console-chat-responder/py/execute_tactus_runner.py +0 -10
  13. package/amplify/functions/console-chat-responder/resource.js +0 -7
  14. package/amplify/functions/console-chat-responder/resource.ts +0 -8
  15. package/amplify/functions/console-chat-responder/src/main.rs +0 -9
  16. package/amplify/functions/content-actions/handler.py +143 -1
  17. package/amplify/functions/content-actions/requirements.txt +2 -1
  18. package/amplify/functions/content-actions/resource.js +6 -1
  19. package/amplify/functions/content-actions/resource.ts +9 -2
  20. package/amplify/functions/email-submission-processor/handler.py +3 -1
  21. package/amplify/functions/renditions/handler.py +120 -0
  22. package/amplify/functions/renditions/requirements.txt +4 -0
  23. package/amplify/functions/ses-inbound-receive/handler.ts +32 -4
  24. package/amplify/functions/shared/email-submission.ts +109 -1
  25. package/amplify/functions/shared/python-bundle.js +42 -2
  26. package/amplify/functions/shared/python-bundle.ts +47 -2
  27. package/amplify/functions/shared/reference-curation-metadata.ts +29 -0
  28. package/amplify/inbound-email/ses-intake.js +86 -0
  29. package/amplify/inbound-email/ses-intake.ts +110 -0
  30. package/amplify/plugins/registry.js +19 -0
  31. package/amplify/plugins/registry.ts +23 -0
  32. package/amplify/plugins/signup/function/handler.py +200 -0
  33. package/amplify/plugins/signup/function/resource.js +27 -0
  34. package/amplify/plugins/signup/function/resource.ts +35 -0
  35. package/amplify/plugins/signup/papyrus.plugin.js +59 -0
  36. package/amplify/plugins/signup/papyrus.plugin.ts +74 -0
  37. package/amplify/plugins/signup/schema.js +40 -0
  38. package/amplify/plugins/signup/schema.ts +41 -0
  39. package/amplify/plugins/signup/waf.js +48 -0
  40. package/amplify/plugins/signup/waf.ts +51 -0
  41. package/amplify/plugins/types.js +1 -0
  42. package/amplify/plugins/types.ts +39 -0
  43. package/amplify/plugins/wire.js +24 -0
  44. package/amplify/plugins/wire.ts +26 -0
  45. package/amplify/publication/default-publication.js +18 -0
  46. package/amplify/publication/default-publication.ts +20 -0
  47. package/amplify/publication/invalidation-alarm.js +26 -0
  48. package/amplify/publication/invalidation-alarm.ts +30 -0
  49. package/amplify/publication/redirect-and-index.js +37 -0
  50. package/amplify/publication/renditions-function.js +74 -0
  51. package/amplify/publication/renditions-function.ts +112 -0
  52. package/amplify/publication/renditions-settings.js +51 -0
  53. package/amplify/publication/renditions-settings.ts +58 -0
  54. package/amplify/publication/reproject-on-deploy.js +73 -0
  55. package/amplify/publication/reproject-on-deploy.ts +78 -0
  56. package/amplify/publication/s3-projection-settings.js +67 -0
  57. package/amplify/publication/s3-projection-settings.ts +101 -0
  58. package/amplify/publication/s3-projection.js +151 -0
  59. package/amplify/publication/s3-projection.ts +201 -0
  60. package/amplify/resolver-waves.js +26 -0
  61. package/amplify/resolver-waves.ts +34 -0
  62. package/amplify/revalidate-invalidation-settings.js +30 -0
  63. package/amplify/revalidate-invalidation-settings.ts +35 -0
  64. package/amplify/revalidate-secret-policy.js +13 -0
  65. package/amplify/revalidate-secret-policy.ts +19 -0
  66. package/amplify/site-backend-config.js +65 -1
  67. package/amplify/site-backend-config.ts +153 -2
  68. package/amplify/site-backend-names.js +103 -0
  69. package/amplify/site-backend-names.ts +166 -0
  70. package/amplify/site-backend.js +150 -176
  71. package/amplify/site-backend.ts +189 -201
  72. package/amplify/storage-backups/construct.js +31 -0
  73. package/amplify/storage-backups/construct.ts +47 -0
  74. package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +8 -1
  75. package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -0
  76. package/app/[year]/[month]/[day]/page/[pageNumber]/page.tsx +6 -1
  77. package/app/[year]/[month]/[day]/page.tsx +1 -1
  78. package/app/[year]/[month]/[day]/section/[sectionKey]/page.tsx +6 -1
  79. package/app/api/archive/editions/route.ts +1 -1
  80. package/app/api/auth/prospectus/callback/route.ts +9 -0
  81. package/app/api/auth/prospectus/selection/route.ts +9 -0
  82. package/app/api/auth/prospectus/session/route.ts +9 -0
  83. package/app/api/auth/prospectus/sign-in/route.ts +9 -0
  84. package/app/api/auth/prospectus/sign-out/route.ts +9 -0
  85. package/app/api/cyclotron/priming-proof/route.ts +11 -0
  86. package/app/api/media/[...path]/route.ts +5 -16
  87. package/app/api/revalidate/route.ts +15 -7
  88. package/app/archive/page.tsx +1 -1
  89. package/app/articles/[slug]/page.tsx +7 -5
  90. package/app/blog-rhythm.css +278 -0
  91. package/app/cyclotron/page.tsx +13 -0
  92. package/app/globals.css +2 -0
  93. package/app/layout.tsx +16 -0
  94. package/app/newsroom/[section]/[...selection]/page.tsx +9 -6
  95. package/app/newsroom/[section]/page.tsx +6 -3
  96. package/app/newsroom/layout.tsx +4 -9
  97. package/app/newsroom/settings/page.tsx +6 -0
  98. package/app/newsroom/work/page.tsx +10 -0
  99. package/app/page.tsx +22 -8
  100. package/app/robots.ts +2 -5
  101. package/app/tailwind.css +1 -6
  102. package/components/amplify-client-provider.tsx +5 -22
  103. package/components/archive-shell.tsx +2 -22
  104. package/components/article-video.tsx +152 -5
  105. package/components/blog-page-background.tsx +23 -6
  106. package/components/news-desk-page.tsx +4 -15
  107. package/components/news-desk-taxonomy-client.ts +90 -3
  108. package/components/newspaper.tsx +6 -2
  109. package/components/newsroom-access-gate.tsx +2 -1
  110. package/components/newsroom-board-view.tsx +99 -0
  111. package/components/newsroom-client-shell.tsx +12 -0
  112. package/components/newsroom-curation-provider.tsx +17 -0
  113. package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
  114. package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
  115. package/components/newsroom-fonts/playfair-display-OFL.txt +93 -0
  116. package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
  117. package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
  118. package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +93 -0
  119. package/components/newsroom-newsprint-board.css +48 -0
  120. package/components/newsroom-ops-overview.tsx +28 -11
  121. package/components/newsroom-ops-shell.tsx +7 -1
  122. package/components/newsroom-organizer-shell.tsx +130 -0
  123. package/components/newsroom-organizer.css +63 -0
  124. package/components/newsroom-references-view.tsx +92 -8
  125. package/components/papyrus-console-shell.tsx +4 -2
  126. package/components/pictogram-figure.tsx +9 -2
  127. package/components/presentation-header.tsx +135 -0
  128. package/components/presentation-rhythm-hrule.tsx +17 -0
  129. package/components/priming-proof-page.tsx +94 -0
  130. package/components/publication-cyclotron-panel.tsx +57 -0
  131. package/components/reader-auth-control.tsx +8 -5
  132. package/components/reference-curation-controls.tsx +77 -0
  133. package/components/reference-cyclotron-status.tsx +109 -0
  134. package/components/reference-priming.tsx +18 -0
  135. package/components/reference-relevance-review.tsx +75 -0
  136. package/components/settings-page.tsx +2 -1
  137. package/components/signup-entries-panel.tsx +94 -0
  138. package/components/topic-steering-workspace.tsx +78 -8
  139. package/components/use-blog-header-obstacles.ts +81 -0
  140. package/components/use-brand-fonts-ready.ts +28 -0
  141. package/components/use-near-viewport.ts +30 -0
  142. package/components/use-rhythm-overlay.ts +29 -0
  143. package/infra/amplify-app-shell.js +166 -27
  144. package/infra/amplify-app-shell.ts +180 -31
  145. package/infra/build-specs.js +23 -7
  146. package/infra/build-specs.ts +27 -10
  147. package/infra/site-config.js +248 -36
  148. package/infra/site-config.ts +313 -51
  149. package/lib/amplify-outputs-path.ts +5 -1
  150. package/lib/amplify-server-runtime.ts +36 -1
  151. package/lib/approved-priming-proof-reports.ts +6 -0
  152. package/lib/blog-feature-solver.ts +459 -0
  153. package/lib/blog-rhythm.ts +134 -0
  154. package/lib/brand-fonts-watch.ts +43 -0
  155. package/lib/brand-fonts.ts +112 -0
  156. package/lib/cached-content-repository.ts +12 -0
  157. package/lib/category-repository.ts +43 -93
  158. package/lib/content-item-lifecycle.ts +55 -0
  159. package/lib/content-repository.ts +3 -0
  160. package/lib/content-types.ts +4 -0
  161. package/lib/curation-client.ts +61 -0
  162. package/lib/edition-routes.ts +31 -29
  163. package/lib/graphql-content-repository.ts +56 -22
  164. package/lib/media-route-response.ts +45 -0
  165. package/lib/newspaper-layout.ts +3 -2
  166. package/lib/newsroom-base-path.ts +12 -3
  167. package/lib/newsroom-board.ts +99 -0
  168. package/lib/newsroom-category-drilldown.ts +3 -2
  169. package/lib/newsroom-forum-routes.ts +6 -4
  170. package/lib/newsroom-index-filters.ts +14 -10
  171. package/lib/newsroom-nav.ts +3 -1
  172. package/lib/newsroom-organizer-nav.ts +37 -0
  173. package/lib/newsroom-section-routing.ts +20 -0
  174. package/lib/oauth-redirect-priority.ts +40 -0
  175. package/lib/papyrus-web-locations.ts +7 -6
  176. package/lib/plugin-settings.ts +11 -0
  177. package/lib/presentation-footer.ts +3 -2
  178. package/lib/pretext-layout.ts +12 -3
  179. package/lib/priming-proof-report.ts +90 -0
  180. package/lib/prospectus-publication-access.ts +53 -0
  181. package/lib/prospectus-session.ts +196 -0
  182. package/lib/prospectus-sign-in-routes.ts +284 -0
  183. package/lib/prospectus-site-identity.ts +303 -0
  184. package/lib/publication-cyclotron.ts +74 -0
  185. package/lib/rate-limit-retry.ts +55 -0
  186. package/lib/reader-base-path.ts +24 -0
  187. package/lib/reader-cache-lifetime.ts +5 -0
  188. package/lib/reader-static-params.ts +85 -4
  189. package/lib/reader-storage-url.ts +9 -12
  190. package/lib/reference-policy.ts +5 -0
  191. package/lib/relevance-decisions.ts +103 -0
  192. package/lib/relevance-status.ts +63 -0
  193. package/lib/renderer.ts +7 -0
  194. package/lib/revalidate-prewarm.ts +53 -0
  195. package/lib/revalidate-secret.ts +59 -0
  196. package/lib/robots-policy.ts +14 -0
  197. package/lib/root-route-redirect.ts +16 -0
  198. package/lib/semantic-graph.ts +7 -0
  199. package/lib/shared-credentials-provider.ts +61 -0
  200. package/lib/signup-csv.ts +24 -0
  201. package/lib/site-brand.ts +59 -0
  202. package/lib/staging-gated-path.ts +23 -0
  203. package/lib/staging-preview-object.ts +21 -5
  204. package/lib/test-editor-override.ts +4 -0
  205. package/lib/video-loading.ts +22 -0
  206. package/lib/video-script.ts +14 -0
  207. package/middleware.ts +11 -19
  208. package/package.json +73 -8
  209. package/renderers/pretext/article-page.tsx +39 -3
  210. package/renderers/pretext/presentation-shared.tsx +113 -0
  211. package/renderers/pretext/presentation-shell.tsx +15 -102
  212. package/renderers/pretext/rhythm-article-page.tsx +165 -0
  213. package/renderers/pretext/rhythm-blog-presentation.tsx +279 -0
  214. package/renderers/pretext/rhythm-shell-style.ts +35 -0
  215. package/routes.manifest.json +123 -12
  216. package/src/sync.mjs +30 -6
  217. package/src/with-papyrus.d.mts +9 -0
  218. package/src/with-papyrus.mjs +48 -3
  219. package/amplify/functions/graphql-jwt-authorizer/handler.ts +0 -193
  220. package/amplify/functions/graphql-jwt-authorizer/resource.js +0 -14
  221. package/amplify/functions/graphql-jwt-authorizer/resource.ts +0 -15
  222. package/components/ai-elements/message.tsx +0 -360
@@ -1,7 +1,6 @@
1
1
  import { a, defineData } from "@aws-amplify/backend";
2
2
  import { assignmentAction } from "../functions/assignment-action/resource.js";
3
3
  import { categoryAction } from "../functions/category-action/resource.js";
4
- import { graphqlJwtAuthorizer } from "../functions/graphql-jwt-authorizer/resource.js";
5
4
  import { contentActions } from "../functions/content-actions/resource.js";
6
5
  import { knowledgeQuery } from "../functions/knowledge-query/resource.js";
7
6
  import { manageUserRole } from "../functions/manage-user-role/resource.js";
@@ -13,7 +12,7 @@ import { emailSubmissionProcessor } from "../functions/email-submission-processo
13
12
  import { sesInboundReceive } from "../functions/ses-inbound-receive/resource.js";
14
13
  import { slackDelivery } from "../functions/slack-delivery/resource.js";
15
14
  import { slackEvents } from "../functions/slack-events/resource.js";
16
- import { schema as leanSchema } from "./schema.js";
15
+ import { schema as leanSchema, schemaWithPlugins } from "./schema.js";
17
16
  const authoringOperations = [
18
17
  "read",
19
18
  "create",
@@ -44,7 +43,6 @@ const schema = a.schema({
44
43
  .authorization((allow) => [
45
44
  allow.owner(),
46
45
  allow.group(adminGroup),
47
- allow.custom().to(["read"]),
48
46
  ]),
49
47
  UserIdentity: a
50
48
  .model({
@@ -64,7 +62,6 @@ const schema = a.schema({
64
62
  ])
65
63
  .authorization((allow) => [
66
64
  allow.group(adminGroup),
67
- allow.custom().to(["read"]),
68
65
  ]),
69
66
  UserRoleAssignment: a
70
67
  .model({
@@ -290,11 +287,12 @@ const schema = a.schema({
290
287
  actorLabel: a.string(),
291
288
  note: a.string(),
292
289
  reasonCode: a.string(),
290
+ decisionRelationId: a.id(),
291
+ shareable: a.boolean(),
293
292
  })
294
293
  .returns(a.ref("ReferenceCurationActionResult"))
295
294
  .authorization((allow) => [
296
295
  allow.groups(categoryWriteGroups),
297
- allow.custom(),
298
296
  ])
299
297
  .handler(a.handler.function(categoryAction)),
300
298
  setReferenceQualityRating: a
@@ -309,7 +307,6 @@ const schema = a.schema({
309
307
  .returns(a.ref("ReferenceQualityActionResult"))
310
308
  .authorization((allow) => [
311
309
  allow.groups(categoryWriteGroups),
312
- allow.custom(),
313
310
  ])
314
311
  .handler(a.handler.function(categoryAction)),
315
312
  createReferenceInsight: a
@@ -324,7 +321,6 @@ const schema = a.schema({
324
321
  .returns(a.ref("ReferenceInsightActionResult"))
325
322
  .authorization((allow) => [
326
323
  allow.groups(categoryWriteGroups),
327
- allow.custom(),
328
324
  ])
329
325
  .handler(a.handler.function(categoryAction)),
330
326
  moveReferenceCorpus: a
@@ -339,7 +335,6 @@ const schema = a.schema({
339
335
  .returns(a.ref("ReferenceCorpusMoveActionResult"))
340
336
  .authorization((allow) => [
341
337
  allow.groups(categoryWriteGroups),
342
- allow.custom(),
343
338
  ])
344
339
  .handler(a.handler.function(categoryAction)),
345
340
  startReferenceCuration: a
@@ -353,7 +348,6 @@ const schema = a.schema({
353
348
  .returns(a.ref("ReferenceCurationStartResult"))
354
349
  .authorization((allow) => [
355
350
  allow.groups(categoryWriteGroups),
356
- allow.custom(),
357
351
  ])
358
352
  .handler(a.handler.function(categoryAction)),
359
353
  getReferenceCurationStatus: a
@@ -364,7 +358,6 @@ const schema = a.schema({
364
358
  .returns(a.ref("ReferenceCurationStatusResult"))
365
359
  .authorization((allow) => [
366
360
  allow.groups(categoryWriteGroups),
367
- allow.custom(),
368
361
  ])
369
362
  .handler(a.handler.function(categoryAction)),
370
363
  createCategorySetDraft: a
@@ -467,7 +460,7 @@ const schema = a.schema({
467
460
  getNewsroomSummary: a
468
461
  .query()
469
462
  .returns(a.ref("NewsroomSummary"))
470
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
463
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
471
464
  .handler(a.handler.function(newsroomSummary)),
472
465
  deriveMarkus: a
473
466
  .query()
@@ -505,7 +498,7 @@ const schema = a.schema({
505
498
  input: a.json().required(),
506
499
  })
507
500
  .returns(a.json())
508
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
501
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
509
502
  .handler(a.handler.function(knowledgeQuery)),
510
503
  updateNewsroomSummary: a
511
504
  .mutation()
@@ -515,7 +508,7 @@ const schema = a.schema({
515
508
  reason: a.string(),
516
509
  })
517
510
  .returns(a.ref("NewsroomSummary"))
518
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
511
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
519
512
  .handler(a.handler.function(newsroomSummary)),
520
513
  ModelAttachmentUploadSlot: a.customType({
521
514
  ok: a.boolean().required(),
@@ -571,7 +564,7 @@ const schema = a.schema({
571
564
  status: a.string(),
572
565
  })
573
566
  .returns(a.ref("ModelAttachmentUploadSlot"))
574
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
567
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
575
568
  .handler(a.handler.function(modelAttachmentUpload)),
576
569
  completeModelAttachmentUpload: a
577
570
  .mutation()
@@ -592,7 +585,7 @@ const schema = a.schema({
592
585
  status: a.string(),
593
586
  })
594
587
  .returns(a.ref("ModelAttachment"))
595
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
588
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
596
589
  .handler(a.handler.function(modelAttachmentUpload)),
597
590
  abortModelAttachmentUpload: a
598
591
  .mutation()
@@ -613,7 +606,7 @@ const schema = a.schema({
613
606
  status: a.string(),
614
607
  })
615
608
  .returns(a.ref("ModelAttachmentUploadAbortResult"))
616
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
609
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
617
610
  .handler(a.handler.function(modelAttachmentUpload)),
618
611
  createModelAttachmentDownload: a
619
612
  .mutation()
@@ -621,7 +614,7 @@ const schema = a.schema({
621
614
  attachmentId: a.id().required(),
622
615
  })
623
616
  .returns(a.ref("ModelAttachmentDownloadSlot"))
624
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
617
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
625
618
  .handler(a.handler.function(modelAttachmentUpload)),
626
619
  AssignmentActionResult: a.customType({
627
620
  ok: a.boolean().required(),
@@ -708,7 +701,7 @@ const schema = a.schema({
708
701
  limit: a.integer(),
709
702
  })
710
703
  .returns(a.ref("AssignmentContext").array().required())
711
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
704
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
712
705
  .handler(a.handler.function(assignmentAction)),
713
706
  listAssignmentQueue: a
714
707
  .query()
@@ -718,7 +711,7 @@ const schema = a.schema({
718
711
  limit: a.integer(),
719
712
  })
720
713
  .returns(a.ref("AssignmentContext").array().required())
721
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
714
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
722
715
  .handler(a.handler.function(assignmentAction)),
723
716
  getAssignmentContext: a
724
717
  .query()
@@ -726,7 +719,7 @@ const schema = a.schema({
726
719
  assignmentId: a.id().required(),
727
720
  })
728
721
  .returns(a.ref("AssignmentContext"))
729
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
722
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
730
723
  .handler(a.handler.function(assignmentAction)),
731
724
  claimAssignment: a
732
725
  .mutation()
@@ -742,7 +735,7 @@ const schema = a.schema({
742
735
  note: a.string(),
743
736
  })
744
737
  .returns(a.ref("AssignmentActionResult"))
745
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
738
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
746
739
  .handler(a.handler.function(assignmentAction)),
747
740
  releaseAssignment: a
748
741
  .mutation()
@@ -753,7 +746,7 @@ const schema = a.schema({
753
746
  note: a.string(),
754
747
  })
755
748
  .returns(a.ref("AssignmentActionResult"))
756
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
749
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
757
750
  .handler(a.handler.function(assignmentAction)),
758
751
  completeAssignment: a
759
752
  .mutation()
@@ -764,7 +757,7 @@ const schema = a.schema({
764
757
  note: a.string(),
765
758
  })
766
759
  .returns(a.ref("AssignmentActionResult"))
767
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
760
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
768
761
  .handler(a.handler.function(assignmentAction)),
769
762
  cancelAssignment: a
770
763
  .mutation()
@@ -775,7 +768,7 @@ const schema = a.schema({
775
768
  note: a.string(),
776
769
  })
777
770
  .returns(a.ref("AssignmentActionResult"))
778
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
771
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
779
772
  .handler(a.handler.function(assignmentAction)),
780
773
  reopenAssignment: a
781
774
  .mutation()
@@ -786,7 +779,7 @@ const schema = a.schema({
786
779
  note: a.string(),
787
780
  })
788
781
  .returns(a.ref("AssignmentActionResult"))
789
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
782
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
790
783
  .handler(a.handler.function(assignmentAction)),
791
784
  retryImmediateAssignment: a
792
785
  .mutation()
@@ -797,7 +790,7 @@ const schema = a.schema({
797
790
  note: a.string(),
798
791
  })
799
792
  .returns(a.ref("AssignmentActionResult"))
800
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
793
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
801
794
  .handler(a.handler.function(assignmentAction)),
802
795
  listNewsroomProcedureDefinitions: a
803
796
  .query()
@@ -811,7 +804,7 @@ const schema = a.schema({
811
804
  procedureKey: a.string(),
812
805
  })
813
806
  .returns(a.json())
814
- .authorization((allow) => [allow.group(adminGroup), allow.custom()])
807
+ .authorization((allow) => [allow.group(adminGroup)])
815
808
  .handler(a.handler.function(procedureAction)),
816
809
  saveNewsroomProcedureDefinition: a
817
810
  .mutation()
@@ -849,7 +842,7 @@ const schema = a.schema({
849
842
  actorLabel: a.string(),
850
843
  })
851
844
  .returns(a.json())
852
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
845
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
853
846
  .handler(a.handler.function(procedureAction)),
854
847
  getNewsroomProcedureRun: a
855
848
  .query()
@@ -857,7 +850,7 @@ const schema = a.schema({
857
850
  id: a.id().required(),
858
851
  })
859
852
  .returns(a.json())
860
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
853
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
861
854
  .handler(a.handler.function(procedureAction)),
862
855
  listNewsroomProcedureRunsByProcedure: a
863
856
  .query()
@@ -865,7 +858,7 @@ const schema = a.schema({
865
858
  procedureId: a.id().required(),
866
859
  })
867
860
  .returns(a.json())
868
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
861
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
869
862
  .handler(a.handler.function(procedureAction)),
870
863
  Assignment: a
871
864
  .model({
@@ -900,9 +893,11 @@ const schema = a.schema({
900
893
  createdAt: a.datetime().required(),
901
894
  updatedAt: a.datetime().required(),
902
895
  newsroomFeedKey: a.string(),
896
+ itemLineageId: a.id(),
903
897
  })
904
898
  .secondaryIndexes((index) => [
905
899
  index("newsroomFeedKey").sortKeys(["createdAt"]).queryField("listAssignmentsByNewsroomFeedAndCreatedAt"),
900
+ index("itemLineageId").sortKeys(["createdAt"]).queryField("listAssignmentsByItemLineageAndCreatedAt"),
906
901
  index("queueStatusKey").sortKeys(["priority", "createdAt"]).queryField("listAssignmentsByQueueStatusAndPriority"),
907
902
  index("assignmentTypeKey").sortKeys(["status", "createdAt"]).queryField("listAssignmentsByTypeStatusAndCreatedAt"),
908
903
  index("status").sortKeys(["updatedAt"]).queryField("listAssignmentsByStatusAndUpdatedAt"),
@@ -915,7 +910,6 @@ const schema = a.schema({
915
910
  .authorization((allow) => [
916
911
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
917
912
  allow.authenticated("identityPool").to(authoringOperations),
918
- allow.custom().to(authoringOperations),
919
913
  ]),
920
914
  AssignmentEvent: a
921
915
  .model({
@@ -938,7 +932,6 @@ const schema = a.schema({
938
932
  ])
939
933
  .authorization((allow) => [
940
934
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
941
- allow.custom().to(authoringOperations),
942
935
  ]),
943
936
  ProcedureDefinition: a
944
937
  .model({
@@ -963,7 +956,6 @@ const schema = a.schema({
963
956
  ])
964
957
  .authorization((allow) => [
965
958
  allow.group(adminGroup),
966
- allow.custom().to(authoringOperations),
967
959
  ]),
968
960
  ProcedureVersion: a
969
961
  .model({
@@ -990,7 +982,6 @@ const schema = a.schema({
990
982
  ])
991
983
  .authorization((allow) => [
992
984
  allow.group(adminGroup),
993
- allow.custom().to(authoringOperations),
994
985
  ]),
995
986
  ProcedureRun: a
996
987
  .model({
@@ -1023,7 +1014,6 @@ const schema = a.schema({
1023
1014
  .authorization((allow) => [
1024
1015
  allow.group("editor").to(["read"]),
1025
1016
  allow.group(adminGroup).to(authoringOperations),
1026
- allow.custom().to(authoringOperations),
1027
1017
  ]),
1028
1018
  NewsroomSection: a
1029
1019
  .model({
@@ -1051,7 +1041,6 @@ const schema = a.schema({
1051
1041
  ])
1052
1042
  .authorization((allow) => [
1053
1043
  allow.groups(categoryWriteGroups),
1054
- allow.custom().to(authoringOperations),
1055
1044
  ]),
1056
1045
  KnowledgeCorpus: a
1057
1046
  .model({
@@ -1069,7 +1058,6 @@ const schema = a.schema({
1069
1058
  ])
1070
1059
  .authorization((allow) => [
1071
1060
  allow.groups(categoryWriteGroups).to(["read"]),
1072
- allow.custom().to(authoringOperations),
1073
1061
  ]),
1074
1062
  KnowledgeImportRun: a
1075
1063
  .model({
@@ -1097,7 +1085,6 @@ const schema = a.schema({
1097
1085
  ])
1098
1086
  .authorization((allow) => [
1099
1087
  allow.groups(categoryWriteGroups).to(["read"]),
1100
- allow.custom().to(authoringOperations),
1101
1088
  ]),
1102
1089
  KnowledgeRawPayload: a
1103
1090
  .model({
@@ -1115,7 +1102,6 @@ const schema = a.schema({
1115
1102
  ])
1116
1103
  .authorization((allow) => [
1117
1104
  allow.groups(categoryWriteGroups),
1118
- allow.custom().to(authoringOperations),
1119
1105
  ]),
1120
1106
  KnowledgeArtifact: a
1121
1107
  .model({
@@ -1135,7 +1121,6 @@ const schema = a.schema({
1135
1121
  ])
1136
1122
  .authorization((allow) => [
1137
1123
  allow.groups(categoryWriteGroups).to(["read"]),
1138
- allow.custom().to(authoringOperations),
1139
1124
  ]),
1140
1125
  CategorySet: a
1141
1126
  .model({
@@ -1165,7 +1150,6 @@ const schema = a.schema({
1165
1150
  ])
1166
1151
  .authorization((allow) => [
1167
1152
  allow.groups(categoryWriteGroups),
1168
- allow.custom().to(authoringOperations),
1169
1153
  ]),
1170
1154
  Category: a
1171
1155
  .model({
@@ -1207,7 +1191,6 @@ const schema = a.schema({
1207
1191
  ])
1208
1192
  .authorization((allow) => [
1209
1193
  allow.groups(categoryWriteGroups),
1210
- allow.custom().to(authoringOperations),
1211
1194
  ]),
1212
1195
  CategoryKeyword: a
1213
1196
  .model({
@@ -1236,7 +1219,6 @@ const schema = a.schema({
1236
1219
  ])
1237
1220
  .authorization((allow) => [
1238
1221
  allow.groups(categoryWriteGroups),
1239
- allow.custom().to(authoringOperations),
1240
1222
  ]),
1241
1223
  LexicalSteeringRule: a
1242
1224
  .model({
@@ -1265,7 +1247,6 @@ const schema = a.schema({
1265
1247
  ])
1266
1248
  .authorization((allow) => [
1267
1249
  allow.groups(categoryWriteGroups),
1268
- allow.custom().to(authoringOperations),
1269
1250
  ]),
1270
1251
  SteeringProposal: a
1271
1252
  .model({
@@ -1303,7 +1284,6 @@ const schema = a.schema({
1303
1284
  ])
1304
1285
  .authorization((allow) => [
1305
1286
  allow.groups(categoryWriteGroups).to(["read"]),
1306
- allow.custom().to(authoringOperations),
1307
1287
  ]),
1308
1288
  SteeringDecision: a
1309
1289
  .model({
@@ -1323,7 +1303,6 @@ const schema = a.schema({
1323
1303
  ])
1324
1304
  .authorization((allow) => [
1325
1305
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1326
- allow.custom().to(authoringOperations),
1327
1306
  ]),
1328
1307
  Reference: a
1329
1308
  .model({
@@ -1375,7 +1354,6 @@ const schema = a.schema({
1375
1354
  ])
1376
1355
  .authorization((allow) => [
1377
1356
  allow.groups(categoryWriteGroups).to(["read"]),
1378
- allow.custom().to(authoringOperations),
1379
1357
  ]),
1380
1358
  ReferenceAttachment: a
1381
1359
  .model({
@@ -1405,7 +1383,6 @@ const schema = a.schema({
1405
1383
  ])
1406
1384
  .authorization((allow) => [
1407
1385
  allow.groups(categoryWriteGroups).to(["read"]),
1408
- allow.custom().to(authoringOperations),
1409
1386
  ]),
1410
1387
  SemanticNode: a
1411
1388
  .model({
@@ -1448,7 +1425,6 @@ const schema = a.schema({
1448
1425
  ])
1449
1426
  .authorization((allow) => [
1450
1427
  allow.groups(categoryWriteGroups).to(["read"]),
1451
- allow.custom().to(authoringOperations),
1452
1428
  ]),
1453
1429
  Message: a
1454
1430
  .model({
@@ -1497,7 +1473,6 @@ const schema = a.schema({
1497
1473
  ])
1498
1474
  .authorization((allow) => [
1499
1475
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1500
- allow.custom().to(authoringOperations),
1501
1476
  allow.authenticated("identityPool").to(["read", "create", "update"]),
1502
1477
  ]),
1503
1478
  MessageThread: a
@@ -1536,7 +1511,6 @@ const schema = a.schema({
1536
1511
  .authorization((allow) => [
1537
1512
  allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
1538
1513
  allow.authenticated("identityPool").to(authoringOperations),
1539
- allow.custom().to(authoringOperations),
1540
1514
  ]),
1541
1515
  ModelAttachment: a
1542
1516
  .model({
@@ -1568,7 +1542,6 @@ const schema = a.schema({
1568
1542
  ])
1569
1543
  .authorization((allow) => [
1570
1544
  allow.groups(categoryWriteGroups).to(["read"]),
1571
- allow.custom().to(authoringOperations),
1572
1545
  ]),
1573
1546
  SemanticRelationType: a
1574
1547
  .model({
@@ -1596,7 +1569,6 @@ const schema = a.schema({
1596
1569
  ])
1597
1570
  .authorization((allow) => [
1598
1571
  allow.groups(categoryWriteGroups),
1599
- allow.custom().to(authoringOperations),
1600
1572
  ]),
1601
1573
  SemanticRelation: a
1602
1574
  .model({
@@ -1647,7 +1619,6 @@ const schema = a.schema({
1647
1619
  ])
1648
1620
  .authorization((allow) => [
1649
1621
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1650
- allow.custom().to(authoringOperations),
1651
1622
  ]),
1652
1623
  Item: a
1653
1624
  .model({
@@ -1663,6 +1634,7 @@ const schema = a.schema({
1663
1634
  type: a.string().required(),
1664
1635
  status: a.string().required(),
1665
1636
  typeStatus: a.string().required(),
1637
+ stage: a.string(),
1666
1638
  slug: a.string().required(),
1667
1639
  shortSlug: a.string(),
1668
1640
  section: a.string(),
@@ -1694,10 +1666,10 @@ const schema = a.schema({
1694
1666
  index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
1695
1667
  index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
1696
1668
  index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
1669
+ index("stage").sortKeys(["updatedAt"]).queryField("listItemsByStageAndUpdatedAt"),
1697
1670
  ])
1698
1671
  .authorization((allow) => [
1699
1672
  allow.groups(contentWriteGroups),
1700
- allow.custom().to(authoringOperations),
1701
1673
  ]),
1702
1674
  Tag: a
1703
1675
  .model({
@@ -1714,7 +1686,6 @@ const schema = a.schema({
1714
1686
  ])
1715
1687
  .authorization((allow) => [
1716
1688
  allow.groups(contentWriteGroups),
1717
- allow.custom().to(authoringOperations),
1718
1689
  ]),
1719
1690
  ItemTag: a
1720
1691
  .model({
@@ -1734,7 +1705,6 @@ const schema = a.schema({
1734
1705
  ])
1735
1706
  .authorization((allow) => [
1736
1707
  allow.groups(contentWriteGroups),
1737
- allow.custom().to(authoringOperations),
1738
1708
  ]),
1739
1709
  MediaAsset: a
1740
1710
  .model({
@@ -1767,7 +1737,6 @@ const schema = a.schema({
1767
1737
  ])
1768
1738
  .authorization((allow) => [
1769
1739
  allow.groups(contentWriteGroups),
1770
- allow.custom().to(authoringOperations),
1771
1740
  ]),
1772
1741
  Edition: a
1773
1742
  .model({
@@ -1800,7 +1769,6 @@ const schema = a.schema({
1800
1769
  ])
1801
1770
  .authorization((allow) => [
1802
1771
  allow.groups(contentWriteGroups),
1803
- allow.custom().to(authoringOperations),
1804
1772
  ]),
1805
1773
  EditionSlot: a
1806
1774
  .model({
@@ -1826,7 +1794,6 @@ const schema = a.schema({
1826
1794
  ])
1827
1795
  .authorization((allow) => [
1828
1796
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1829
- allow.custom().to(authoringOperations),
1830
1797
  ]),
1831
1798
  EditionItem: a
1832
1799
  .model({
@@ -1849,7 +1816,6 @@ const schema = a.schema({
1849
1816
  ])
1850
1817
  .authorization((allow) => [
1851
1818
  allow.groups(contentWriteGroups),
1852
- allow.custom().to(authoringOperations),
1853
1819
  ]),
1854
1820
  PublishedItem: a
1855
1821
  .model({
@@ -1890,7 +1856,6 @@ const schema = a.schema({
1890
1856
  .authorization((allow) => [
1891
1857
  allow.guest().to(["read"]),
1892
1858
  allow.groups(contentWriteGroups),
1893
- allow.custom().to(authoringOperations),
1894
1859
  ]),
1895
1860
  PublishedMediaAsset: a
1896
1861
  .model({
@@ -1926,7 +1891,6 @@ const schema = a.schema({
1926
1891
  .authorization((allow) => [
1927
1892
  allow.guest().to(["read"]),
1928
1893
  allow.groups(contentWriteGroups),
1929
- allow.custom().to(authoringOperations),
1930
1894
  ]),
1931
1895
  PublishedEdition: a
1932
1896
  .model({
@@ -1952,7 +1916,6 @@ const schema = a.schema({
1952
1916
  .authorization((allow) => [
1953
1917
  allow.guest().to(["read"]),
1954
1918
  allow.groups(contentWriteGroups),
1955
- allow.custom().to(authoringOperations),
1956
1919
  ]),
1957
1920
  PublishedEditionItem: a
1958
1921
  .model({
@@ -1977,7 +1940,6 @@ const schema = a.schema({
1977
1940
  .authorization((allow) => [
1978
1941
  allow.guest().to(["read"]),
1979
1942
  allow.groups(contentWriteGroups),
1980
- allow.custom().to(authoringOperations),
1981
1943
  ]),
1982
1944
  PublishedCategorySet: a
1983
1945
  .model({
@@ -2003,7 +1965,6 @@ const schema = a.schema({
2003
1965
  .authorization((allow) => [
2004
1966
  allow.guest().to(["read"]),
2005
1967
  allow.groups(contentWriteGroups),
2006
- allow.custom().to(authoringOperations),
2007
1968
  ]),
2008
1969
  PublishedCategory: a
2009
1970
  .model({
@@ -2039,7 +2000,6 @@ const schema = a.schema({
2039
2000
  .authorization((allow) => [
2040
2001
  allow.guest().to(["read"]),
2041
2002
  allow.groups(contentWriteGroups),
2042
- allow.custom().to(authoringOperations),
2043
2003
  ]),
2044
2004
  }).authorization((allow) => [
2045
2005
  allow.resource(categoryAction),
@@ -2053,17 +2013,19 @@ const schema = a.schema({
2053
2013
  allow.resource(slackEvents),
2054
2014
  allow.resource(slackDelivery),
2055
2015
  ]);
2056
- export const data = defineData({
2057
- name: "PapyrusCmsApi",
2058
- schema: leanSchema,
2059
- authorizationModes: {
2060
- defaultAuthorizationMode: "userPool",
2061
- apiKeyAuthorizationMode: {
2062
- expiresInDays: 365,
2063
- },
2064
- lambdaAuthorizationMode: {
2065
- function: graphqlJwtAuthorizer,
2066
- timeToLiveInSeconds: 300,
2016
+ /**
2017
+ * The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
2018
+ * a function: a site without plugins passes none and gets exactly the base schema.
2019
+ */
2020
+ export function defineSiteData(pluginDefinitions = {}) {
2021
+ return defineData({
2022
+ name: "PapyrusCmsApi",
2023
+ schema: Object.keys(pluginDefinitions).length === 0 ? leanSchema : schemaWithPlugins(pluginDefinitions),
2024
+ authorizationModes: {
2025
+ defaultAuthorizationMode: "userPool",
2026
+ apiKeyAuthorizationMode: {
2027
+ expiresInDays: 365,
2028
+ },
2067
2029
  },
2068
- },
2069
- });
2030
+ });
2031
+ }