@anthusai/papyrus 1.0.0-next.6 → 1.0.0-next.61

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 (208) hide show
  1. package/amplify/auth/redirect-urls.js +54 -0
  2. package/amplify/auth/redirect-urls.ts +66 -0
  3. package/amplify/auth/resource.js +20 -5
  4. package/amplify/auth/resource.ts +27 -5
  5. package/amplify/data/resource.js +38 -80
  6. package/amplify/data/resource.ts +38 -80
  7. package/amplify/data/schema.js +41 -60
  8. package/amplify/data/schema.ts +43 -60
  9. package/amplify/functions/category-action/handler.ts +5 -3
  10. package/amplify/functions/console-chat-responder/py/execute_tactus_runner.py +0 -10
  11. package/amplify/functions/console-chat-responder/resource.js +0 -7
  12. package/amplify/functions/console-chat-responder/resource.ts +0 -8
  13. package/amplify/functions/console-chat-responder/src/main.rs +0 -9
  14. package/amplify/functions/content-actions/handler.py +144 -2
  15. package/amplify/functions/content-actions/requirements.txt +2 -1
  16. package/amplify/functions/content-actions/resource.js +6 -1
  17. package/amplify/functions/content-actions/resource.ts +9 -2
  18. package/amplify/functions/renditions/handler.py +120 -0
  19. package/amplify/functions/renditions/requirements.txt +4 -0
  20. package/amplify/functions/shared/python-bundle.js +42 -2
  21. package/amplify/functions/shared/python-bundle.ts +47 -2
  22. package/amplify/functions/shared/reference-curation-metadata.ts +29 -0
  23. package/amplify/inbound-email/ses-intake.js +86 -0
  24. package/amplify/inbound-email/ses-intake.ts +110 -0
  25. package/amplify/plugins/registry.js +19 -0
  26. package/amplify/plugins/registry.ts +23 -0
  27. package/amplify/plugins/signup/function/handler.py +200 -0
  28. package/amplify/plugins/signup/function/resource.js +27 -0
  29. package/amplify/plugins/signup/function/resource.ts +35 -0
  30. package/amplify/plugins/signup/papyrus.plugin.js +59 -0
  31. package/amplify/plugins/signup/papyrus.plugin.ts +74 -0
  32. package/amplify/plugins/signup/schema.js +40 -0
  33. package/amplify/plugins/signup/schema.ts +41 -0
  34. package/amplify/plugins/signup/waf.js +48 -0
  35. package/amplify/plugins/signup/waf.ts +51 -0
  36. package/amplify/plugins/types.js +1 -0
  37. package/amplify/plugins/types.ts +39 -0
  38. package/amplify/plugins/wire.js +24 -0
  39. package/amplify/plugins/wire.ts +26 -0
  40. package/amplify/publication/default-publication.js +18 -0
  41. package/amplify/publication/default-publication.ts +20 -0
  42. package/amplify/publication/invalidation-alarm.js +26 -0
  43. package/amplify/publication/invalidation-alarm.ts +30 -0
  44. package/amplify/publication/redirect-and-index.js +37 -0
  45. package/amplify/publication/renditions-function.js +74 -0
  46. package/amplify/publication/renditions-function.ts +112 -0
  47. package/amplify/publication/renditions-settings.js +51 -0
  48. package/amplify/publication/renditions-settings.ts +58 -0
  49. package/amplify/publication/reproject-on-deploy.js +73 -0
  50. package/amplify/publication/reproject-on-deploy.ts +78 -0
  51. package/amplify/publication/s3-projection-settings.js +67 -0
  52. package/amplify/publication/s3-projection-settings.ts +101 -0
  53. package/amplify/publication/s3-projection.js +151 -0
  54. package/amplify/publication/s3-projection.ts +201 -0
  55. package/amplify/resolver-waves.js +26 -0
  56. package/amplify/resolver-waves.ts +34 -0
  57. package/amplify/revalidate-invalidation-settings.js +30 -0
  58. package/amplify/revalidate-invalidation-settings.ts +35 -0
  59. package/amplify/revalidate-secret-policy.js +13 -0
  60. package/amplify/revalidate-secret-policy.ts +19 -0
  61. package/amplify/site-backend-config.js +65 -1
  62. package/amplify/site-backend-config.ts +153 -2
  63. package/amplify/site-backend-names.js +103 -0
  64. package/amplify/site-backend-names.ts +166 -0
  65. package/amplify/site-backend.js +143 -176
  66. package/amplify/site-backend.ts +181 -201
  67. package/amplify/storage-backups/construct.js +31 -0
  68. package/amplify/storage-backups/construct.ts +47 -0
  69. package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +8 -1
  70. package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -0
  71. package/app/[year]/[month]/[day]/page/[pageNumber]/page.tsx +6 -1
  72. package/app/[year]/[month]/[day]/page.tsx +1 -1
  73. package/app/[year]/[month]/[day]/section/[sectionKey]/page.tsx +6 -1
  74. package/app/api/archive/editions/route.ts +1 -1
  75. package/app/api/media/[...path]/route.ts +5 -16
  76. package/app/api/revalidate/route.ts +15 -7
  77. package/app/archive/page.tsx +1 -1
  78. package/app/articles/[slug]/page.tsx +7 -5
  79. package/app/blog-rhythm.css +278 -0
  80. package/app/globals.css +2 -0
  81. package/app/layout.tsx +16 -0
  82. package/app/newsroom/[section]/[...selection]/page.tsx +9 -6
  83. package/app/newsroom/[section]/page.tsx +6 -3
  84. package/app/newsroom/layout.tsx +4 -9
  85. package/app/newsroom/settings/page.tsx +6 -0
  86. package/app/newsroom/work/page.tsx +10 -0
  87. package/app/page.tsx +22 -8
  88. package/app/robots.ts +2 -5
  89. package/app/tailwind.css +1 -0
  90. package/bin/papyrus-infra.mjs +3 -3
  91. package/components/amplify-client-provider.tsx +5 -22
  92. package/components/archive-shell.tsx +2 -22
  93. package/components/article-video.tsx +152 -5
  94. package/components/blog-page-background.tsx +23 -6
  95. package/components/markus-ir-preview.tsx +22 -1
  96. package/components/news-desk-page.tsx +4 -15
  97. package/components/news-desk-taxonomy-client.ts +53 -2
  98. package/components/newspaper.tsx +6 -2
  99. package/components/newsroom-access-gate.tsx +2 -1
  100. package/components/newsroom-article-editor.tsx +109 -5
  101. package/components/newsroom-board-view.tsx +100 -0
  102. package/components/newsroom-client-shell.tsx +12 -0
  103. package/components/newsroom-curation-provider.tsx +17 -0
  104. package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
  105. package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
  106. package/components/newsroom-fonts/playfair-display-OFL.txt +93 -0
  107. package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
  108. package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
  109. package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +93 -0
  110. package/components/newsroom-newsprint-board.css +48 -0
  111. package/components/newsroom-ops-overview.tsx +28 -11
  112. package/components/newsroom-ops-shell.tsx +7 -1
  113. package/components/newsroom-organizer-shell.tsx +130 -0
  114. package/components/newsroom-organizer.css +63 -0
  115. package/components/newsroom-references-view.tsx +92 -8
  116. package/components/papyrus-console-shell.tsx +4 -2
  117. package/components/pictogram-figure.tsx +9 -2
  118. package/components/presentation-header.tsx +135 -0
  119. package/components/presentation-rhythm-hrule.tsx +17 -0
  120. package/components/publication-cyclotron-panel.tsx +57 -0
  121. package/components/reader-auth-control.tsx +8 -5
  122. package/components/reference-curation-controls.tsx +77 -0
  123. package/components/reference-cyclotron-status.tsx +109 -0
  124. package/components/reference-priming.tsx +18 -0
  125. package/components/reference-relevance-review.tsx +75 -0
  126. package/components/settings-page.tsx +2 -1
  127. package/components/signup-entries-panel.tsx +94 -0
  128. package/components/topic-steering-workspace.tsx +74 -6
  129. package/components/use-blog-header-obstacles.ts +81 -0
  130. package/components/use-brand-fonts-ready.ts +28 -0
  131. package/components/use-near-viewport.ts +30 -0
  132. package/components/use-rhythm-overlay.ts +29 -0
  133. package/infra/amplify-app-shell.js +202 -71
  134. package/infra/amplify-app-shell.ts +211 -77
  135. package/infra/build-specs.js +23 -8
  136. package/infra/build-specs.ts +27 -11
  137. package/infra/site-config.js +259 -34
  138. package/infra/site-config.ts +314 -43
  139. package/lib/amplify-outputs-path.ts +5 -1
  140. package/lib/amplify-server-runtime.ts +36 -1
  141. package/lib/blog-feature-solver.ts +459 -0
  142. package/lib/blog-rhythm.ts +134 -0
  143. package/lib/brand-fonts-watch.ts +43 -0
  144. package/lib/brand-fonts.ts +112 -0
  145. package/lib/cached-content-repository.ts +12 -0
  146. package/lib/category-repository.ts +42 -93
  147. package/lib/content-actions-demo.ts +19 -1
  148. package/lib/content-repository.ts +3 -0
  149. package/lib/content-source-context.ts +12 -2
  150. package/lib/content-types.ts +4 -0
  151. package/lib/curation-client.ts +61 -0
  152. package/lib/edition-routes.ts +31 -29
  153. package/lib/graphql-content-repository.ts +67 -24
  154. package/lib/media-route-response.ts +45 -0
  155. package/lib/newspaper-layout.ts +3 -2
  156. package/lib/newsroom-base-path.ts +12 -3
  157. package/lib/newsroom-board.ts +60 -0
  158. package/lib/newsroom-category-drilldown.ts +3 -2
  159. package/lib/newsroom-forum-routes.ts +6 -4
  160. package/lib/newsroom-index-filters.ts +14 -10
  161. package/lib/newsroom-media-backend.ts +142 -0
  162. package/lib/newsroom-media.ts +182 -0
  163. package/lib/newsroom-nav.ts +1 -0
  164. package/lib/newsroom-organizer-nav.ts +34 -0
  165. package/lib/newsroom-section-routing.ts +20 -0
  166. package/lib/oauth-redirect-priority.ts +40 -0
  167. package/lib/papyrus-web-locations.ts +7 -6
  168. package/lib/plugin-settings.ts +11 -0
  169. package/lib/presentation-footer.ts +3 -2
  170. package/lib/pretext-layout.ts +12 -3
  171. package/lib/publication-cyclotron.ts +74 -0
  172. package/lib/rate-limit-retry.ts +55 -0
  173. package/lib/reader-base-path.ts +24 -0
  174. package/lib/reader-cache-lifetime.ts +5 -0
  175. package/lib/reader-static-params.ts +85 -4
  176. package/lib/reader-storage-url.ts +9 -12
  177. package/lib/reference-policy.ts +5 -0
  178. package/lib/relevance-decisions.ts +103 -0
  179. package/lib/relevance-status.ts +63 -0
  180. package/lib/renderer.ts +7 -0
  181. package/lib/revalidate-prewarm.ts +53 -0
  182. package/lib/revalidate-secret.ts +59 -0
  183. package/lib/robots-policy.ts +14 -0
  184. package/lib/root-route-redirect.ts +16 -0
  185. package/lib/semantic-graph.ts +7 -0
  186. package/lib/shared-credentials-provider.ts +61 -0
  187. package/lib/signup-csv.ts +24 -0
  188. package/lib/site-brand.ts +40 -0
  189. package/lib/staging-gated-path.ts +23 -0
  190. package/lib/staging-preview-object.ts +21 -5
  191. package/lib/test-editor-override.ts +4 -0
  192. package/lib/video-loading.ts +22 -0
  193. package/lib/video-script.ts +14 -0
  194. package/middleware.ts +11 -19
  195. package/package.json +54 -1
  196. package/renderers/pretext/article-page.tsx +39 -3
  197. package/renderers/pretext/presentation-shared.tsx +113 -0
  198. package/renderers/pretext/presentation-shell.tsx +15 -102
  199. package/renderers/pretext/rhythm-article-page.tsx +165 -0
  200. package/renderers/pretext/rhythm-blog-presentation.tsx +279 -0
  201. package/renderers/pretext/rhythm-shell-style.ts +35 -0
  202. package/routes.manifest.json +52 -12
  203. package/src/sync.mjs +30 -6
  204. package/src/with-papyrus.d.mts +9 -0
  205. package/src/with-papyrus.mjs +48 -3
  206. package/amplify/functions/graphql-jwt-authorizer/handler.ts +0 -193
  207. package/amplify/functions/graphql-jwt-authorizer/resource.js +0 -14
  208. package/amplify/functions/graphql-jwt-authorizer/resource.ts +0 -15
