@anthusai/papyrus 1.0.0-next.8 → 1.0.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 (209) 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 +42 -80
  6. package/amplify/data/resource.ts +42 -80
  7. package/amplify/data/schema.js +45 -60
  8. package/amplify/data/schema.ts +47 -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 +143 -1
  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/cyclotron/priming-proof/route.ts +11 -0
  76. package/app/api/media/[...path]/route.ts +5 -16
  77. package/app/api/revalidate/route.ts +15 -7
  78. package/app/archive/page.tsx +1 -1
  79. package/app/articles/[slug]/page.tsx +7 -5
  80. package/app/blog-rhythm.css +278 -0
  81. package/app/cyclotron/page.tsx +13 -0
  82. package/app/globals.css +2 -0
  83. package/app/layout.tsx +16 -0
  84. package/app/newsroom/[section]/[...selection]/page.tsx +9 -6
  85. package/app/newsroom/[section]/page.tsx +6 -3
  86. package/app/newsroom/layout.tsx +4 -9
  87. package/app/newsroom/settings/page.tsx +6 -0
  88. package/app/newsroom/work/page.tsx +10 -0
  89. package/app/page.tsx +22 -8
  90. package/app/robots.ts +2 -5
  91. package/app/tailwind.css +1 -0
  92. package/bin/papyrus-infra.mjs +3 -3
  93. package/components/amplify-client-provider.tsx +5 -22
  94. package/components/archive-shell.tsx +2 -22
  95. package/components/article-video.tsx +152 -5
  96. package/components/blog-page-background.tsx +23 -6
  97. package/components/news-desk-page.tsx +4 -15
  98. package/components/news-desk-taxonomy-client.ts +90 -3
  99. package/components/newspaper.tsx +6 -2
  100. package/components/newsroom-access-gate.tsx +2 -1
  101. package/components/newsroom-board-view.tsx +99 -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/priming-proof-page.tsx +92 -0
  121. package/components/publication-cyclotron-panel.tsx +57 -0
  122. package/components/reader-auth-control.tsx +8 -5
  123. package/components/reference-curation-controls.tsx +77 -0
  124. package/components/reference-cyclotron-status.tsx +109 -0
  125. package/components/reference-priming.tsx +18 -0
  126. package/components/reference-relevance-review.tsx +75 -0
  127. package/components/settings-page.tsx +2 -1
  128. package/components/signup-entries-panel.tsx +94 -0
  129. package/components/topic-steering-workspace.tsx +78 -6
  130. package/components/use-blog-header-obstacles.ts +81 -0
  131. package/components/use-brand-fonts-ready.ts +28 -0
  132. package/components/use-near-viewport.ts +30 -0
  133. package/components/use-rhythm-overlay.ts +29 -0
  134. package/infra/amplify-app-shell.js +219 -71
  135. package/infra/amplify-app-shell.ts +231 -77
  136. package/infra/build-specs.js +23 -8
  137. package/infra/build-specs.ts +27 -11
  138. package/infra/site-config.js +277 -34
  139. package/infra/site-config.ts +340 -43
  140. package/lib/amplify-outputs-path.ts +5 -1
  141. package/lib/amplify-server-runtime.ts +36 -1
  142. package/lib/approved-priming-proof-reports.ts +6 -0
  143. package/lib/blog-feature-solver.ts +459 -0
  144. package/lib/blog-rhythm.ts +134 -0
  145. package/lib/brand-fonts-watch.ts +43 -0
  146. package/lib/brand-fonts.ts +112 -0
  147. package/lib/cached-content-repository.ts +12 -0
  148. package/lib/category-repository.ts +43 -93
  149. package/lib/content-item-lifecycle.ts +55 -0
  150. package/lib/content-repository.ts +3 -0
  151. package/lib/content-types.ts +4 -0
  152. package/lib/curation-client.ts +61 -0
  153. package/lib/edition-routes.ts +31 -29
  154. package/lib/graphql-content-repository.ts +56 -22
  155. package/lib/media-route-response.ts +45 -0
  156. package/lib/newspaper-layout.ts +3 -2
  157. package/lib/newsroom-base-path.ts +12 -3
  158. package/lib/newsroom-board.ts +99 -0
  159. package/lib/newsroom-category-drilldown.ts +3 -2
  160. package/lib/newsroom-forum-routes.ts +6 -4
  161. package/lib/newsroom-index-filters.ts +14 -10
  162. package/lib/newsroom-nav.ts +3 -1
  163. package/lib/newsroom-organizer-nav.ts +37 -0
  164. package/lib/newsroom-section-routing.ts +20 -0
  165. package/lib/oauth-redirect-priority.ts +40 -0
  166. package/lib/papyrus-web-locations.ts +7 -6
  167. package/lib/plugin-settings.ts +11 -0
  168. package/lib/presentation-footer.ts +3 -2
  169. package/lib/pretext-layout.ts +12 -3
  170. package/lib/priming-proof-report.ts +89 -0
  171. package/lib/prospectus-site-identity.ts +303 -0
  172. package/lib/publication-cyclotron.ts +74 -0
  173. package/lib/rate-limit-retry.ts +55 -0
  174. package/lib/reader-base-path.ts +24 -0
  175. package/lib/reader-cache-lifetime.ts +5 -0
  176. package/lib/reader-static-params.ts +85 -4
  177. package/lib/reader-storage-url.ts +9 -12
  178. package/lib/reference-policy.ts +5 -0
  179. package/lib/relevance-decisions.ts +103 -0
  180. package/lib/relevance-status.ts +63 -0
  181. package/lib/renderer.ts +7 -0
  182. package/lib/revalidate-prewarm.ts +53 -0
  183. package/lib/revalidate-secret.ts +59 -0
  184. package/lib/robots-policy.ts +14 -0
  185. package/lib/root-route-redirect.ts +16 -0
  186. package/lib/semantic-graph.ts +7 -0
  187. package/lib/shared-credentials-provider.ts +61 -0
  188. package/lib/signup-csv.ts +24 -0
  189. package/lib/site-brand.ts +59 -0
  190. package/lib/staging-gated-path.ts +23 -0
  191. package/lib/staging-preview-object.ts +21 -5
  192. package/lib/test-editor-override.ts +4 -0
  193. package/lib/video-loading.ts +22 -0
  194. package/lib/video-script.ts +14 -0
  195. package/middleware.ts +11 -19
  196. package/package.json +64 -1
  197. package/renderers/pretext/article-page.tsx +39 -3
  198. package/renderers/pretext/presentation-shared.tsx +113 -0
  199. package/renderers/pretext/presentation-shell.tsx +15 -102
  200. package/renderers/pretext/rhythm-article-page.tsx +165 -0
  201. package/renderers/pretext/rhythm-blog-presentation.tsx +279 -0
  202. package/renderers/pretext/rhythm-shell-style.ts +35 -0
  203. package/routes.manifest.json +68 -12
  204. package/src/sync.mjs +30 -6
  205. package/src/with-papyrus.d.mts +9 -0
  206. package/src/with-papyrus.mjs +48 -3
  207. package/amplify/functions/graphql-jwt-authorizer/handler.ts +0 -193
  208. package/amplify/functions/graphql-jwt-authorizer/resource.js +0 -14
  209. package/amplify/functions/graphql-jwt-authorizer/resource.ts +0 -15
