@anthusai/papyrus 2.0.0-next.76 → 2.0.0-next.78

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 (30) hide show
  1. package/amplify/data/function-handler.js +20 -0
  2. package/amplify/data/function-handler.ts +40 -0
  3. package/amplify/data/resource.js +62 -60
  4. package/amplify/data/resource.ts +62 -60
  5. package/amplify/data/schema.js +57 -56
  6. package/amplify/data/schema.ts +57 -56
  7. package/amplify/functions/automation-view/schema.js +3 -2
  8. package/amplify/functions/automation-view/schema.ts +3 -2
  9. package/amplify/functions/editorial-checks/schema.js +9 -8
  10. package/amplify/functions/editorial-checks/schema.ts +9 -8
  11. package/amplify/functions/monitoring-view/schema.js +2 -1
  12. package/amplify/functions/monitoring-view/schema.ts +2 -1
  13. package/amplify/plugins/newsletter/schema.js +2 -1
  14. package/amplify/plugins/newsletter/schema.ts +2 -1
  15. package/amplify/plugins/reader-steering/schema.js +4 -3
  16. package/amplify/plugins/reader-steering/schema.ts +4 -3
  17. package/amplify/plugins/signup/schema.js +2 -1
  18. package/amplify/plugins/signup/schema.ts +2 -1
  19. package/components/news-desk-taxonomy-client.ts +24 -1
  20. package/components/newsroom-references-view.tsx +179 -36
  21. package/components/reference-cyclotron-suggestion.tsx +9 -5
  22. package/components/reference-relevance-review.tsx +3 -3
  23. package/components/topic-steering-workspace.tsx +143 -121
  24. package/lib/cyclotron-suggestions.ts +4 -4
  25. package/lib/reference-review-details.ts +71 -0
  26. package/lib/reference-review-request.ts +14 -0
  27. package/lib/relevance-decisions.ts +42 -10
  28. package/lib/use-reference-review-data.ts +44 -0
  29. package/package.json +4 -1
  30. package/routes.manifest.json +1 -1
@@ -14,6 +14,7 @@ import { sesInboundReceive } from "../functions/ses-inbound-receive/resource";
14
14
  import { slackDelivery } from "../functions/slack-delivery/resource";
15
15
  import { slackEvents } from "../functions/slack-events/resource";
16
16
  import { assertKnownModelGroups, schema as leanSchema, schemaExcludingGroups, schemaWithPlugins } from "./schema";
