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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/amplify/auth/resource.js +17 -4
  2. package/amplify/auth/resource.ts +21 -4
  3. package/amplify/data/resource.js +26 -70
  4. package/amplify/data/resource.ts +27 -70
  5. package/amplify/data/schema.js +26 -58
  6. package/amplify/data/schema.ts +27 -58
  7. package/amplify/functions/console-chat-responder/py/execute_tactus_runner.py +0 -10
  8. package/amplify/functions/console-chat-responder/resource.js +0 -7
  9. package/amplify/functions/console-chat-responder/resource.ts +0 -8
  10. package/amplify/functions/console-chat-responder/src/main.rs +0 -9
  11. package/amplify/functions/content-actions/handler.py +45 -3
  12. package/amplify/rebuild-trigger-settings.js +22 -0
  13. package/amplify/rebuild-trigger-settings.ts +42 -0
  14. package/amplify/site-backend-config.ts +12 -1
  15. package/amplify/site-backend.js +41 -27
  16. package/amplify/site-backend.ts +51 -34
  17. package/amplify/storage/resource.js +3 -0
  18. package/amplify/storage/resource.ts +3 -0
  19. package/app/%5F_preview/[[...path]]/route.ts +8 -0
  20. package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +2 -0
  21. package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -0
  22. package/app/api/media/[...path]/route.ts +5 -16
  23. package/app/api/revalidate/route.ts +8 -7
  24. package/app/articles/[slug]/page.tsx +6 -4
  25. package/app/blog-rhythm.css +278 -0
  26. package/app/globals.css +21 -0
  27. package/app/layout.tsx +20 -0
  28. package/app/newsroom/[section]/[...selection]/page.tsx +6 -5
  29. package/app/newsroom/[section]/page.tsx +4 -3
  30. package/app/newsroom/articles/[id]/page.tsx +15 -0
  31. package/app/newsroom/articles/page.tsx +13 -0
  32. package/app/newsroom/layout.tsx +2 -9
  33. package/app/page.tsx +18 -5
  34. package/app/robots.ts +11 -0
  35. package/bin/papyrus-app.mjs +12 -2
  36. package/bin/papyrus-infra.mjs +74 -18
  37. package/components/archive-shell.tsx +2 -22
  38. package/components/article-video.tsx +247 -3
  39. package/components/blog-page-background.tsx +23 -6
  40. package/components/markus-ir-preview.tsx +300 -0
  41. package/components/newspaper.tsx +6 -2
  42. package/components/newsroom-access-gate.tsx +67 -0
  43. package/components/newsroom-article-editor.tsx +741 -0
  44. package/components/newsroom-articles-view.tsx +129 -0
  45. package/components/newsroom-client-shell.tsx +12 -0
  46. package/components/newsroom-ops-overview.tsx +28 -11
  47. package/components/newsroom-ops-shell.tsx +3 -1
  48. package/components/papyrus-console-shell.tsx +4 -2
  49. package/components/pictogram-figure.tsx +9 -2
  50. package/components/presentation-header.tsx +135 -0
  51. package/components/presentation-rhythm-hrule.tsx +17 -0
  52. package/components/settings-page.tsx +2 -1
  53. package/components/staging-banner.tsx +11 -0
  54. package/components/topic-steering-workspace.tsx +6 -63
  55. package/components/use-blog-header-obstacles.ts +81 -0
  56. package/components/use-brand-fonts-ready.ts +28 -0
  57. package/components/use-rhythm-overlay.ts +29 -0
  58. package/infra/amplify-app-shell.js +285 -80
  59. package/infra/amplify-app-shell.ts +326 -113
  60. package/infra/build-specs.js +95 -0
  61. package/infra/build-specs.ts +142 -0
  62. package/infra/github-oidc-provider.js +24 -0
  63. package/infra/github-oidc-provider.ts +30 -0
  64. package/infra/index.js +3 -0
  65. package/infra/site-config.js +273 -0
  66. package/infra/site-config.ts +336 -0
  67. package/lib/amplify-outputs-path.ts +5 -1
  68. package/lib/blog-feature-solver.ts +459 -0
  69. package/lib/blog-rhythm.ts +134 -0
  70. package/lib/brand-fonts-watch.ts +43 -0
  71. package/lib/brand-fonts.ts +112 -0
  72. package/lib/cached-content-repository.ts +14 -1
  73. package/lib/category-repository.ts +1 -93
  74. package/lib/content-actions-demo.ts +190 -0
  75. package/lib/content-repository.ts +6 -0
  76. package/lib/content-source-context.ts +26 -0
  77. package/lib/content-types.ts +4 -0
  78. package/lib/edition-routes.ts +31 -29
  79. package/lib/graphql-content-repository.ts +240 -43
  80. package/lib/media-route-response.ts +45 -0
  81. package/lib/newspaper-layout.ts +3 -2
  82. package/lib/newsroom-articles.ts +325 -0
  83. package/lib/newsroom-base-path.ts +12 -3
  84. package/lib/newsroom-category-drilldown.ts +3 -2
  85. package/lib/newsroom-demo-articles.ts +90 -0
  86. package/lib/newsroom-forum-routes.ts +6 -4
  87. package/lib/newsroom-index-filters.ts +14 -10
  88. package/lib/newsroom-media-backend.ts +142 -0
  89. package/lib/newsroom-media.ts +182 -0
  90. package/lib/newsroom-nav.ts +3 -0
  91. package/lib/papyrus-web-locations.ts +7 -6
  92. package/lib/presentation-footer.ts +3 -2
  93. package/lib/pretext-layout.ts +12 -3
  94. package/lib/reader-base-path.ts +24 -0
  95. package/lib/reader-static-params.ts +13 -0
  96. package/lib/renderer.ts +7 -0
  97. package/lib/revalidate-secret.ts +59 -0
  98. package/lib/root-route-redirect.ts +16 -0
  99. package/lib/semantic-graph.ts +5 -0
  100. package/lib/site-brand.ts +51 -0
  101. package/lib/site-env.ts +52 -0
  102. package/lib/staging-gate.ts +37 -0
  103. package/lib/staging-gated-path.ts +23 -0
  104. package/lib/staging-preview-object.ts +114 -0
  105. package/lib/video-mode.ts +42 -0
  106. package/lib/video-script.ts +77 -0
  107. package/middleware.ts +52 -10
  108. package/package.json +41 -1
  109. package/renderers/pretext/article-page.tsx +39 -3
  110. package/renderers/pretext/presentation-shared.tsx +113 -0
  111. package/renderers/pretext/presentation-shell.tsx +15 -102
  112. package/renderers/pretext/rhythm-article-page.tsx +165 -0
  113. package/renderers/pretext/rhythm-blog-presentation.tsx +279 -0
  114. package/renderers/pretext/rhythm-shell-style.ts +35 -0
  115. package/routes.manifest.json +37 -2
  116. package/scripts/videoml/build-browser-bundle.mjs +22 -0
  117. package/scripts/videoml/build-preview-bundle.mjs +50 -0
  118. package/scripts/videoml/bundle-common.mjs +129 -0
  119. package/scripts/videoml/preview/preview-entry.tsx +381 -0
  120. package/scripts/videoml/preview/preview-stage-fit.ts +28 -0
  121. package/scripts/videoml/preview/preview-timing.ts +42 -0
  122. package/scripts/videoml/preview.html +77 -0
  123. package/scripts/videoml/standard-entry.tsx +46 -0
  124. package/src/sync.mjs +30 -6
  125. package/amplify/functions/graphql-jwt-authorizer/handler.ts +0 -193
  126. package/amplify/functions/graphql-jwt-authorizer/resource.js +0 -14
  127. package/amplify/functions/graphql-jwt-authorizer/resource.ts +0 -15