@@ -20,7 +20,7 @@ const categoryWriteGroups = ["editor", "admin"];
20
20
  const categoryAppendOnlyOperations = ["read", "create"];
21
21
  const modelWithoutSubscriptions = (fields) => a.model(fields).disableOperations(["subscriptions"]);
22
22
  const realtimeModel = (fields) => a.model(fields);
23
- export const schema = a.schema({
23
+ const baseDefinitions = {
24
24
  UserProfile: modelWithoutSubscriptions({
25
25
  id: a.id().required(),
26
26
  email: a.email(),
@@ -245,11 +245,12 @@ export const schema = a.schema({
245
245
  actorLabel: a.string(),
246
246
  note: a.string(),
247
247
  reasonCode: a.string(),
248
+ decisionRelationId: a.id(),
249
+ shareable: a.boolean(),
248
250
  })
249
251
  .returns(a.ref("ReferenceCurationActionResult"))
250
252
  .authorization((allow) => [
251
253
  allow.groups(categoryWriteGroups),
252
- allow.custom(),
253
254
  ])
254
255
  .handler(a.handler.function(categoryAction)),
255
256
  setReferenceQualityRating: a
@@ -264,7 +265,6 @@ export const schema = a.schema({
264
265
  .returns(a.ref("ReferenceQualityActionResult"))
265
266
  .authorization((allow) => [
266
267
  allow.groups(categoryWriteGroups),
267
- allow.custom(),
268
268
  ])
269
269
  .handler(a.handler.function(categoryAction)),
270
270
  createCategorySetDraft: a
@@ -367,7 +367,7 @@ export const schema = a.schema({
367
367
  getNewsroomSummary: a
368
368
  .query()
369
369
  .returns(a.ref("NewsroomSummary"))
370
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
370
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
371
371
  .handler(a.handler.function(newsroomSummary)),
372
372
  deriveMarkus: a
373
373
  .query()
@@ -405,7 +405,7 @@ export const schema = a.schema({
405
405
  input: a.json().required(),
406
406
  })
407
407
  .returns(a.json())
408
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
408
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
409
409
  .handler(a.handler.function(knowledgeQuery)),
410
410
  updateNewsroomSummary: a
411
411
  .mutation()
@@ -415,7 +415,7 @@ export const schema = a.schema({
415
415
  reason: a.string(),
416
416
  })
417
417
  .returns(a.ref("NewsroomSummary"))
418
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
418
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
419
419
  .handler(a.handler.function(newsroomSummary)),
420
420
  ModelAttachmentUploadSlot: a.customType({
421
421
  ok: a.boolean().required(),
@@ -471,7 +471,7 @@ export const schema = a.schema({
471
471
  status: a.string(),
472
472
  })
473
473
  .returns(a.ref("ModelAttachmentUploadSlot"))
474
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
474
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
475
475
  .handler(a.handler.function(modelAttachmentUpload)),
476
476
  completeModelAttachmentUpload: a
477
477
  .mutation()
@@ -492,7 +492,7 @@ export const schema = a.schema({
492
492
  status: a.string(),
493
493
  })
494
494
  .returns(a.ref("ModelAttachment"))
495
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
495
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
496
496
  .handler(a.handler.function(modelAttachmentUpload)),
497
497
  abortModelAttachmentUpload: a
498
498
  .mutation()
@@ -513,7 +513,7 @@ export const schema = a.schema({
513
513
  status: a.string(),
514
514
  })
515
515
  .returns(a.ref("ModelAttachmentUploadAbortResult"))
516
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
516
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
517
517
  .handler(a.handler.function(modelAttachmentUpload)),
518
518
  createModelAttachmentDownload: a
519
519
  .mutation()
@@ -521,7 +521,7 @@ export const schema = a.schema({
521
521
  attachmentId: a.id().required(),
522
522
  })
523
523
  .returns(a.ref("ModelAttachmentDownloadSlot"))
524
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
524
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
525
525
  .handler(a.handler.function(modelAttachmentUpload)),
526
526
  AssignmentActionResult: a.customType({
527
527
  ok: a.boolean().required(),
@@ -608,7 +608,7 @@ export const schema = a.schema({
608
608
  limit: a.integer(),
609
609
  })
610
610
  .returns(a.ref("AssignmentContext").array().required())
611
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
611
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
612
612
  .handler(a.handler.function(assignmentAction)),
613
613
  listAssignmentQueue: a
614
614
  .query()
@@ -618,7 +618,7 @@ export const schema = a.schema({
618
618
  limit: a.integer(),
619
619
  })
620
620
  .returns(a.ref("AssignmentContext").array().required())
621
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
621
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
622
622
  .handler(a.handler.function(assignmentAction)),
623
623
  getAssignmentContext: a
624
624
  .query()
@@ -626,7 +626,7 @@ export const schema = a.schema({
626
626
  assignmentId: a.id().required(),
627
627
  })
628
628
  .returns(a.ref("AssignmentContext"))
629
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
629
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
630
630
  .handler(a.handler.function(assignmentAction)),
631
631
  claimAssignment: a
632
632
  .mutation()
@@ -642,7 +642,7 @@ export const schema = a.schema({
642
642
  note: a.string(),
643
643
  })
644
644
  .returns(a.ref("AssignmentActionResult"))
645
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
645
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
646
646
  .handler(a.handler.function(assignmentAction)),
647
647
  releaseAssignment: a
648
648
  .mutation()
@@ -653,7 +653,7 @@ export const schema = a.schema({
653
653
  note: a.string(),
654
654
  })
655
655
  .returns(a.ref("AssignmentActionResult"))
656
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
656
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
657
657
  .handler(a.handler.function(assignmentAction)),
658
658
  completeAssignment: a
659
659
  .mutation()
@@ -664,7 +664,7 @@ export const schema = a.schema({
664
664
  note: a.string(),
665
665
  })
666
666
  .returns(a.ref("AssignmentActionResult"))
667
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
667
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
668
668
  .handler(a.handler.function(assignmentAction)),
669
669
  cancelAssignment: a
670
670
  .mutation()
@@ -675,7 +675,7 @@ export const schema = a.schema({
675
675
  note: a.string(),
676
676
  })
677
677
  .returns(a.ref("AssignmentActionResult"))
678
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
678
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
679
679
  .handler(a.handler.function(assignmentAction)),
680
680
  reopenAssignment: a
681
681
  .mutation()
@@ -686,7 +686,7 @@ export const schema = a.schema({
686
686
  note: a.string(),
687
687
  })
688
688
  .returns(a.ref("AssignmentActionResult"))
689
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
689
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
690
690
  .handler(a.handler.function(assignmentAction)),
691
691
  retryImmediateAssignment: a
692
692
  .mutation()
@@ -697,7 +697,7 @@ export const schema = a.schema({
697
697
  note: a.string(),
698
698
  })
699
699
  .returns(a.ref("AssignmentActionResult"))
700
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
700
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
701
701
  .handler(a.handler.function(assignmentAction)),
702
702
  listNewsroomProcedureDefinitions: a
703
703
  .query()
@@ -711,7 +711,7 @@ export const schema = a.schema({
711
711
  procedureKey: a.string(),
712
712
  })
713
713
  .returns(a.json())
714
- .authorization((allow) => [allow.group(adminGroup), allow.custom()])
714
+ .authorization((allow) => [allow.group(adminGroup)])
715
715
  .handler(a.handler.function(procedureAction)),
716
716
  saveNewsroomProcedureDefinition: a
717
717
  .mutation()
@@ -749,7 +749,7 @@ export const schema = a.schema({
749
749
  actorLabel: a.string(),
750
750
  })
751
751
  .returns(a.json())
752
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
752
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
753
753
  .handler(a.handler.function(procedureAction)),
754
754
  getNewsroomProcedureRun: a
755
755
  .query()
@@ -757,7 +757,7 @@ export const schema = a.schema({
757
757
  id: a.id().required(),
758
758
  })
759
759
  .returns(a.json())
760
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
760
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
761
761
  .handler(a.handler.function(procedureAction)),
762
762
  listNewsroomProcedureRunsByProcedure: a
763
763
  .query()
@@ -765,7 +765,7 @@ export const schema = a.schema({
765
765
  procedureId: a.id().required(),
766
766
  })
767
767
  .returns(a.json())
768
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
768
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
769
769
  .handler(a.handler.function(procedureAction)),
770
770
  Assignment: modelWithoutSubscriptions({
771
771
  id: a.id().required(),
@@ -799,9 +799,11 @@ export const schema = a.schema({
799
799
  createdAt: a.datetime().required(),
800
800
  updatedAt: a.datetime().required(),
801
801
  newsroomFeedKey: a.string(),
802
+ itemLineageId: a.id(),
802
803
  })
803
804
  .secondaryIndexes((index) => [
804
805
  index("newsroomFeedKey").sortKeys(["createdAt"]).queryField("listAssignmentsByNewsroomFeedAndCreatedAt"),
806
+ index("itemLineageId").sortKeys(["createdAt"]).queryField("listAssignmentsByItemLineageAndCreatedAt"),
805
807
  index("queueStatusKey").sortKeys(["priority", "createdAt"]).queryField("listAssignmentsByQueueStatusAndPriority"),
806
808
  index("assignmentTypeKey").sortKeys(["status", "createdAt"]).queryField("listAssignmentsByTypeStatusAndCreatedAt"),
807
809
  index("status").sortKeys(["updatedAt"]).queryField("listAssignmentsByStatusAndUpdatedAt"),
@@ -814,7 +816,6 @@ export const schema = a.schema({
814
816
  .authorization((allow) => [
815
817
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
816
818
  allow.authenticated("identityPool").to(authoringOperations),
817
- allow.custom().to(authoringOperations),
818
819
  ]),
819
820
  AssignmentEvent: modelWithoutSubscriptions({
820
821
  id: a.id().required(),
@@ -836,7 +837,6 @@ export const schema = a.schema({
836
837
  ])
837
838
  .authorization((allow) => [
838
839
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
839
- allow.custom().to(authoringOperations),
840
840
  ]),
841
841
  ProcedureDefinition: modelWithoutSubscriptions({
842
842
  id: a.id().required(),
@@ -860,7 +860,6 @@ export const schema = a.schema({
860
860
  ])
861
861
  .authorization((allow) => [
862
862
  allow.group(adminGroup),
863
- allow.custom().to(authoringOperations),
864
863
  ]),
865
864
  ProcedureVersion: modelWithoutSubscriptions({
866
865
  id: a.id().required(),
@@ -886,7 +885,6 @@ export const schema = a.schema({
886
885
  ])
887
886
  .authorization((allow) => [
888
887
  allow.group(adminGroup),
889
- allow.custom().to(authoringOperations),
890
888
  ]),
891
889
  ProcedureRun: modelWithoutSubscriptions({
892
890
  id: a.id().required(),
@@ -918,7 +916,6 @@ export const schema = a.schema({
918
916
  .authorization((allow) => [
919
917
  allow.group("editor").to(["read"]),
920
918
  allow.group(adminGroup).to(authoringOperations),
921
- allow.custom().to(authoringOperations),
922
919
  ]),
923
920
  NewsroomSection: modelWithoutSubscriptions({
924
921
  id: a.id().required(),
@@ -945,7 +942,6 @@ export const schema = a.schema({
945
942
  ])
946
943
  .authorization((allow) => [
947
944
  allow.groups(categoryWriteGroups),
948
- allow.custom().to(authoringOperations),
949
945
  ]),
950
946
  KnowledgeCorpus: modelWithoutSubscriptions({
951
947
  id: a.id().required(),
@@ -962,7 +958,6 @@ export const schema = a.schema({
962
958
  ])
963
959
  .authorization((allow) => [
964
960
  allow.groups(categoryWriteGroups).to(["read"]),
965
- allow.custom().to(authoringOperations),
966
961
  ]),
967
962
  KnowledgeImportRun: modelWithoutSubscriptions({
968
963
  id: a.id().required(),
@@ -989,7 +984,6 @@ export const schema = a.schema({
989
984
  ])
990
985
  .authorization((allow) => [
991
986
  allow.groups(categoryWriteGroups).to(["read"]),
992
- allow.custom().to(authoringOperations),
993
987
  ]),
994
988
  KnowledgeRawPayload: modelWithoutSubscriptions({
995
989
  id: a.id().required(),
@@ -1006,7 +1000,6 @@ export const schema = a.schema({
1006
1000
  ])
1007
1001
  .authorization((allow) => [
1008
1002
  allow.groups(categoryWriteGroups),
1009
- allow.custom().to(authoringOperations),
1010
1003
  ]),
1011
1004
  KnowledgeArtifact: modelWithoutSubscriptions({
1012
1005
  id: a.id().required(),
@@ -1025,7 +1018,6 @@ export const schema = a.schema({
1025
1018
  ])
1026
1019
  .authorization((allow) => [
1027
1020
  allow.groups(categoryWriteGroups).to(["read"]),
1028
- allow.custom().to(authoringOperations),
1029
1021
  ]),
1030
1022
  CategorySet: modelWithoutSubscriptions({
1031
1023
  id: a.id().required(),
@@ -1054,7 +1046,6 @@ export const schema = a.schema({
1054
1046
  ])
1055
1047
  .authorization((allow) => [
1056
1048
  allow.groups(categoryWriteGroups),
1057
- allow.custom().to(authoringOperations),
1058
1049
  ]),
1059
1050
  Category: modelWithoutSubscriptions({
1060
1051
  id: a.id().required(),
@@ -1095,7 +1086,6 @@ export const schema = a.schema({
1095
1086
  ])
1096
1087
  .authorization((allow) => [
1097
1088
  allow.groups(categoryWriteGroups),
1098
- allow.custom().to(authoringOperations),
1099
1089
  ]),
1100
1090
  CategoryKeyword: modelWithoutSubscriptions({
1101
1091
  id: a.id().required(),
@@ -1123,7 +1113,6 @@ export const schema = a.schema({
1123
1113
  ])
1124
1114
  .authorization((allow) => [
1125
1115
  allow.groups(categoryWriteGroups),
1126
- allow.custom().to(authoringOperations),
1127
1116
  ]),
1128
1117
  LexicalSteeringRule: modelWithoutSubscriptions({
1129
1118
  id: a.id().required(),
@@ -1151,7 +1140,6 @@ export const schema = a.schema({
1151
1140
  ])
1152
1141
  .authorization((allow) => [
1153
1142
  allow.groups(categoryWriteGroups),
1154
- allow.custom().to(authoringOperations),
1155
1143
  ]),
1156
1144
  SteeringProposal: modelWithoutSubscriptions({
1157
1145
  id: a.id().required(),
@@ -1188,7 +1176,6 @@ export const schema = a.schema({
1188
1176
  ])
1189
1177
  .authorization((allow) => [
1190
1178
  allow.groups(categoryWriteGroups).to(["read"]),
1191
- allow.custom().to(authoringOperations),
1192
1179
  ]),
1193
1180
  SteeringDecision: modelWithoutSubscriptions({
1194
1181
  id: a.id().required(),
@@ -1207,7 +1194,6 @@ export const schema = a.schema({
1207
1194
  ])
1208
1195
  .authorization((allow) => [
1209
1196
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1210
- allow.custom().to(authoringOperations),
1211
1197
  ]),
1212
1198
  Reference: realtimeModel({
1213
1199
  id: a.id().required(),
@@ -1258,7 +1244,6 @@ export const schema = a.schema({
1258
1244
  ])
1259
1245
  .authorization((allow) => [
1260
1246
  allow.groups(categoryWriteGroups).to(["read"]),
1261
- allow.custom().to(authoringOperations),
1262
1247
  ]),
1263
1248
  ReferenceAttachment: modelWithoutSubscriptions({
1264
1249
  id: a.id().required(),
@@ -1287,7 +1272,6 @@ export const schema = a.schema({
1287
1272
  ])
1288
1273
  .authorization((allow) => [
1289
1274
  allow.groups(categoryWriteGroups).to(["read"]),
1290
- allow.custom().to(authoringOperations),
1291
1275
  ]),
1292
1276
  SemanticNode: modelWithoutSubscriptions({
1293
1277
  id: a.id().required(),
@@ -1308,6 +1292,11 @@ export const schema = a.schema({
1308
1292
  displayName: a.string(),
1309
1293
  description: a.string(),
1310
1294
  aliases: a.string().array(),
1295
+ authorityScore: a.float(),
1296
+ authorityRank: a.integer(),
1297
+ acceptedReferenceMentionCount: a.integer(),
1298
+ distinctSourceKindCount: a.integer(),
1299
+ relationCount: a.integer(),
1311
1300
  status: a.string().required(),
1312
1301
  importRunId: a.id(),
1313
1302
  createdAt: a.datetime(),
@@ -1324,7 +1313,6 @@ export const schema = a.schema({
1324
1313
  ])
1325
1314
  .authorization((allow) => [
1326
1315
  allow.groups(categoryWriteGroups).to(["read"]),
1327
- allow.custom().to(authoringOperations),
1328
1316
  ]),
1329
1317
  Message: realtimeModel({
1330
1318
  id: a.id().required(),
@@ -1372,7 +1360,6 @@ export const schema = a.schema({
1372
1360
  ])
1373
1361
  .authorization((allow) => [
1374
1362
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1375
- allow.custom().to(authoringOperations),
1376
1363
  ]),
1377
1364
  MessageThread: realtimeModel({
1378
1365
  id: a.id().required(),
@@ -1409,7 +1396,6 @@ export const schema = a.schema({
1409
1396
  .authorization((allow) => [
1410
1397
  allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
1411
1398
  allow.authenticated("identityPool").to(authoringOperations),
1412
- allow.custom().to(authoringOperations),
1413
1399
  ]),
1414
1400
  ModelAttachment: modelWithoutSubscriptions({
1415
1401
  id: a.id().required(),
@@ -1440,7 +1426,6 @@ export const schema = a.schema({
1440
1426
  ])
1441
1427
  .authorization((allow) => [
1442
1428
  allow.groups(categoryWriteGroups).to(["read"]),
1443
- allow.custom().to(authoringOperations),
1444
1429
  ]),
1445
1430
  SemanticRelationType: modelWithoutSubscriptions({
1446
1431
  id: a.id().required(),
@@ -1467,7 +1452,6 @@ export const schema = a.schema({
1467
1452
  ])
1468
1453
  .authorization((allow) => [
1469
1454
  allow.groups(categoryWriteGroups),
1470
- allow.custom().to(authoringOperations),
1471
1455
  ]),
1472
1456
  SemanticRelation: modelWithoutSubscriptions({
1473
1457
  id: a.id().required(),
@@ -1517,7 +1501,6 @@ export const schema = a.schema({
1517
1501
  ])
1518
1502
  .authorization((allow) => [
1519
1503
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1520
- allow.custom().to(authoringOperations),
1521
1504
  ]),
1522
1505
  Item: modelWithoutSubscriptions({
1523
1506
  id: a.id().required(),
@@ -1530,6 +1513,7 @@ export const schema = a.schema({
1530
1513
  changeReason: a.string(),
1531
1514
  contentHash: a.string(),
1532
1515
  type: a.string().required(),
1516
+ stage: a.string(),
1533
1517
  status: a.string().required(),
1534
1518
  typeStatus: a.string().required(),
1535
1519
  slug: a.string().required(),
@@ -1563,10 +1547,10 @@ export const schema = a.schema({
1563
1547
  index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
1564
1548
  index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
1565
1549
  index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
1550
+ index("stage").sortKeys(["updatedAt"]).queryField("listItemsByStageAndUpdatedAt"),
1566
1551
  ])
1567
1552
  .authorization((allow) => [
1568
1553
  allow.groups(contentWriteGroups),
1569
- allow.custom().to(authoringOperations),
1570
1554
  ]),
1571
1555
  Tag: modelWithoutSubscriptions({
1572
1556
  id: a.id().required(),
@@ -1582,7 +1566,6 @@ export const schema = a.schema({
1582
1566
  ])
1583
1567
  .authorization((allow) => [
1584
1568
  allow.groups(contentWriteGroups),
1585
- allow.custom().to(authoringOperations),
1586
1569
  ]),
1587
1570
  ItemTag: modelWithoutSubscriptions({
1588
1571
  id: a.id().required(),
@@ -1601,7 +1584,6 @@ export const schema = a.schema({
1601
1584
  ])
1602
1585
  .authorization((allow) => [
1603
1586
  allow.groups(contentWriteGroups),
1604
- allow.custom().to(authoringOperations),
1605
1587
  ]),
1606
1588
  MediaAsset: modelWithoutSubscriptions({
1607
1589
  id: a.id().required(),
@@ -1633,7 +1615,6 @@ export const schema = a.schema({
1633
1615
  ])
1634
1616
  .authorization((allow) => [
1635
1617
  allow.groups(contentWriteGroups),
1636
- allow.custom().to(authoringOperations),
1637
1618
  ]),
1638
1619
  Edition: modelWithoutSubscriptions({
1639
1620
  id: a.id().required(),
@@ -1664,7 +1645,6 @@ export const schema = a.schema({
1664
1645
  ])
1665
1646
  .authorization((allow) => [
1666
1647
  allow.groups(contentWriteGroups),
1667
- allow.custom().to(authoringOperations),
1668
1648
  ]),
1669
1649
  EditionItem: modelWithoutSubscriptions({
1670
1650
  id: a.id().required(),
@@ -1686,7 +1666,6 @@ export const schema = a.schema({
1686
1666
  ])
1687
1667
  .authorization((allow) => [
1688
1668
  allow.groups(contentWriteGroups),
1689
- allow.custom().to(authoringOperations),
1690
1669
  ]),
1691
1670
  PublishedItem: modelWithoutSubscriptions({
1692
1671
  id: a.id().required(),
@@ -1726,7 +1705,6 @@ export const schema = a.schema({
1726
1705
  .authorization((allow) => [
1727
1706
  allow.guest().to(["read"]),
1728
1707
  allow.groups(contentWriteGroups),
1729
- allow.custom().to(authoringOperations),
1730
1708
  ]),
1731
1709
  PublishedMediaAsset: modelWithoutSubscriptions({
1732
1710
  id: a.id().required(),
@@ -1761,7 +1739,6 @@ export const schema = a.schema({
1761
1739
  .authorization((allow) => [
1762
1740
  allow.guest().to(["read"]),
1763
1741
  allow.groups(contentWriteGroups),
1764
- allow.custom().to(authoringOperations),
1765
1742
  ]),
1766
1743
  PublishedEdition: modelWithoutSubscriptions({
1767
1744
  id: a.id().required(),
@@ -1786,7 +1763,6 @@ export const schema = a.schema({
1786
1763
  .authorization((allow) => [
1787
1764
  allow.guest().to(["read"]),
1788
1765
  allow.groups(contentWriteGroups),
1789
- allow.custom().to(authoringOperations),
1790
1766
  ]),
1791
1767
  PublishedEditionItem: modelWithoutSubscriptions({
1792
1768
  id: a.id().required(),
@@ -1810,7 +1786,6 @@ export const schema = a.schema({
1810
1786
  .authorization((allow) => [
1811
1787
  allow.guest().to(["read"]),
1812
1788
  allow.groups(contentWriteGroups),
1813
- allow.custom().to(authoringOperations),
1814
1789
  ]),
1815
1790
  PublishedCategorySet: modelWithoutSubscriptions({
1816
1791
  id: a.id().required(),
@@ -1835,7 +1810,6 @@ export const schema = a.schema({
1835
1810
  .authorization((allow) => [
1836
1811
  allow.guest().to(["read"]),
1837
1812
  allow.groups(contentWriteGroups),
1838
- allow.custom().to(authoringOperations),
1839
1813
  ]),
1840
1814
  PublishedCategory: modelWithoutSubscriptions({
1841
1815
  id: a.id().required(),
@@ -1870,9 +1844,9 @@ export const schema = a.schema({
1870
1844
  .authorization((allow) => [
1871
1845
  allow.guest().to(["read"]),
1872
1846
  allow.groups(contentWriteGroups),
1873
- allow.custom().to(authoringOperations),
1874
1847
  ]),
1875
- }).authorization((allow) => [
1848
+ };
1849
+ export const schema = a.schema(baseDefinitions).authorization((allow) => [
1876
1850
  allow.resource(categoryAction),
1877
1851
  allow.resource(contentActions),
1878
1852
  allow.resource(manageUserRole),
@@ -1880,3 +1854,14 @@ export const schema = a.schema({
1880
1854
  allow.resource(newsroomSummary),
1881
1855
  allow.resource(procedureAction),
1882
1856
  ]);
1857
+ /** The deployed schema of a site that enables plugins: the base definitions plus what each plugin contributes (docs/plugins.md). */
1858
+ export function schemaWithPlugins(pluginDefinitions) {
1859
+ return a.schema({ ...baseDefinitions, ...pluginDefinitions }).authorization((allow) => [
1860
+ allow.resource(categoryAction),
1861
+ allow.resource(contentActions),
1862
+ allow.resource(manageUserRole),
1863
+ allow.resource(modelAttachmentUpload),
1864
+ allow.resource(newsroomSummary),
1865
+ allow.resource(procedureAction),
1866
+ ]);
1867
+ }