17
+ import { functionHandler, sharedFunctions } from "./function-handler";
17
18
  const authoringOperations: ("read" | "create" | "update" | "delete")[] = [
18
19
  "read",
19
20
  "create",
@@ -145,7 +146,7 @@ const schema = a.schema({
145
146
  .query()
146
147
  .returns(a.ref("UserDirectoryResult"))
147
148
  .authorization((allow) => [allow.group(adminGroup)])
148
- .handler(a.handler.function(manageUserRole)),
149
+ .handler(functionHandler("manageUserRole", manageUserRole)),
149
150
 
150
151
  grantUserRole: a
151
152
  .mutation()
@@ -157,7 +158,7 @@ const schema = a.schema({
157
158
  })
158
159
  .returns(a.ref("UserRoleMutationResult"))
159
160
  .authorization((allow) => [allow.group(adminGroup)])
160
- .handler(a.handler.function(manageUserRole)),
161
+ .handler(functionHandler("manageUserRole", manageUserRole)),
161
162
 
162
163
  revokeUserRole: a
163
164
  .mutation()
@@ -169,7 +170,7 @@ const schema = a.schema({
169
170
  })
170
171
  .returns(a.ref("UserRoleMutationResult"))
171
172
  .authorization((allow) => [allow.group(adminGroup)])
172
- .handler(a.handler.function(manageUserRole)),
173
+ .handler(functionHandler("manageUserRole", manageUserRole)),
173
174
 
174
175
  mergeUserProfiles: a
175
176
  .mutation()
@@ -182,13 +183,13 @@ const schema = a.schema({
182
183
  })
183
184
  .returns(a.ref("UserDirectoryEntry"))
184
185
  .authorization((allow) => [allow.group(adminGroup)])
185
- .handler(a.handler.function(manageUserRole)),
186
+ .handler(functionHandler("manageUserRole", manageUserRole)),
186
187
 
187
188
  getReaderSettings: a
188
189
  .query()
189
190
  .returns(a.ref("ReaderSettingsResult"))
190
191
  .authorization((allow) => [allow.authenticated()])
191
- .handler(a.handler.function(readerSettings)),
192
+ .handler(functionHandler("readerSettings", readerSettings)),
192
193
 
193
194
  updateReaderSettings: a
194
195
  .mutation()
@@ -197,7 +198,7 @@ const schema = a.schema({
197
198
  })
198
199
  .returns(a.ref("ReaderSettingsResult"))
199
200
  .authorization((allow) => [allow.authenticated()])
200
- .handler(a.handler.function(readerSettings)),
201
+ .handler(functionHandler("readerSettings", readerSettings)),
201
202
 
202
203
  SteeringActionResult: a.customType({
203
204
  ok: a.boolean().required(),
@@ -227,7 +228,7 @@ const schema = a.schema({
227
228
  })
228
229
  .returns(a.ref("SteeringActionResult"))
229
230
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
230
- .handler(a.handler.function(categoryAction)),
231
+ .handler(functionHandler("categoryAction", categoryAction)),
231
232
 
232
233
  CurationDelegationResult: a.customType({
233
234
  ok: a.boolean().required(),
@@ -352,7 +353,7 @@ const schema = a.schema({
352
353
  .authorization((allow) => [
353
354
  allow.groups(categoryWriteGroups),
354
355
  ])
355
- .handler(a.handler.function(categoryAction)),
356
+ .handler(functionHandler("categoryAction", categoryAction)),
356
357
 
357
358
  createCurationDelegation: a
358
359
  .mutation()
@@ -364,7 +365,7 @@ const schema = a.schema({
364
365
  .authorization((allow) => [
365
366
  allow.groups(categoryWriteGroups),
366
367
  ])
367
- .handler(a.handler.function(categoryAction)),
368
+ .handler(functionHandler("categoryAction", categoryAction)),
368
369
 
369
370
  revokeCurationDelegation: a
370
371
  .mutation()
@@ -375,7 +376,7 @@ const schema = a.schema({
375
376
  .authorization((allow) => [
376
377
  allow.groups(categoryWriteGroups),
377
378
  ])
378
- .handler(a.handler.function(categoryAction)),
379
+ .handler(functionHandler("categoryAction", categoryAction)),
379
380
 
380
381
  listCurationDelegations: a
381
382
  .query()
@@ -383,7 +384,7 @@ const schema = a.schema({
383
384
  .authorization((allow) => [
384
385
  allow.groups(categoryWriteGroups),
385
386
  ])
386
- .handler(a.handler.function(categoryAction)),
387
+ .handler(functionHandler("categoryAction", categoryAction)),
387
388
 
388
389
  requestCurationDelegation: a
389
390
  .mutation()
@@ -397,7 +398,7 @@ const schema = a.schema({
397
398
  .authorization((allow) => [
398
399
  allow.authenticated("identityPool"),
399
400
  ])
400
- .handler(a.handler.function(categoryAction)),
401
+ .handler(functionHandler("categoryAction", categoryAction)),
401
402
 
402
403
  approveCurationDelegation: a
403
404
  .mutation()
@@ -408,7 +409,7 @@ const schema = a.schema({
408
409
  .authorization((allow) => [
409
410
  allow.groups(categoryWriteGroups),
410
411
  ])
411
- .handler(a.handler.function(categoryAction)),
412
+ .handler(functionHandler("categoryAction", categoryAction)),
412
413
 
413
414
  denyCurationDelegation: a
414
415
  .mutation()
@@ -419,7 +420,7 @@ const schema = a.schema({
419
420
  .authorization((allow) => [
420
421
  allow.groups(categoryWriteGroups),
421
422
  ])
422
- .handler(a.handler.function(categoryAction)),
423
+ .handler(functionHandler("categoryAction", categoryAction)),
423
424
 
424
425
  getCurationDelegationStatus: a
425
426
  .query()
@@ -430,7 +431,7 @@ const schema = a.schema({
430
431
  .authorization((allow) => [
431
432
  allow.authenticated("identityPool"),
432
433
  ])
433
- .handler(a.handler.function(categoryAction)),
434
+ .handler(functionHandler("categoryAction", categoryAction)),
434
435
 
435
436
  recordDelegatedCuration: a
436
437
  .mutation()
@@ -452,7 +453,7 @@ const schema = a.schema({
452
453
  .authorization((allow) => [
453
454
  allow.authenticated("identityPool"),
454
455
  ])
455
- .handler(a.handler.function(categoryAction)),
456
+ .handler(functionHandler("categoryAction", categoryAction)),
456
457
 
457
458
  setReferenceQualityRating: a
458
459
  .mutation()
@@ -467,7 +468,7 @@ const schema = a.schema({
467
468
  .authorization((allow) => [
468
469
  allow.groups(categoryWriteGroups),
469
470
  ])
470
- .handler(a.handler.function(categoryAction)),
471
+ .handler(functionHandler("categoryAction", categoryAction)),
471
472
 
472
473
  createReferenceNote: a
473
474
  .mutation()
@@ -482,7 +483,7 @@ const schema = a.schema({
482
483
  .authorization((allow) => [
483
484
  allow.groups(categoryWriteGroups),
484
485
  ])
485
- .handler(a.handler.function(categoryAction)),
486
+ .handler(functionHandler("categoryAction", categoryAction)),
486
487
 
487
488
  moveReferenceCorpus: a
488
489
  .mutation()
@@ -497,7 +498,7 @@ const schema = a.schema({
497
498
  .authorization((allow) => [
498
499
  allow.groups(categoryWriteGroups),
499
500
  ])
500
- .handler(a.handler.function(categoryAction)),
501
+ .handler(functionHandler("categoryAction", categoryAction)),
501
502
 
502
503
  startReferenceCuration: a
503
504
  .mutation()
@@ -511,7 +512,7 @@ const schema = a.schema({
511
512
  .authorization((allow) => [
512
513
  allow.groups(categoryWriteGroups),
513
514
  ])
514
- .handler(a.handler.function(categoryAction)),
515
+ .handler(functionHandler("categoryAction", categoryAction)),
515
516
 
516
517
  getReferenceCurationStatus: a
517
518
  .query()
@@ -522,7 +523,7 @@ const schema = a.schema({
522
523
  .authorization((allow) => [
523
524
  allow.groups(categoryWriteGroups),
524
525
  ])
525
- .handler(a.handler.function(categoryAction)),
526
+ .handler(functionHandler("categoryAction", categoryAction)),
526
527
 
527
528
  createCategorySetDraft: a
528
529
  .mutation()
@@ -534,7 +535,7 @@ const schema = a.schema({
534
535
  })
535
536
  .returns(a.ref("CategorySetDraftActionResult"))
536
537
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
537
- .handler(a.handler.function(categoryAction)),
538
+ .handler(functionHandler("categoryAction", categoryAction)),
538
539
 
539
540
  promoteCategorySetDraft: a
540
541
  .mutation()
@@ -545,7 +546,7 @@ const schema = a.schema({
545
546
  })
546
547
  .returns(a.ref("CategorySetDraftActionResult"))
547
548
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
548
- .handler(a.handler.function(categoryAction)),
549
+ .handler(functionHandler("categoryAction", categoryAction)),
549
550
 
550
551
  discardCategorySetDraft: a
551
552
  .mutation()
@@ -556,7 +557,7 @@ const schema = a.schema({
556
557
  })
557
558
  .returns(a.ref("CategorySetDraftActionResult"))
558
559
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
559
- .handler(a.handler.function(categoryAction)),
560
+ .handler(functionHandler("categoryAction", categoryAction)),
560
561
 
561
562
  createDraftCategory: a
562
563
  .mutation()
@@ -572,7 +573,7 @@ const schema = a.schema({
572
573
  })
573
574
  .returns(a.ref("SteeringActionResult"))
574
575
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
575
- .handler(a.handler.function(categoryAction)),
576
+ .handler(functionHandler("categoryAction", categoryAction)),
576
577
 
577
578
  updateDraftCategory: a
578
579
  .mutation()
@@ -588,7 +589,7 @@ const schema = a.schema({
588
589
  })
589
590
  .returns(a.ref("SteeringActionResult"))
590
591
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
591
- .handler(a.handler.function(categoryAction)),
592
+ .handler(functionHandler("categoryAction", categoryAction)),
592
593
 
593
594
  archiveDraftCategory: a
594
595
  .mutation()
@@ -599,7 +600,7 @@ const schema = a.schema({
599
600
  })
600
601
  .returns(a.ref("SteeringActionResult"))
601
602
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
602
- .handler(a.handler.function(categoryAction)),
603
+ .handler(functionHandler("categoryAction", categoryAction)),
603
604
 
604
605
  reviewReferenceTopicLabel: a
605
606
  .mutation()
@@ -613,7 +614,7 @@ const schema = a.schema({
613
614
  })
614
615
  .returns(a.ref("TopicLabelActionResult"))
615
616
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
616
- .handler(a.handler.function(categoryAction)),
617
+ .handler(functionHandler("categoryAction", categoryAction)),
617
618
 
618
619
  NewsroomSummary: a.customType({
619
620
  generatedAt: a.datetime().required(),
@@ -633,56 +634,56 @@ const schema = a.schema({
633
634
  .query()
634
635
  .returns(a.ref("NewsroomSummary"))
635
636
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
636
- .handler(a.handler.function(newsroomSummary)),
637
+ .handler(functionHandler("newsroomSummary", newsroomSummary)),
637
638
 
638
639
  deriveMarkus: a
639
640
  .query()
640
641
  .arguments({ input: a.json().required() })
641
642
  .returns(a.json())
642
643
  .authorization((allow) => [allow.groups(contentWriteGroups)])
643
- .handler(a.handler.function(contentActions)),
644
+ .handler(functionHandler("contentActions", contentActions)),
644
645
 
645
646
  intakePendingReferences: a
646
647
  .mutation()
647
648
  .arguments({ input: a.json().required() })
648
649
  .returns(a.json())
649
650
  .authorization((allow) => [allow.groups(contentWriteGroups)])
650
- .handler(a.handler.function(contentActions)),
651
+ .handler(functionHandler("contentActions", contentActions)),
651
652
 
652
653
  saveItemDraft: a
653
654
  .mutation()
654
655
  .arguments({ input: a.json().required() })
655
656
  .returns(a.json())
656
657
  .authorization((allow) => [allow.groups(contentWriteGroups)])
657
- .handler(a.handler.function(contentActions)),
658
+ .handler(functionHandler("contentActions", contentActions)),
658
659
 
659
660
  publishItem: a
660
661
  .mutation()
661
662
  .arguments({ input: a.json().required() })
662
663
  .returns(a.json())
663
664
  .authorization((allow) => [allow.groups(contentWriteGroups)])
664
- .handler(a.handler.function(contentActions)),
665
+ .handler(functionHandler("contentActions", contentActions)),
665
666
 
666
667
  moveStoryStage: a
667
668
  .mutation()
668
669
  .arguments({ input: a.json().required() })
669
670
  .returns(a.json())
670
671
  .authorization((allow) => [allow.groups(contentWriteGroups)])
671
- .handler(a.handler.function(contentActions)),
672
+ .handler(functionHandler("contentActions", contentActions)),
672
673
 
673
674
  unpublishItem: a
674
675
  .mutation()
675
676
  .arguments({ input: a.json().required() })
676
677
  .returns(a.json())
677
678
  .authorization((allow) => [allow.groups(contentWriteGroups)])
678
- .handler(a.handler.function(contentActions)),
679
+ .handler(functionHandler("contentActions", contentActions)),
679
680
 
680
681
  requestStagingBuild: a
681
682
  .mutation()
682
683
  .arguments({ input: a.json().required() })
683
684
  .returns(a.json())
684
685
  .authorization((allow) => [allow.groups(contentWriteGroups)])
685
- .handler(a.handler.function(contentActions)),
686
+ .handler(functionHandler("contentActions", contentActions)),
686
687
 
687
688
  knowledgeQuery: a
688
689
  .query()
@@ -691,7 +692,7 @@ const schema = a.schema({
691
692
  })
692
693
  .returns(a.json())
693
694
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
694
- .handler(a.handler.function(knowledgeQuery)),
695
+ .handler(functionHandler("knowledgeQuery", knowledgeQuery)),
695
696
 
696
697
  updateNewsroomSummary: a
697
698
  .mutation()
@@ -702,7 +703,7 @@ const schema = a.schema({
702
703
  })
703
704
  .returns(a.ref("NewsroomSummary"))
704
705
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
705
- .handler(a.handler.function(newsroomSummary)),
706
+ .handler(functionHandler("newsroomSummary", newsroomSummary)),
706
707
 
707
708
  ModelAttachmentUploadSlot: a.customType({
708
709
  ok: a.boolean().required(),
@@ -762,7 +763,7 @@ const schema = a.schema({
762
763
  })
763
764
  .returns(a.ref("ModelAttachmentUploadSlot"))
764
765
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
765
- .handler(a.handler.function(modelAttachmentUpload)),
766
+ .handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
766
767
 
767
768
  completeModelAttachmentUpload: a
768
769
  .mutation()
@@ -784,7 +785,7 @@ const schema = a.schema({
784
785
  })
785
786
  .returns(a.ref("ModelAttachment"))
786
787
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
787
- .handler(a.handler.function(modelAttachmentUpload)),
788
+ .handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
788
789
 
789
790
  abortModelAttachmentUpload: a
790
791
  .mutation()
@@ -806,7 +807,7 @@ const schema = a.schema({
806
807
  })
807
808
  .returns(a.ref("ModelAttachmentUploadAbortResult"))
808
809
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
809
- .handler(a.handler.function(modelAttachmentUpload)),
810
+ .handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
810
811
 
811
812
  createModelAttachmentDownload: a
812
813
  .mutation()
@@ -815,7 +816,7 @@ const schema = a.schema({
815
816
  })
816
817
  .returns(a.ref("ModelAttachmentDownloadSlot"))
817
818
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
818
- .handler(a.handler.function(modelAttachmentUpload)),
819
+ .handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
819
820
 
820
821
  AssignmentActionResult: a.customType({
821
822
  ok: a.boolean().required(),
@@ -910,7 +911,7 @@ const schema = a.schema({
910
911
  })
911
912
  .returns(a.ref("AssignmentContext").array().required())
912
913
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
913
- .handler(a.handler.function(assignmentAction)),
914
+ .handler(functionHandler("assignmentAction", assignmentAction)),
914
915
 
915
916
  listAssignmentQueue: a
916
917
  .query()
@@ -921,7 +922,7 @@ const schema = a.schema({
921
922
  })
922
923
  .returns(a.ref("AssignmentContext").array().required())
923
924
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
924
- .handler(a.handler.function(assignmentAction)),
925
+ .handler(functionHandler("assignmentAction", assignmentAction)),
925
926
 
926
927
  getEditorialContext: a
927
928
  .query()
@@ -935,7 +936,7 @@ const schema = a.schema({
935
936
  })
936
937
  .returns(a.json().required())
937
938
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
938
- .handler(a.handler.function(assignmentAction)),
939
+ .handler(functionHandler("assignmentAction", assignmentAction)),
939
940
 
940
941
  getAssignmentContext: a
941
942
  .query()
@@ -944,7 +945,7 @@ const schema = a.schema({
944
945
  })
945
946
  .returns(a.ref("AssignmentContext"))
946
947
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
947
- .handler(a.handler.function(assignmentAction)),
948
+ .handler(functionHandler("assignmentAction", assignmentAction)),
948
949
 
949
950
  claimAssignment: a
950
951
  .mutation()
@@ -961,7 +962,7 @@ const schema = a.schema({
961
962
  })
962
963
  .returns(a.ref("AssignmentActionResult"))
963
964
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
964
- .handler(a.handler.function(assignmentAction)),
965
+ .handler(functionHandler("assignmentAction", assignmentAction)),
965
966
 
966
967
  releaseAssignment: a
967
968
  .mutation()
@@ -973,7 +974,7 @@ const schema = a.schema({
973
974
  })
974
975
  .returns(a.ref("AssignmentActionResult"))
975
976
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
976
- .handler(a.handler.function(assignmentAction)),
977
+ .handler(functionHandler("assignmentAction", assignmentAction)),
977
978
 
978
979
  completeAssignment: a
979
980
  .mutation()
@@ -985,7 +986,7 @@ const schema = a.schema({
985
986
  })
986
987
  .returns(a.ref("AssignmentActionResult"))
987
988
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
988
- .handler(a.handler.function(assignmentAction)),
989
+ .handler(functionHandler("assignmentAction", assignmentAction)),
989
990
 
990
991
  cancelAssignment: a
991
992
  .mutation()
@@ -997,7 +998,7 @@ const schema = a.schema({
997
998
  })
998
999
  .returns(a.ref("AssignmentActionResult"))
999
1000
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1000
- .handler(a.handler.function(assignmentAction)),
1001
+ .handler(functionHandler("assignmentAction", assignmentAction)),
1001
1002
 
1002
1003
  reopenAssignment: a
1003
1004
  .mutation()
@@ -1009,7 +1010,7 @@ const schema = a.schema({
1009
1010
  })
1010
1011
  .returns(a.ref("AssignmentActionResult"))
1011
1012
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1012
- .handler(a.handler.function(assignmentAction)),
1013
+ .handler(functionHandler("assignmentAction", assignmentAction)),
1013
1014
 
1014
1015
  retryImmediateAssignment: a
1015
1016
  .mutation()
@@ -1021,13 +1022,13 @@ const schema = a.schema({
1021
1022
  })
1022
1023
  .returns(a.ref("AssignmentActionResult"))
1023
1024
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1024
- .handler(a.handler.function(assignmentAction)),
1025
+ .handler(functionHandler("assignmentAction", assignmentAction)),
1025
1026
 
1026
1027
  listNewsroomProcedureDefinitions: a
1027
1028
  .query()
1028
1029
  .returns(a.json())
1029
1030
  .authorization((allow) => [allow.group(adminGroup)])
1030
- .handler(a.handler.function(procedureAction)),
1031
+ .handler(functionHandler("procedureAction", procedureAction)),
1031
1032
 
1032
1033
  getNewsroomProcedureDefinition: a
1033
1034
  .query()
@@ -1037,7 +1038,7 @@ const schema = a.schema({
1037
1038
  })
1038
1039
  .returns(a.json())
1039
1040
  .authorization((allow) => [allow.group(adminGroup)])
1040
- .handler(a.handler.function(procedureAction)),
1041
+ .handler(functionHandler("procedureAction", procedureAction)),
1041
1042
 
1042
1043
  saveNewsroomProcedureDefinition: a
1043
1044
  .mutation()
@@ -1046,7 +1047,7 @@ const schema = a.schema({
1046
1047
  })
1047
1048
  .returns(a.json())
1048
1049
  .authorization((allow) => [allow.group(adminGroup)])
1049
- .handler(a.handler.function(procedureAction)),
1050
+ .handler(functionHandler("procedureAction", procedureAction)),
1050
1051
 
1051
1052
  saveNewsroomProcedureVersionDraft: a
1052
1053
  .mutation()
@@ -1055,7 +1056,7 @@ const schema = a.schema({
1055
1056
  })
1056
1057
  .returns(a.json())
1057
1058
  .authorization((allow) => [allow.group(adminGroup)])
1058
- .handler(a.handler.function(procedureAction)),
1059
+ .handler(functionHandler("procedureAction", procedureAction)),
1059
1060
 
1060
1061
  publishNewsroomProcedureVersion: a
1061
1062
  .mutation()
@@ -1064,7 +1065,7 @@ const schema = a.schema({
1064
1065
  })
1065
1066
  .returns(a.json())
1066
1067
  .authorization((allow) => [allow.group(adminGroup)])
1067
- .handler(a.handler.function(procedureAction)),
1068
+ .handler(functionHandler("procedureAction", procedureAction)),
1068
1069
 
1069
1070
  startNewsroomProcedureRun: a
1070
1071
  .mutation()
@@ -1079,7 +1080,7 @@ const schema = a.schema({
1079
1080
  })
1080
1081
  .returns(a.json())
1081
1082
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1082
- .handler(a.handler.function(procedureAction)),
1083
+ .handler(functionHandler("procedureAction", procedureAction)),
1083
1084
 
1084
1085
  getNewsroomProcedureRun: a
1085
1086
  .query()
@@ -1088,7 +1089,7 @@ const schema = a.schema({
1088
1089
  })
1089
1090
  .returns(a.json())
1090
1091
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1091
- .handler(a.handler.function(procedureAction)),
1092
+ .handler(functionHandler("procedureAction", procedureAction)),
1092
1093
 
1093
1094
  listNewsroomProcedureRunsByProcedure: a
1094
1095
  .query()
@@ -1097,7 +1098,7 @@ const schema = a.schema({
1097
1098
  })
1098
1099
  .returns(a.json())
1099
1100
  .authorization((allow) => [allow.groups(categoryWriteGroups)])
1100
- .handler(a.handler.function(procedureAction)),
1101
+ .handler(functionHandler("procedureAction", procedureAction)),
1101
1102
 
1102
1103
  Assignment: a
1103
1104
  .model({
@@ -2385,6 +2386,7 @@ export function defineSiteData(pluginDefinitions: Record<string, unknown> = {},
2385
2386
  const hasPlugins = Object.keys(pluginDefinitions).length > 0;
2386
2387
  return defineData({
2387
2388
  name: "PapyrusCmsApi",
2389
+ functions: sharedFunctions(),
2388
2390
  schema: excludeModelGroups.length > 0
2389
2391
  ? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
2390
2392
  : hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,