@@ -1,5 +1,6 @@
1
1
  import { defineAuth, secret } from "@aws-amplify/backend";
2
2
  import { manageUserRole } from "../functions/manage-user-role/resource.js";
3
+ import { CfnUserPoolDomain } from "aws-cdk-lib/aws-cognito";
3
4
  // Default OAuth redirect URLs for the p.apyr.us app. Other publications pass
4
5
  // `auth.redirectUrls` to `defineSiteBackend` (or, for Papyrus's own backend,
5
6
  // the PAPYRUS_OAUTH_REDIRECT_URLS branch env var, comma-separated).
@@ -25,15 +26,13 @@ export function authConfigFromEnv() {
25
26
  return {
26
27
  redirectUrls: resolveAuthRedirectUrls(),
27
28
  disableGoogleOAuth: process.env.PAPYRUS_DISABLE_GOOGLE_OAUTH === "1",
28
- // Stable Cognito hosted-UI domain prefix for Google OAuth redirect URIs.
29
- // See docs/google-oauth-setup.md.
30
29
  cognitoDomainPrefix: (process.env.PAPYRUS_COGNITO_DOMAIN_PREFIX ?? "").trim(),
30
+ applyCognitoDomainPrefix: process.env.PAPYRUS_APPLY_COGNITO_DOMAIN_PREFIX === "true",
31
31
  };
32
32
  }
