@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
@@ -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"),
@@ -813,8 +815,6 @@ export const schema = a.schema({
813
815
  ])
814
816
  .authorization((allow) => [
815
817
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
816
- allow.authenticated("identityPool").to(authoringOperations),
817
- allow.custom().to(authoringOperations),
818
818
  ]),
819
819
  AssignmentEvent: modelWithoutSubscriptions({
820
820
  id: a.id().required(),
@@ -836,7 +836,6 @@ export const schema = a.schema({
836
836
  ])
837
837
  .authorization((allow) => [
838
838
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
839
- allow.custom().to(authoringOperations),
840
839
  ]),
841
840
  ProcedureDefinition: modelWithoutSubscriptions({
842
841
  id: a.id().required(),
@@ -860,7 +859,6 @@ export const schema = a.schema({
860
859
  ])
861
860
  .authorization((allow) => [
862
861
  allow.group(adminGroup),
863
- allow.custom().to(authoringOperations),
864
862
  ]),
865
863
  ProcedureVersion: modelWithoutSubscriptions({
866
864
  id: a.id().required(),
@@ -886,7 +884,6 @@ export const schema = a.schema({
886
884
  ])
887
885
  .authorization((allow) => [
888
886
  allow.group(adminGroup),
889
- allow.custom().to(authoringOperations),
890
887
  ]),
891
888
  ProcedureRun: modelWithoutSubscriptions({
892
889
  id: a.id().required(),
@@ -918,7 +915,6 @@ export const schema = a.schema({
918
915
  .authorization((allow) => [
919
916
  allow.group("editor").to(["read"]),
920
917
  allow.group(adminGroup).to(authoringOperations),
921
- allow.custom().to(authoringOperations),
922
918
  ]),
923
919
  NewsroomSection: modelWithoutSubscriptions({
924
920
  id: a.id().required(),
@@ -945,7 +941,6 @@ export const schema = a.schema({
945
941
  ])
946
942
  .authorization((allow) => [
947
943
  allow.groups(categoryWriteGroups),
948
- allow.custom().to(authoringOperations),
949
944
  ]),
950
945
  KnowledgeCorpus: modelWithoutSubscriptions({
951
946
  id: a.id().required(),
@@ -962,7 +957,6 @@ export const schema = a.schema({
962
957
  ])
963
958
  .authorization((allow) => [
964
959
  allow.groups(categoryWriteGroups).to(["read"]),
965
- allow.custom().to(authoringOperations),
966
960
  ]),
967
961
  KnowledgeImportRun: modelWithoutSubscriptions({
968
962
  id: a.id().required(),
@@ -989,7 +983,6 @@ export const schema = a.schema({
989
983
  ])
990
984
  .authorization((allow) => [
991
985
  allow.groups(categoryWriteGroups).to(["read"]),
992
- allow.custom().to(authoringOperations),
993
986
  ]),
994
987
  KnowledgeRawPayload: modelWithoutSubscriptions({
995
988
  id: a.id().required(),
@@ -1006,7 +999,6 @@ export const schema = a.schema({
1006
999
  ])
1007
1000
  .authorization((allow) => [
1008
1001
  allow.groups(categoryWriteGroups),
1009
- allow.custom().to(authoringOperations),
1010
1002
  ]),
1011
1003
  KnowledgeArtifact: modelWithoutSubscriptions({
1012
1004
  id: a.id().required(),
@@ -1025,7 +1017,6 @@ export const schema = a.schema({
1025
1017
  ])
1026
1018
  .authorization((allow) => [
1027
1019
  allow.groups(categoryWriteGroups).to(["read"]),
1028
- allow.custom().to(authoringOperations),
1029
1020
  ]),
1030
1021
  CategorySet: modelWithoutSubscriptions({
1031
1022
  id: a.id().required(),
@@ -1054,7 +1045,6 @@ export const schema = a.schema({
1054
1045
  ])
1055
1046
  .authorization((allow) => [
1056
1047
  allow.groups(categoryWriteGroups),
1057
- allow.custom().to(authoringOperations),
1058
1048
  ]),
1059
1049
  Category: modelWithoutSubscriptions({
1060
1050
  id: a.id().required(),
@@ -1095,7 +1085,6 @@ export const schema = a.schema({
1095
1085
  ])
1096
1086
  .authorization((allow) => [
1097
1087
  allow.groups(categoryWriteGroups),
1098
- allow.custom().to(authoringOperations),
1099
1088
  ]),
1100
1089
  CategoryKeyword: modelWithoutSubscriptions({
1101
1090
  id: a.id().required(),
@@ -1123,7 +1112,6 @@ export const schema = a.schema({
1123
1112
  ])
1124
1113
  .authorization((allow) => [
1125
1114
  allow.groups(categoryWriteGroups),
1126
- allow.custom().to(authoringOperations),
1127
1115
  ]),
1128
1116
  LexicalSteeringRule: modelWithoutSubscriptions({
1129
1117
  id: a.id().required(),
@@ -1151,7 +1139,6 @@ export const schema = a.schema({
1151
1139
  ])
1152
1140
  .authorization((allow) => [
1153
1141
  allow.groups(categoryWriteGroups),
1154
- allow.custom().to(authoringOperations),
1155
1142
  ]),
1156
1143
  SteeringProposal: modelWithoutSubscriptions({
1157
1144
  id: a.id().required(),
@@ -1188,7 +1175,6 @@ export const schema = a.schema({
1188
1175
  ])
1189
1176
  .authorization((allow) => [
1190
1177
  allow.groups(categoryWriteGroups).to(["read"]),
1191
- allow.custom().to(authoringOperations),
1192
1178
  ]),
1193
1179
  SteeringDecision: modelWithoutSubscriptions({
1194
1180
  id: a.id().required(),
@@ -1207,7 +1193,6 @@ export const schema = a.schema({
1207
1193
  ])
1208
1194
  .authorization((allow) => [
1209
1195
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1210
- allow.custom().to(authoringOperations),
1211
1196
  ]),
1212
1197
  Reference: realtimeModel({
1213
1198
  id: a.id().required(),
@@ -1258,7 +1243,6 @@ export const schema = a.schema({
1258
1243
  ])
1259
1244
  .authorization((allow) => [
1260
1245
  allow.groups(categoryWriteGroups).to(["read"]),
1261
- allow.custom().to(authoringOperations),
1262
1246
  ]),
1263
1247
  ReferenceAttachment: modelWithoutSubscriptions({
1264
1248
  id: a.id().required(),
@@ -1287,7 +1271,6 @@ export const schema = a.schema({
1287
1271
  ])
1288
1272
  .authorization((allow) => [
1289
1273
  allow.groups(categoryWriteGroups).to(["read"]),
1290
- allow.custom().to(authoringOperations),
1291
1274
  ]),
1292
1275
  SemanticNode: modelWithoutSubscriptions({
1293
1276
  id: a.id().required(),
@@ -1308,6 +1291,11 @@ export const schema = a.schema({
1308
1291
  displayName: a.string(),
1309
1292
  description: a.string(),
1310
1293
  aliases: a.string().array(),
1294
+ authorityScore: a.float(),
1295
+ authorityRank: a.integer(),
1296
+ acceptedReferenceMentionCount: a.integer(),
1297
+ distinctSourceKindCount: a.integer(),
1298
+ relationCount: a.integer(),
1311
1299
  status: a.string().required(),
1312
1300
  importRunId: a.id(),
1313
1301
  createdAt: a.datetime(),
@@ -1324,7 +1312,6 @@ export const schema = a.schema({
1324
1312
  ])
1325
1313
  .authorization((allow) => [
1326
1314
  allow.groups(categoryWriteGroups).to(["read"]),
1327
- allow.custom().to(authoringOperations),
1328
1315
  ]),
1329
1316
  Message: realtimeModel({
1330
1317
  id: a.id().required(),
@@ -1372,7 +1359,6 @@ export const schema = a.schema({
1372
1359
  ])
1373
1360
  .authorization((allow) => [
1374
1361
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1375
- allow.custom().to(authoringOperations),
1376
1362
  ]),
1377
1363
  MessageThread: realtimeModel({
1378
1364
  id: a.id().required(),
@@ -1408,8 +1394,6 @@ export const schema = a.schema({
1408
1394
  ])
1409
1395
  .authorization((allow) => [
1410
1396
  allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
1411
- allow.authenticated("identityPool").to(authoringOperations),
1412
- allow.custom().to(authoringOperations),
1413
1397
  ]),
1414
1398
  ModelAttachment: modelWithoutSubscriptions({
1415
1399
  id: a.id().required(),
@@ -1440,7 +1424,6 @@ export const schema = a.schema({
1440
1424
  ])
1441
1425
  .authorization((allow) => [
1442
1426
  allow.groups(categoryWriteGroups).to(["read"]),
1443
- allow.custom().to(authoringOperations),
1444
1427
  ]),
1445
1428
  SemanticRelationType: modelWithoutSubscriptions({
1446
1429
  id: a.id().required(),
@@ -1467,7 +1450,6 @@ export const schema = a.schema({
1467
1450
  ])
1468
1451
  .authorization((allow) => [
1469
1452
  allow.groups(categoryWriteGroups),
1470
- allow.custom().to(authoringOperations),
1471
1453
  ]),
1472
1454
  SemanticRelation: modelWithoutSubscriptions({
1473
1455
  id: a.id().required(),
@@ -1517,7 +1499,6 @@ export const schema = a.schema({
1517
1499
  ])
1518
1500
  .authorization((allow) => [
1519
1501
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1520
- allow.custom().to(authoringOperations),
1521
1502
  ]),
1522
1503
  Item: modelWithoutSubscriptions({
1523
1504
  id: a.id().required(),
@@ -1530,6 +1511,7 @@ export const schema = a.schema({
1530
1511
  changeReason: a.string(),
1531
1512
  contentHash: a.string(),
1532
1513
  type: a.string().required(),
1514
+ stage: a.string(),
1533
1515
  status: a.string().required(),
1534
1516
  typeStatus: a.string().required(),
1535
1517
  slug: a.string().required(),
@@ -1563,10 +1545,10 @@ export const schema = a.schema({
1563
1545
  index("typeStatus").sortKeys(["publishedAt"]).queryField("listItemsByTypeStatusAndPublishedAt"),
1564
1546
  index("sectionStatus").sortKeys(["publishedAt"]).queryField("listItemsBySectionStatusAndPublishedAt"),
1565
1547
  index("versionState").sortKeys(["updatedAt"]).queryField("listItemsByVersionStateAndUpdatedAt"),
1548
+ index("stage").sortKeys(["updatedAt"]).queryField("listItemsByStageAndUpdatedAt"),
1566
1549
  ])
1567
1550
  .authorization((allow) => [
1568
1551
  allow.groups(contentWriteGroups),
1569
- allow.custom().to(authoringOperations),
1570
1552
  ]),
1571
1553
  Tag: modelWithoutSubscriptions({
1572
1554
  id: a.id().required(),
@@ -1582,7 +1564,6 @@ export const schema = a.schema({
1582
1564
  ])
1583
1565
  .authorization((allow) => [
1584
1566
  allow.groups(contentWriteGroups),
1585
- allow.custom().to(authoringOperations),
1586
1567
  ]),
1587
1568
  ItemTag: modelWithoutSubscriptions({
1588
1569
  id: a.id().required(),
@@ -1601,7 +1582,6 @@ export const schema = a.schema({
1601
1582
  ])
1602
1583
  .authorization((allow) => [
1603
1584
  allow.groups(contentWriteGroups),
1604
- allow.custom().to(authoringOperations),
1605
1585
  ]),
1606
1586
  MediaAsset: modelWithoutSubscriptions({
1607
1587
  id: a.id().required(),
@@ -1633,7 +1613,6 @@ export const schema = a.schema({
1633
1613
  ])
1634
1614
  .authorization((allow) => [
1635
1615
  allow.groups(contentWriteGroups),
1636
- allow.custom().to(authoringOperations),
1637
1616
  ]),
1638
1617
  Edition: modelWithoutSubscriptions({
1639
1618
  id: a.id().required(),
@@ -1664,7 +1643,6 @@ export const schema = a.schema({
1664
1643
  ])
1665
1644
  .authorization((allow) => [
1666
1645
  allow.groups(contentWriteGroups),
1667
- allow.custom().to(authoringOperations),
1668
1646
  ]),
1669
1647
  EditionItem: modelWithoutSubscriptions({
1670
1648
  id: a.id().required(),
@@ -1686,7 +1664,6 @@ export const schema = a.schema({
1686
1664
  ])
1687
1665
  .authorization((allow) => [
1688
1666
  allow.groups(contentWriteGroups),
1689
- allow.custom().to(authoringOperations),
1690
1667
  ]),
1691
1668
  PublishedItem: modelWithoutSubscriptions({
1692
1669
  id: a.id().required(),
@@ -1726,7 +1703,6 @@ export const schema = a.schema({
1726
1703
  .authorization((allow) => [
1727
1704
  allow.guest().to(["read"]),
1728
1705
  allow.groups(contentWriteGroups),
1729
- allow.custom().to(authoringOperations),
1730
1706
  ]),
1731
1707
  PublishedMediaAsset: modelWithoutSubscriptions({
1732
1708
  id: a.id().required(),
@@ -1761,7 +1737,6 @@ export const schema = a.schema({
1761
1737
  .authorization((allow) => [
1762
1738
  allow.guest().to(["read"]),
1763
1739
  allow.groups(contentWriteGroups),
1764
- allow.custom().to(authoringOperations),
1765
1740
  ]),
1766
1741
  PublishedEdition: modelWithoutSubscriptions({
1767
1742
  id: a.id().required(),
@@ -1786,7 +1761,6 @@ export const schema = a.schema({
1786
1761
  .authorization((allow) => [
1787
1762
  allow.guest().to(["read"]),
1788
1763
  allow.groups(contentWriteGroups),
1789
- allow.custom().to(authoringOperations),
1790
1764
  ]),
1791
1765
  PublishedEditionItem: modelWithoutSubscriptions({
1792
1766
  id: a.id().required(),
@@ -1810,7 +1784,6 @@ export const schema = a.schema({
1810
1784
  .authorization((allow) => [
1811
1785
  allow.guest().to(["read"]),
1812
1786
  allow.groups(contentWriteGroups),
1813
- allow.custom().to(authoringOperations),
1814
1787
  ]),
1815
1788
  PublishedCategorySet: modelWithoutSubscriptions({
1816
1789
  id: a.id().required(),
@@ -1835,7 +1808,6 @@ export const schema = a.schema({
1835
1808
  .authorization((allow) => [
1836
1809
  allow.guest().to(["read"]),
1837
1810
  allow.groups(contentWriteGroups),
1838
- allow.custom().to(authoringOperations),
1839
1811
  ]),
1840
1812
  PublishedCategory: modelWithoutSubscriptions({
1841
1813
  id: a.id().required(),
@@ -1870,9 +1842,9 @@ export const schema = a.schema({
1870
1842
  .authorization((allow) => [
1871
1843
  allow.guest().to(["read"]),
1872
1844
  allow.groups(contentWriteGroups),
1873
- allow.custom().to(authoringOperations),
1874
1845
  ]),
1875
- }).authorization((allow) => [
1846
+ };
1847
+ export const schema = a.schema(baseDefinitions).authorization((allow) => [
1876
1848
  allow.resource(categoryAction),
1877
1849
  allow.resource(contentActions),
1878
1850
  allow.resource(manageUserRole),
@@ -1880,3 +1852,14 @@ export const schema = a.schema({
1880
1852
  allow.resource(newsroomSummary),
1881
1853
  allow.resource(procedureAction),
1882
1854
  ]);
1855
+ /** The deployed schema of a site that enables plugins: the base definitions plus what each plugin contributes (docs/plugins.md). */
1856
+ export function schemaWithPlugins(pluginDefinitions) {
1857
+ return a.schema({ ...baseDefinitions, ...pluginDefinitions }).authorization((allow) => [
1858
+ allow.resource(categoryAction),
1859
+ allow.resource(contentActions),
1860
+ allow.resource(manageUserRole),
1861
+ allow.resource(modelAttachmentUpload),
1862
+ allow.resource(newsroomSummary),
1863
+ allow.resource(procedureAction),
1864
+ ]);
1865
+ }