@@ -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({
@@ -915,7 +908,6 @@ const schema = a.schema({
915
908
  .authorization((allow) => [
916
909
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
917
910
  allow.authenticated("identityPool").to(authoringOperations),
918
- allow.custom().to(authoringOperations),
919
911
  ]),
920
912
  AssignmentEvent: a
921
913
  .model({
@@ -938,7 +930,6 @@ const schema = a.schema({
938
930
  ])
939
931
  .authorization((allow) => [
940
932
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
941
- allow.custom().to(authoringOperations),
942
933
  ]),
943
934
  ProcedureDefinition: a
944
935
  .model({
@@ -963,7 +954,6 @@ const schema = a.schema({
963
954
  ])
964
955
  .authorization((allow) => [
965
956
  allow.group(adminGroup),
966
- allow.custom().to(authoringOperations),
967
957
  ]),
968
958
  ProcedureVersion: a
969
959
  .model({
@@ -990,7 +980,6 @@ const schema = a.schema({
990
980
  ])
991
981
  .authorization((allow) => [
992
982
  allow.group(adminGroup),
993
- allow.custom().to(authoringOperations),
994
983
  ]),
995
984
  ProcedureRun: a
996
985
  .model({
@@ -1023,7 +1012,6 @@ const schema = a.schema({
1023
1012
  .authorization((allow) => [
1024
1013
  allow.group("editor").to(["read"]),
1025
1014
  allow.group(adminGroup).to(authoringOperations),
1026
- allow.custom().to(authoringOperations),
1027
1015
  ]),
1028
1016
  NewsroomSection: a
1029
1017
  .model({
@@ -1051,7 +1039,6 @@ const schema = a.schema({
1051
1039
  ])
1052
1040
  .authorization((allow) => [
1053
1041
  allow.groups(categoryWriteGroups),
1054
- allow.custom().to(authoringOperations),
1055
1042
  ]),
1056
1043
  KnowledgeCorpus: a
1057
1044
  .model({
@@ -1069,7 +1056,6 @@ const schema = a.schema({
1069
1056
  ])
1070
1057
  .authorization((allow) => [
1071
1058
  allow.groups(categoryWriteGroups).to(["read"]),
1072
- allow.custom().to(authoringOperations),
1073
1059
  ]),
1074
1060
  KnowledgeImportRun: a
1075
1061
  .model({
@@ -1097,7 +1083,6 @@ const schema = a.schema({
1097
1083
  ])
1098
1084
  .authorization((allow) => [
1099
1085
  allow.groups(categoryWriteGroups).to(["read"]),
1100
- allow.custom().to(authoringOperations),
1101
1086
  ]),
1102
1087
  KnowledgeRawPayload: a
1103
1088
  .model({
@@ -1115,7 +1100,6 @@ const schema = a.schema({
1115
1100
  ])
1116
1101
  .authorization((allow) => [
1117
1102
  allow.groups(categoryWriteGroups),
1118
- allow.custom().to(authoringOperations),
1119
1103
  ]),
1120
1104
  KnowledgeArtifact: a
1121
1105
  .model({
@@ -1135,7 +1119,6 @@ const schema = a.schema({
1135
1119
  ])
1136
1120
  .authorization((allow) => [
1137
1121
  allow.groups(categoryWriteGroups).to(["read"]),
1138
- allow.custom().to(authoringOperations),
1139
1122
  ]),
1140
1123
  CategorySet: a
1141
1124
  .model({
@@ -1165,7 +1148,6 @@ const schema = a.schema({
1165
1148
  ])
1166
1149
  .authorization((allow) => [
1167
1150
  allow.groups(categoryWriteGroups),
1168
- allow.custom().to(authoringOperations),
1169
1151
  ]),
1170
1152
  Category: a
1171
1153
  .model({
@@ -1207,7 +1189,6 @@ const schema = a.schema({
1207
1189
  ])
1208
1190
  .authorization((allow) => [
1209
1191
  allow.groups(categoryWriteGroups),
1210
- allow.custom().to(authoringOperations),
1211
1192
  ]),
1212
1193
  CategoryKeyword: a
1213
1194
  .model({
@@ -1236,7 +1217,6 @@ const schema = a.schema({
1236
1217
  ])
1237
1218
  .authorization((allow) => [
1238
1219
  allow.groups(categoryWriteGroups),
1239
- allow.custom().to(authoringOperations),
1240
1220
  ]),
1241
1221
  LexicalSteeringRule: a
1242
1222
  .model({
@@ -1265,7 +1245,6 @@ const schema = a.schema({
1265
1245
  ])
1266
1246
  .authorization((allow) => [
1267
1247
  allow.groups(categoryWriteGroups),
1268
- allow.custom().to(authoringOperations),
1269
1248
  ]),
1270
1249
  SteeringProposal: a
1271
1250
  .model({
@@ -1303,7 +1282,6 @@ const schema = a.schema({
1303
1282
  ])
1304
1283
  .authorization((allow) => [
1305
1284
  allow.groups(categoryWriteGroups).to(["read"]),
1306
- allow.custom().to(authoringOperations),
1307
1285
  ]),
1308
1286
  SteeringDecision: a
1309
1287
  .model({
@@ -1323,7 +1301,6 @@ const schema = a.schema({
1323
1301
  ])
1324
1302
  .authorization((allow) => [
1325
1303
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1326
- allow.custom().to(authoringOperations),
1327
1304
  ]),
1328
1305
  Reference: a
1329
1306
  .model({
@@ -1375,7 +1352,6 @@ const schema = a.schema({
1375
1352
  ])
1376
1353
  .authorization((allow) => [
1377
1354
  allow.groups(categoryWriteGroups).to(["read"]),
1378
- allow.custom().to(authoringOperations),
1379
1355
  ]),
1380
1356
  ReferenceAttachment: a
1381
1357
  .model({
@@ -1405,7 +1381,6 @@ const schema = a.schema({
1405
1381
  ])
1406
1382
  .authorization((allow) => [
1407
1383
  allow.groups(categoryWriteGroups).to(["read"]),
1408
- allow.custom().to(authoringOperations),
1409
1384
  ]),
1410
1385
  SemanticNode: a
1411
1386
  .model({
@@ -1448,7 +1423,6 @@ const schema = a.schema({
1448
1423
  ])
1449
1424
  .authorization((allow) => [
1450
1425
  allow.groups(categoryWriteGroups).to(["read"]),
1451
- allow.custom().to(authoringOperations),
1452
1426
  ]),
1453
1427
  Message: a
1454
1428
  .model({
@@ -1497,7 +1471,6 @@ const schema = a.schema({
1497
1471
  ])
1498
1472
  .authorization((allow) => [
1499
1473
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1500
- allow.custom().to(authoringOperations),
1501
1474
  allow.authenticated("identityPool").to(["read", "create", "update"]),
1502
1475
  ]),
1503
1476
  MessageThread: a
@@ -1536,7 +1509,6 @@ const schema = a.schema({
1536
1509
  .authorization((allow) => [
1537
1510
  allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
1538
1511
  allow.authenticated("identityPool").to(authoringOperations),
1539
- allow.custom().to(authoringOperations),
1540
1512
  ]),
1541
1513
  ModelAttachment: a
1542
1514
  .model({
@@ -1568,7 +1540,6 @@ const schema = a.schema({
1568
1540
  ])
1569
1541
  .authorization((allow) => [
1570
1542
  allow.groups(categoryWriteGroups).to(["read"]),
1571
- allow.custom().to(authoringOperations),
1572
1543
  ]),
1573
1544
  SemanticRelationType: a
1574
1545
  .model({
@@ -1596,7 +1567,6 @@ const schema = a.schema({
1596
1567
  ])
1597
1568
  .authorization((allow) => [
1598
1569
  allow.groups(categoryWriteGroups),
1599
- allow.custom().to(authoringOperations),
1600
1570
  ]),
1601
1571
  SemanticRelation: a
1602
1572
  .model({
@@ -1647,7 +1617,6 @@ const schema = a.schema({
1647
1617
  ])
1648
1618
  .authorization((allow) => [
1649
1619
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1650
- allow.custom().to(authoringOperations),
1651
1620
  ]),
1652
1621
  Item: a
1653
1622
  .model({
@@ -1697,7 +1666,6 @@ const schema = a.schema({
1697
1666
  ])
1698
1667
  .authorization((allow) => [
1699
1668
  allow.groups(contentWriteGroups),
1700
- allow.custom().to(authoringOperations),
1701
1669
  ]),
1702
1670
  Tag: a
1703
1671
  .model({
@@ -1714,7 +1682,6 @@ const schema = a.schema({
1714
1682
  ])
1715
1683
  .authorization((allow) => [
1716
1684
  allow.groups(contentWriteGroups),
1717
- allow.custom().to(authoringOperations),
1718
1685
  ]),
1719
1686
  ItemTag: a
1720
1687
  .model({
@@ -1734,7 +1701,6 @@ const schema = a.schema({
1734
1701
  ])
1735
1702
  .authorization((allow) => [
1736
1703
  allow.groups(contentWriteGroups),
1737
- allow.custom().to(authoringOperations),
1738
1704
  ]),
1739
1705
  MediaAsset: a
1740
1706
  .model({
@@ -1767,7 +1733,6 @@ const schema = a.schema({
1767
1733
  ])
1768
1734
  .authorization((allow) => [
1769
1735
  allow.groups(contentWriteGroups),
1770
- allow.custom().to(authoringOperations),
1771
1736
  ]),
1772
1737
  Edition: a
1773
1738
  .model({
@@ -1800,7 +1765,6 @@ const schema = a.schema({
1800
1765
  ])
1801
1766
  .authorization((allow) => [
1802
1767
  allow.groups(contentWriteGroups),
1803
- allow.custom().to(authoringOperations),
1804
1768
  ]),
1805
1769
  EditionSlot: a
1806
1770
  .model({
@@ -1826,7 +1790,6 @@ const schema = a.schema({
1826
1790
  ])
1827
1791
  .authorization((allow) => [
1828
1792
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1829
- allow.custom().to(authoringOperations),
1830
1793
  ]),
1831
1794
  EditionItem: a
1832
1795
  .model({
@@ -1849,7 +1812,6 @@ const schema = a.schema({
1849
1812
  ])
1850
1813
  .authorization((allow) => [
1851
1814
  allow.groups(contentWriteGroups),
1852
- allow.custom().to(authoringOperations),
1853
1815
  ]),
1854
1816
  PublishedItem: a
1855
1817
  .model({
@@ -1890,7 +1852,6 @@ const schema = a.schema({
1890
1852
  .authorization((allow) => [
1891
1853
  allow.guest().to(["read"]),
1892
1854
  allow.groups(contentWriteGroups),
1893
- allow.custom().to(authoringOperations),
1894
1855
  ]),
1895
1856
  PublishedMediaAsset: a
1896
1857
  .model({
@@ -1926,7 +1887,6 @@ const schema = a.schema({
1926
1887
  .authorization((allow) => [
1927
1888
  allow.guest().to(["read"]),
1928
1889
  allow.groups(contentWriteGroups),
1929
- allow.custom().to(authoringOperations),
1930
1890
  ]),
1931
1891
  PublishedEdition: a
1932
1892
  .model({
@@ -1952,7 +1912,6 @@ const schema = a.schema({
1952
1912
  .authorization((allow) => [
1953
1913
  allow.guest().to(["read"]),
1954
1914
  allow.groups(contentWriteGroups),
1955
- allow.custom().to(authoringOperations),
1956
1915
  ]),
1957
1916
  PublishedEditionItem: a
1958
1917
  .model({
@@ -1977,7 +1936,6 @@ const schema = a.schema({
1977
1936
  .authorization((allow) => [
1978
1937
  allow.guest().to(["read"]),
1979
1938
  allow.groups(contentWriteGroups),
1980
- allow.custom().to(authoringOperations),
1981
1939
  ]),
1982
1940
  PublishedCategorySet: a
1983
1941
  .model({
@@ -2003,7 +1961,6 @@ const schema = a.schema({
2003
1961
  .authorization((allow) => [
2004
1962
  allow.guest().to(["read"]),
2005
1963
  allow.groups(contentWriteGroups),
2006
- allow.custom().to(authoringOperations),
2007
1964
  ]),
2008
1965
  PublishedCategory: a
2009
1966
  .model({
@@ -2039,7 +1996,6 @@ const schema = a.schema({
2039
1996
  .authorization((allow) => [
2040
1997
  allow.guest().to(["read"]),
2041
1998
  allow.groups(contentWriteGroups),
2042
- allow.custom().to(authoringOperations),
2043
1999
  ]),
2044
2000
  }).authorization((allow) => [
2045
2001
  allow.resource(categoryAction),
@@ -2053,17 +2009,19 @@ const schema = a.schema({
2053
2009
  allow.resource(slackEvents),
2054
2010
  allow.resource(slackDelivery),
2055
2011
  ]);
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,
2012
+ /**
2013
+ * The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
2014
+ * a function: a site without plugins passes none and gets exactly the base schema.
2015
+ */
2016
+ export function defineSiteData(pluginDefinitions = {}) {
2017
+ return defineData({
2018
+ name: "PapyrusCmsApi",
2019
+ schema: Object.keys(pluginDefinitions).length === 0 ? leanSchema : schemaWithPlugins(pluginDefinitions),
2020
+ authorizationModes: {
2021
+ defaultAuthorizationMode: "userPool",
2022
+ apiKeyAuthorizationMode: {
2023
+ expiresInDays: 365,
2024
+ },
2067
2025
  },
2068
- },
2069
- });
2026
+ });
2027
+ }