33
33
  export function defineSiteAuth(config) {
34
34
  const authRedirectUrls = config.redirectUrls ?? DEFAULT_AUTH_REDIRECT_URLS;
35
35
  const disableGoogleOAuth = config.disableGoogleOAuth === true;
36
- const cognitoDomainPrefix = (config.cognitoDomainPrefix ?? "").trim();
37
36
  return defineAuth({
38
37
  loginWith: {
39
38
  email: true,
@@ -49,7 +48,6 @@ export function defineSiteAuth(config) {
49
48
  scopes: ["EMAIL", "PROFILE", "OPENID"],
50
49
  callbackUrls: authRedirectUrls,
51
50
  logoutUrls: authRedirectUrls,
52
- ...(cognitoDomainPrefix ? { domainPrefix: cognitoDomainPrefix } : {}),
53
51
  },
54
52
  }),
55
53
  },
@@ -59,3 +57,18 @@ export function defineSiteAuth(config) {
59
57
  ],
60
58
  });
61
59
  }
60
+ // Amplify Gen2's auth factory overwrites `externalProviders.domainPrefix` with a
61
+ // hash of the backend id, so the prefix cannot be passed through `defineAuth`.
62
+ // This sets the user pool domain on the synthesized resource instead. Cognito
63
+ // cannot rename a pool domain in place: CloudFormation replaces the domain,
64
+ // which changes the hosted-UI URL and the Google redirect URI. Callers must
65
+ // only use it when the site opted in (see docs/google-oauth-setup.md).
66
+ export function applyCognitoDomainPrefix(authStack, cognitoDomainPrefix) {
67
+ const domainResources = authStack.node
68
+ .findAll()
69
+ .filter((construct) => construct instanceof CfnUserPoolDomain);
70
+ if (domainResources.length !== 1) {
71
+ throw new Error(`Expected exactly one Cognito user pool domain in the auth stack to apply cognitoDomainPrefix, found ${domainResources.length}`);
72
+ }
73
+ domainResources[0].domain = cognitoDomainPrefix;
74
+ }
@@ -1,5 +1,7 @@
1
1
  import { defineAuth, secret } from "@aws-amplify/backend";
2
2
  import { manageUserRole } from "../functions/manage-user-role/resource";
3
+ import { Stack } from "aws-cdk-lib";
4
+ import { CfnUserPoolDomain } from "aws-cdk-lib/aws-cognito";
3
5
  import type { PapyrusAuthConfig } from "../site-backend-config";
4
6
 
5
7
  // Default OAuth redirect URLs for the p.apyr.us app. Other publications pass
@@ -28,16 +30,14 @@ export function authConfigFromEnv(): PapyrusAuthConfig {
28
30
  return {
29
31
  redirectUrls: resolveAuthRedirectUrls(),
30
32
  disableGoogleOAuth: process.env.PAPYRUS_DISABLE_GOOGLE_OAUTH === "1",
31
- // Stable Cognito hosted-UI domain prefix for Google OAuth redirect URIs.
32
- // See docs/google-oauth-setup.md.
33
33
  cognitoDomainPrefix: (process.env.PAPYRUS_COGNITO_DOMAIN_PREFIX ?? "").trim(),
34
+ applyCognitoDomainPrefix: process.env.PAPYRUS_APPLY_COGNITO_DOMAIN_PREFIX === "true",
34
35
  };
35
36
  }
36
37
 
37
38
  export function defineSiteAuth(config: PapyrusAuthConfig) {
38
39
  const authRedirectUrls = config.redirectUrls ?? DEFAULT_AUTH_REDIRECT_URLS;
39
40
  const disableGoogleOAuth = config.disableGoogleOAuth === true;
40
- const cognitoDomainPrefix = (config.cognitoDomainPrefix ?? "").trim();
41
41
  return defineAuth({
42
42
  loginWith: {
43
43
  email: true,
@@ -53,7 +53,6 @@ export function defineSiteAuth(config: PapyrusAuthConfig) {
53
53
  scopes: ["EMAIL", "PROFILE", "OPENID"],
54
54
  callbackUrls: authRedirectUrls,
55
55
  logoutUrls: authRedirectUrls,
56
- ...(cognitoDomainPrefix ? { domainPrefix: cognitoDomainPrefix } : {}),
57
56
  },
58
57
  }),
59
58
  },
@@ -63,3 +62,21 @@ export function defineSiteAuth(config: PapyrusAuthConfig) {
63
62
  ],
64
63
  });
65
64
  }
65
+
66
+ // Amplify Gen2's auth factory overwrites `externalProviders.domainPrefix` with a
67
+ // hash of the backend id, so the prefix cannot be passed through `defineAuth`.
68
+ // This sets the user pool domain on the synthesized resource instead. Cognito
69
+ // cannot rename a pool domain in place: CloudFormation replaces the domain,
70
+ // which changes the hosted-UI URL and the Google redirect URI. Callers must
71
+ // only use it when the site opted in (see docs/google-oauth-setup.md).
72
+ export function applyCognitoDomainPrefix(authStack: Stack, cognitoDomainPrefix: string): void {
73
+ const domainResources = authStack.node
74
+ .findAll()
75
+ .filter((construct): construct is CfnUserPoolDomain => construct instanceof CfnUserPoolDomain);
76
+ if (domainResources.length !== 1) {
77
+ throw new Error(
78
+ `Expected exactly one Cognito user pool domain in the auth stack to apply cognitoDomainPrefix, found ${domainResources.length}`,
79
+ );
80
+ }
81
+ domainResources[0].domain = cognitoDomainPrefix;
82
+ }
@@ -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";
@@ -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({
@@ -294,7 +291,6 @@ const schema = a.schema({
294
291
  .returns(a.ref("ReferenceCurationActionResult"))
295
292
  .authorization((allow) => [
296
293
  allow.groups(categoryWriteGroups),
297
- allow.custom(),
298
294
  ])
299
295
  .handler(a.handler.function(categoryAction)),
300
296
  setReferenceQualityRating: a
@@ -309,7 +305,6 @@ const schema = a.schema({
309
305
  .returns(a.ref("ReferenceQualityActionResult"))
310
306
  .authorization((allow) => [
311
307
  allow.groups(categoryWriteGroups),
312
- allow.custom(),
313
308
  ])
314
309
  .handler(a.handler.function(categoryAction)),
315
310
  createReferenceInsight: a
@@ -324,7 +319,6 @@ const schema = a.schema({
324
319
  .returns(a.ref("ReferenceInsightActionResult"))
325
320
  .authorization((allow) => [
326
321
  allow.groups(categoryWriteGroups),
327
- allow.custom(),
328
322
  ])
329
323
  .handler(a.handler.function(categoryAction)),
330
324
  moveReferenceCorpus: a
@@ -339,7 +333,6 @@ const schema = a.schema({
339
333
  .returns(a.ref("ReferenceCorpusMoveActionResult"))
340
334
  .authorization((allow) => [
341
335
  allow.groups(categoryWriteGroups),
342
- allow.custom(),
343
336
  ])
344
337
  .handler(a.handler.function(categoryAction)),
345
338
  startReferenceCuration: a
@@ -353,7 +346,6 @@ const schema = a.schema({
353
346
  .returns(a.ref("ReferenceCurationStartResult"))
354
347
  .authorization((allow) => [
355
348
  allow.groups(categoryWriteGroups),
356
- allow.custom(),
357
349
  ])
358
350
  .handler(a.handler.function(categoryAction)),
359
351
  getReferenceCurationStatus: a
@@ -364,7 +356,6 @@ const schema = a.schema({
364
356
  .returns(a.ref("ReferenceCurationStatusResult"))
365
357
  .authorization((allow) => [
366
358
  allow.groups(categoryWriteGroups),
367
- allow.custom(),
368
359
  ])
369
360
  .handler(a.handler.function(categoryAction)),
370
361
  createCategorySetDraft: a
@@ -467,7 +458,7 @@ const schema = a.schema({
467
458
  getNewsroomSummary: a
468
459
  .query()
469
460
  .returns(a.ref("NewsroomSummary"))
470
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
461
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
471
462
  .handler(a.handler.function(newsroomSummary)),
472
463
  deriveMarkus: a
473
464
  .query()
@@ -493,13 +484,19 @@ const schema = a.schema({
493
484
  .returns(a.json())
494
485
  .authorization((allow) => [allow.groups(contentWriteGroups)])
495
486
  .handler(a.handler.function(contentActions)),
487
+ requestStagingBuild: a
488
+ .mutation()
489
+ .arguments({ input: a.json().required() })
490
+ .returns(a.json())
491
+ .authorization((allow) => [allow.groups(contentWriteGroups)])
492
+ .handler(a.handler.function(contentActions)),
496
493
  knowledgeQuery: a
497
494
  .query()
498
495
  .arguments({
499
496
  input: a.json().required(),
500
497
  })
501
498
  .returns(a.json())
502
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
499
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
503
500
  .handler(a.handler.function(knowledgeQuery)),
504
501
  updateNewsroomSummary: a
505
502
  .mutation()
@@ -509,7 +506,7 @@ const schema = a.schema({
509
506
  reason: a.string(),
510
507
  })
511
508
  .returns(a.ref("NewsroomSummary"))
512
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
509
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
513
510
  .handler(a.handler.function(newsroomSummary)),
514
511
  ModelAttachmentUploadSlot: a.customType({
515
512
  ok: a.boolean().required(),
@@ -565,7 +562,7 @@ const schema = a.schema({
565
562
  status: a.string(),
566
563
  })
567
564
  .returns(a.ref("ModelAttachmentUploadSlot"))
568
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
565
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
569
566
  .handler(a.handler.function(modelAttachmentUpload)),
570
567
  completeModelAttachmentUpload: a
571
568
  .mutation()
@@ -586,7 +583,7 @@ const schema = a.schema({
586
583
  status: a.string(),
587
584
  })
588
585
  .returns(a.ref("ModelAttachment"))
589
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
586
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
590
587
  .handler(a.handler.function(modelAttachmentUpload)),
591
588
  abortModelAttachmentUpload: a
592
589
  .mutation()
@@ -607,7 +604,7 @@ const schema = a.schema({
607
604
  status: a.string(),
608
605
  })
609
606
  .returns(a.ref("ModelAttachmentUploadAbortResult"))
610
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
607
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
611
608
  .handler(a.handler.function(modelAttachmentUpload)),
612
609
  createModelAttachmentDownload: a
613
610
  .mutation()
@@ -615,7 +612,7 @@ const schema = a.schema({
615
612
  attachmentId: a.id().required(),
616
613
  })
617
614
  .returns(a.ref("ModelAttachmentDownloadSlot"))
618
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
615
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
619
616
  .handler(a.handler.function(modelAttachmentUpload)),
620
617
  AssignmentActionResult: a.customType({
621
618
  ok: a.boolean().required(),
@@ -702,7 +699,7 @@ const schema = a.schema({
702
699
  limit: a.integer(),
703
700
  })
704
701
  .returns(a.ref("AssignmentContext").array().required())
705
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
702
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
706
703
  .handler(a.handler.function(assignmentAction)),
707
704
  listAssignmentQueue: a
708
705
  .query()
@@ -712,7 +709,7 @@ const schema = a.schema({
712
709
  limit: a.integer(),
713
710
  })
714
711
  .returns(a.ref("AssignmentContext").array().required())
715
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
712
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
716
713
  .handler(a.handler.function(assignmentAction)),
717
714
  getAssignmentContext: a
718
715
  .query()
@@ -720,7 +717,7 @@ const schema = a.schema({
720
717
  assignmentId: a.id().required(),
721
718
  })
722
719
  .returns(a.ref("AssignmentContext"))
723
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
720
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
724
721
  .handler(a.handler.function(assignmentAction)),
725
722
  claimAssignment: a
726
723
  .mutation()
@@ -736,7 +733,7 @@ const schema = a.schema({
736
733
  note: a.string(),
737
734
  })
738
735
  .returns(a.ref("AssignmentActionResult"))
739
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
736
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
740
737
  .handler(a.handler.function(assignmentAction)),
741
738
  releaseAssignment: a
742
739
  .mutation()
@@ -747,7 +744,7 @@ const schema = a.schema({
747
744
  note: a.string(),
748
745
  })
749
746
  .returns(a.ref("AssignmentActionResult"))
750
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
747
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
751
748
  .handler(a.handler.function(assignmentAction)),
752
749
  completeAssignment: a
753
750
  .mutation()
@@ -758,7 +755,7 @@ const schema = a.schema({
758
755
  note: a.string(),
759
756
  })
760
757
  .returns(a.ref("AssignmentActionResult"))
761
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
758
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
762
759
  .handler(a.handler.function(assignmentAction)),
763
760
  cancelAssignment: a
764
761
  .mutation()
@@ -769,7 +766,7 @@ const schema = a.schema({
769
766
  note: a.string(),
770
767
  })
771
768
  .returns(a.ref("AssignmentActionResult"))
772
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
769
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
773
770
  .handler(a.handler.function(assignmentAction)),
774
771
  reopenAssignment: a
775
772
  .mutation()
@@ -780,7 +777,7 @@ const schema = a.schema({
780
777
  note: a.string(),
781
778
  })
782
779
  .returns(a.ref("AssignmentActionResult"))
783
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
780
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
784
781
  .handler(a.handler.function(assignmentAction)),
785
782
  retryImmediateAssignment: a
786
783
  .mutation()
@@ -791,7 +788,7 @@ const schema = a.schema({
791
788
  note: a.string(),
792
789
  })
793
790
  .returns(a.ref("AssignmentActionResult"))
794
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
791
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
795
792
  .handler(a.handler.function(assignmentAction)),
796
793
  listNewsroomProcedureDefinitions: a
797
794
  .query()
@@ -805,7 +802,7 @@ const schema = a.schema({
805
802
  procedureKey: a.string(),
806
803
  })
807
804
  .returns(a.json())
808
- .authorization((allow) => [allow.group(adminGroup), allow.custom()])
805
+ .authorization((allow) => [allow.group(adminGroup)])
809
806
  .handler(a.handler.function(procedureAction)),
810
807
  saveNewsroomProcedureDefinition: a
811
808
  .mutation()
@@ -843,7 +840,7 @@ const schema = a.schema({
843
840
  actorLabel: a.string(),
844
841
  })
845
842
  .returns(a.json())
846
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
843
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
847
844
  .handler(a.handler.function(procedureAction)),
848
845
  getNewsroomProcedureRun: a
849
846
  .query()
@@ -851,7 +848,7 @@ const schema = a.schema({
851
848
  id: a.id().required(),
852
849
  })
853
850
  .returns(a.json())
854
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
851
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
855
852
  .handler(a.handler.function(procedureAction)),
856
853
  listNewsroomProcedureRunsByProcedure: a
857
854
  .query()
@@ -859,7 +856,7 @@ const schema = a.schema({
859
856
  procedureId: a.id().required(),
860
857
  })
861
858
  .returns(a.json())
862
- .authorization((allow) => [allow.groups(categoryWriteGroups), allow.custom()])
859
+ .authorization((allow) => [allow.groups(categoryWriteGroups)])
863
860
  .handler(a.handler.function(procedureAction)),
864
861
  Assignment: a
865
862
  .model({
@@ -909,7 +906,6 @@ const schema = a.schema({
909
906
  .authorization((allow) => [
910
907
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
911
908
  allow.authenticated("identityPool").to(authoringOperations),
912
- allow.custom().to(authoringOperations),
913
909
  ]),
914
910
  AssignmentEvent: a
915
911
  .model({
@@ -932,7 +928,6 @@ const schema = a.schema({
932
928
  ])
933
929
  .authorization((allow) => [
934
930
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
935
- allow.custom().to(authoringOperations),
936
931
  ]),
937
932
  ProcedureDefinition: a
938
933
  .model({
@@ -957,7 +952,6 @@ const schema = a.schema({
957
952
  ])
958
953
  .authorization((allow) => [
959
954
  allow.group(adminGroup),
960
- allow.custom().to(authoringOperations),
961
955
  ]),
962
956
  ProcedureVersion: a
963
957
  .model({
@@ -984,7 +978,6 @@ const schema = a.schema({
984
978
  ])
985
979
  .authorization((allow) => [
986
980
  allow.group(adminGroup),
987
- allow.custom().to(authoringOperations),
988
981
  ]),
989
982
  ProcedureRun: a
990
983
  .model({
@@ -1017,7 +1010,6 @@ const schema = a.schema({
1017
1010
  .authorization((allow) => [
1018
1011
  allow.group("editor").to(["read"]),
1019
1012
  allow.group(adminGroup).to(authoringOperations),
1020
- allow.custom().to(authoringOperations),
1021
1013
  ]),
1022
1014
  NewsroomSection: a
1023
1015
  .model({
@@ -1045,7 +1037,6 @@ const schema = a.schema({
1045
1037
  ])
1046
1038
  .authorization((allow) => [
1047
1039
  allow.groups(categoryWriteGroups),
1048
- allow.custom().to(authoringOperations),
1049
1040
  ]),
1050
1041
  KnowledgeCorpus: a
1051
1042
  .model({
@@ -1063,7 +1054,6 @@ const schema = a.schema({
1063
1054
  ])
1064
1055
  .authorization((allow) => [
1065
1056
  allow.groups(categoryWriteGroups).to(["read"]),
1066
- allow.custom().to(authoringOperations),
1067
1057
  ]),
1068
1058
  KnowledgeImportRun: a
1069
1059
  .model({
@@ -1091,7 +1081,6 @@ const schema = a.schema({
1091
1081
  ])
1092
1082
  .authorization((allow) => [
1093
1083
  allow.groups(categoryWriteGroups).to(["read"]),
1094
- allow.custom().to(authoringOperations),
1095
1084
  ]),
1096
1085
  KnowledgeRawPayload: a
1097
1086
  .model({
@@ -1109,7 +1098,6 @@ const schema = a.schema({
1109
1098
  ])
1110
1099
  .authorization((allow) => [
1111
1100
  allow.groups(categoryWriteGroups),
1112
- allow.custom().to(authoringOperations),
1113
1101
  ]),
1114
1102
  KnowledgeArtifact: a
1115
1103
  .model({
@@ -1129,7 +1117,6 @@ const schema = a.schema({
1129
1117
  ])
1130
1118
  .authorization((allow) => [
1131
1119
  allow.groups(categoryWriteGroups).to(["read"]),
1132
- allow.custom().to(authoringOperations),
1133
1120
  ]),
1134
1121
  CategorySet: a
1135
1122
  .model({
@@ -1159,7 +1146,6 @@ const schema = a.schema({
1159
1146
  ])
1160
1147
  .authorization((allow) => [
1161
1148
  allow.groups(categoryWriteGroups),
1162
- allow.custom().to(authoringOperations),
1163
1149
  ]),
1164
1150
  Category: a
1165
1151
  .model({
@@ -1201,7 +1187,6 @@ const schema = a.schema({
1201
1187
  ])
1202
1188
  .authorization((allow) => [
1203
1189
  allow.groups(categoryWriteGroups),
1204
- allow.custom().to(authoringOperations),
1205
1190
  ]),
1206
1191
  CategoryKeyword: a
1207
1192
  .model({
@@ -1230,7 +1215,6 @@ const schema = a.schema({
1230
1215
  ])
1231
1216
  .authorization((allow) => [
1232
1217
  allow.groups(categoryWriteGroups),
1233
- allow.custom().to(authoringOperations),
1234
1218
  ]),
1235
1219
  LexicalSteeringRule: a
1236
1220
  .model({
@@ -1259,7 +1243,6 @@ const schema = a.schema({
1259
1243
  ])
1260
1244
  .authorization((allow) => [
1261
1245
  allow.groups(categoryWriteGroups),
1262
- allow.custom().to(authoringOperations),
1263
1246
  ]),
1264
1247
  SteeringProposal: a
1265
1248
  .model({
@@ -1297,7 +1280,6 @@ const schema = a.schema({
1297
1280
  ])
1298
1281
  .authorization((allow) => [
1299
1282
  allow.groups(categoryWriteGroups).to(["read"]),
1300
- allow.custom().to(authoringOperations),
1301
1283
  ]),
1302
1284
  SteeringDecision: a
1303
1285
  .model({
@@ -1317,7 +1299,6 @@ const schema = a.schema({
1317
1299
  ])
1318
1300
  .authorization((allow) => [
1319
1301
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1320
- allow.custom().to(authoringOperations),
1321
1302
  ]),
1322
1303
  Reference: a
1323
1304
  .model({
@@ -1369,7 +1350,6 @@ const schema = a.schema({
1369
1350
  ])
1370
1351
  .authorization((allow) => [
1371
1352
  allow.groups(categoryWriteGroups).to(["read"]),
1372
- allow.custom().to(authoringOperations),
1373
1353
  ]),
1374
1354
  ReferenceAttachment: a
1375
1355
  .model({
@@ -1399,7 +1379,6 @@ const schema = a.schema({
1399
1379
  ])
1400
1380
  .authorization((allow) => [
1401
1381
  allow.groups(categoryWriteGroups).to(["read"]),
1402
- allow.custom().to(authoringOperations),
1403
1382
  ]),
1404
1383
  SemanticNode: a
1405
1384
  .model({
@@ -1442,7 +1421,6 @@ const schema = a.schema({
1442
1421
  ])
1443
1422
  .authorization((allow) => [
1444
1423
  allow.groups(categoryWriteGroups).to(["read"]),
1445
- allow.custom().to(authoringOperations),
1446
1424
  ]),
1447
1425
  Message: a
1448
1426
  .model({
@@ -1491,7 +1469,6 @@ const schema = a.schema({
1491
1469
  ])
1492
1470
  .authorization((allow) => [
1493
1471
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1494
- allow.custom().to(authoringOperations),
1495
1472
  allow.authenticated("identityPool").to(["read", "create", "update"]),
1496
1473
  ]),
1497
1474
  MessageThread: a
@@ -1530,7 +1507,6 @@ const schema = a.schema({
1530
1507
  .authorization((allow) => [
1531
1508
  allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
1532
1509
  allow.authenticated("identityPool").to(authoringOperations),
1533
- allow.custom().to(authoringOperations),
1534
1510
  ]),
1535
1511
  ModelAttachment: a
1536
1512
  .model({
@@ -1562,7 +1538,6 @@ const schema = a.schema({
1562
1538
  ])
1563
1539
  .authorization((allow) => [
1564
1540
  allow.groups(categoryWriteGroups).to(["read"]),
1565
- allow.custom().to(authoringOperations),
1566
1541
  ]),
1567
1542
  SemanticRelationType: a
1568
1543
  .model({
@@ -1590,7 +1565,6 @@ const schema = a.schema({
1590
1565
  ])
1591
1566
  .authorization((allow) => [
1592
1567
  allow.groups(categoryWriteGroups),
1593
- allow.custom().to(authoringOperations),
1594
1568
  ]),
1595
1569
  SemanticRelation: a
1596
1570
  .model({
@@ -1641,7 +1615,6 @@ const schema = a.schema({
1641
1615
  ])
1642
1616
  .authorization((allow) => [
1643
1617
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1644
- allow.custom().to(authoringOperations),
1645
1618
  ]),
1646
1619
  Item: a
1647
1620
  .model({
@@ -1691,7 +1664,6 @@ const schema = a.schema({
1691
1664
  ])
1692
1665
  .authorization((allow) => [
1693
1666
  allow.groups(contentWriteGroups),
1694
- allow.custom().to(authoringOperations),
1695
1667
  ]),
1696
1668
  Tag: a
1697
1669
  .model({
@@ -1708,7 +1680,6 @@ const schema = a.schema({
1708
1680
  ])
1709
1681
  .authorization((allow) => [
1710
1682
  allow.groups(contentWriteGroups),
1711
- allow.custom().to(authoringOperations),
1712
1683
  ]),
1713
1684
  ItemTag: a
1714
1685
  .model({
@@ -1728,7 +1699,6 @@ const schema = a.schema({
1728
1699
  ])
1729
1700
  .authorization((allow) => [
1730
1701
  allow.groups(contentWriteGroups),
1731
- allow.custom().to(authoringOperations),
1732
1702
  ]),
1733
1703
  MediaAsset: a
1734
1704
  .model({
@@ -1761,7 +1731,6 @@ const schema = a.schema({
1761
1731
  ])
1762
1732
  .authorization((allow) => [
1763
1733
  allow.groups(contentWriteGroups),
1764
- allow.custom().to(authoringOperations),
1765
1734
  ]),
1766
1735
  Edition: a
1767
1736
  .model({
@@ -1794,7 +1763,6 @@ const schema = a.schema({
1794
1763
  ])
1795
1764
  .authorization((allow) => [
1796
1765
  allow.groups(contentWriteGroups),
1797
- allow.custom().to(authoringOperations),
1798
1766
  ]),
1799
1767
  EditionSlot: a
1800
1768
  .model({
@@ -1820,7 +1788,6 @@ const schema = a.schema({
1820
1788
  ])
1821
1789
  .authorization((allow) => [
1822
1790
  allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
1823
- allow.custom().to(authoringOperations),
1824
1791
  ]),
1825
1792
  EditionItem: a
1826
1793
  .model({
@@ -1843,7 +1810,6 @@ const schema = a.schema({
1843
1810
  ])
1844
1811
  .authorization((allow) => [
1845
1812
  allow.groups(contentWriteGroups),
1846
- allow.custom().to(authoringOperations),
1847
1813
  ]),
1848
1814
  PublishedItem: a
1849
1815
  .model({
@@ -1884,7 +1850,6 @@ const schema = a.schema({
1884
1850
  .authorization((allow) => [
1885
1851
  allow.guest().to(["read"]),
1886
1852
  allow.groups(contentWriteGroups),
1887
- allow.custom().to(authoringOperations),
1888
1853
  ]),
1889
1854
  PublishedMediaAsset: a
1890
1855
  .model({
@@ -1920,7 +1885,6 @@ const schema = a.schema({
1920
1885
  .authorization((allow) => [
1921
1886
  allow.guest().to(["read"]),
1922
1887
  allow.groups(contentWriteGroups),
1923
- allow.custom().to(authoringOperations),
1924
1888
  ]),
1925
1889
  PublishedEdition: a
1926
1890
  .model({
@@ -1946,7 +1910,6 @@ const schema = a.schema({
1946
1910
  .authorization((allow) => [
1947
1911
  allow.guest().to(["read"]),
1948
1912
  allow.groups(contentWriteGroups),
1949
- allow.custom().to(authoringOperations),
1950
1913
  ]),
1951
1914
  PublishedEditionItem: a
1952
1915
  .model({
@@ -1971,7 +1934,6 @@ const schema = a.schema({
1971
1934
  .authorization((allow) => [
1972
1935
  allow.guest().to(["read"]),
1973
1936
  allow.groups(contentWriteGroups),
1974
- allow.custom().to(authoringOperations),
1975
1937
  ]),
1976
1938
  PublishedCategorySet: a
1977
1939
  .model({
@@ -1997,7 +1959,6 @@ const schema = a.schema({
1997
1959
  .authorization((allow) => [
1998
1960
  allow.guest().to(["read"]),
1999
1961
  allow.groups(contentWriteGroups),
2000
- allow.custom().to(authoringOperations),
2001
1962
  ]),
2002
1963
  PublishedCategory: a
2003
1964
  .model({
@@ -2033,7 +1994,6 @@ const schema = a.schema({
2033
1994
  .authorization((allow) => [
2034
1995
  allow.guest().to(["read"]),
2035
1996
  allow.groups(contentWriteGroups),
2036
- allow.custom().to(authoringOperations),
2037
1997
  ]),
2038
1998
  }).authorization((allow) => [
2039
1999
  allow.resource(categoryAction),
@@ -2055,9 +2015,5 @@ export const data = defineData({
2055
2015
  apiKeyAuthorizationMode: {
2056
2016
  expiresInDays: 365,
2057
2017
  },
2058
- lambdaAuthorizationMode: {
2059
- function: graphqlJwtAuthorizer,
2060
- timeToLiveInSeconds: 300,
2061
- },
2062
2018
  },
2063
2019
  });