@anthusai/papyrus 5.33.0 → 5.33.2
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.
- package/amplify/data/function-handler.js +20 -0
- package/amplify/data/function-handler.ts +40 -0
- package/amplify/data/resource.js +62 -60
- package/amplify/data/resource.ts +62 -60
- package/amplify/data/schema.js +57 -56
- package/amplify/data/schema.ts +57 -56
- package/amplify/functions/automation-view/schema.js +3 -2
- package/amplify/functions/automation-view/schema.ts +3 -2
- package/amplify/functions/editorial-checks/schema.js +9 -8
- package/amplify/functions/editorial-checks/schema.ts +9 -8
- package/amplify/functions/monitoring-view/schema.js +2 -1
- package/amplify/functions/monitoring-view/schema.ts +2 -1
- package/amplify/plugins/newsletter/schema.js +2 -1
- package/amplify/plugins/newsletter/schema.ts +2 -1
- package/amplify/plugins/reader-steering/schema.js +4 -3
- package/amplify/plugins/reader-steering/schema.ts +4 -3
- package/amplify/plugins/signup/schema.js +2 -1
- package/amplify/plugins/signup/schema.ts +2 -1
- package/components/news-desk-taxonomy-client.ts +24 -1
- package/components/newsroom-references-view.tsx +179 -36
- package/components/reference-cyclotron-suggestion.tsx +9 -5
- package/components/reference-relevance-review.tsx +3 -3
- package/components/topic-steering-workspace.tsx +143 -121
- package/lib/cyclotron-suggestions.ts +4 -4
- package/lib/reference-review-details.ts +71 -0
- package/lib/reference-review-request.ts +14 -0
- package/lib/relevance-decisions.ts +42 -10
- package/lib/use-reference-review-data.ts +44 -0
- package/package.json +4 -1
- package/routes.manifest.json +1 -1
package/amplify/data/schema.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { newsroomSummary } from "../functions/newsroom-summary/resource";
|
|
|
12
12
|
import { publicForms } from "../functions/public-forms/resource";
|
|
13
13
|
import { procedureAction } from "../functions/procedure-action/resource";
|
|
14
14
|
import { readerSettings } from "../functions/reader-settings/resource";
|
|
15
|
+
import { functionHandler } from "./function-handler";
|
|
15
16
|
|
|
16
17
|
const authoringOperations: ("read" | "create" | "update" | "delete")[] = [
|
|
17
18
|
"read",
|
|
@@ -162,7 +163,7 @@ const definitions = {
|
|
|
162
163
|
.query()
|
|
163
164
|
.returns(a.ref("UserDirectoryResult"))
|
|
164
165
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
165
|
-
.handler(
|
|
166
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
166
167
|
|
|
167
168
|
grantUserRole: a
|
|
168
169
|
.mutation()
|
|
@@ -174,7 +175,7 @@ const definitions = {
|
|
|
174
175
|
})
|
|
175
176
|
.returns(a.ref("UserRoleMutationResult"))
|
|
176
177
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
177
|
-
.handler(
|
|
178
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
178
179
|
|
|
179
180
|
revokeUserRole: a
|
|
180
181
|
.mutation()
|
|
@@ -186,7 +187,7 @@ const definitions = {
|
|
|
186
187
|
})
|
|
187
188
|
.returns(a.ref("UserRoleMutationResult"))
|
|
188
189
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
189
|
-
.handler(
|
|
190
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
190
191
|
|
|
191
192
|
mergeUserProfiles: a
|
|
192
193
|
.mutation()
|
|
@@ -199,13 +200,13 @@ const definitions = {
|
|
|
199
200
|
})
|
|
200
201
|
.returns(a.ref("UserDirectoryEntry"))
|
|
201
202
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
202
|
-
.handler(
|
|
203
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
203
204
|
|
|
204
205
|
getReaderSettings: a
|
|
205
206
|
.query()
|
|
206
207
|
.returns(a.ref("ReaderSettingsResult"))
|
|
207
208
|
.authorization((allow) => [allow.authenticated()])
|
|
208
|
-
.handler(
|
|
209
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
209
210
|
|
|
210
211
|
updateReaderSettings: a
|
|
211
212
|
.mutation()
|
|
@@ -214,7 +215,7 @@ const definitions = {
|
|
|
214
215
|
})
|
|
215
216
|
.returns(a.ref("ReaderSettingsResult"))
|
|
216
217
|
.authorization((allow) => [allow.authenticated()])
|
|
217
|
-
.handler(
|
|
218
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
218
219
|
|
|
219
220
|
SteeringActionResult: a.customType({
|
|
220
221
|
ok: a.boolean().required(),
|
|
@@ -244,7 +245,7 @@ const definitions = {
|
|
|
244
245
|
})
|
|
245
246
|
.returns(a.ref("SteeringActionResult"))
|
|
246
247
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
247
|
-
.handler(
|
|
248
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
248
249
|
|
|
249
250
|
CurationDelegationResult: a.customType({
|
|
250
251
|
ok: a.boolean().required(),
|
|
@@ -331,7 +332,7 @@ const definitions = {
|
|
|
331
332
|
.authorization((allow) => [
|
|
332
333
|
allow.groups(categoryWriteGroups),
|
|
333
334
|
])
|
|
334
|
-
.handler(
|
|
335
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
335
336
|
|
|
336
337
|
createCurationDelegation: a
|
|
337
338
|
.mutation()
|
|
@@ -343,7 +344,7 @@ const definitions = {
|
|
|
343
344
|
.authorization((allow) => [
|
|
344
345
|
allow.groups(categoryWriteGroups),
|
|
345
346
|
])
|
|
346
|
-
.handler(
|
|
347
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
347
348
|
|
|
348
349
|
revokeCurationDelegation: a
|
|
349
350
|
.mutation()
|
|
@@ -354,7 +355,7 @@ const definitions = {
|
|
|
354
355
|
.authorization((allow) => [
|
|
355
356
|
allow.groups(categoryWriteGroups),
|
|
356
357
|
])
|
|
357
|
-
.handler(
|
|
358
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
358
359
|
|
|
359
360
|
listCurationDelegations: a
|
|
360
361
|
.query()
|
|
@@ -362,7 +363,7 @@ const definitions = {
|
|
|
362
363
|
.authorization((allow) => [
|
|
363
364
|
allow.groups(categoryWriteGroups),
|
|
364
365
|
])
|
|
365
|
-
.handler(
|
|
366
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
366
367
|
|
|
367
368
|
requestCurationDelegation: a
|
|
368
369
|
.mutation()
|
|
@@ -376,7 +377,7 @@ const definitions = {
|
|
|
376
377
|
.authorization((allow) => [
|
|
377
378
|
allow.authenticated("identityPool"),
|
|
378
379
|
])
|
|
379
|
-
.handler(
|
|
380
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
380
381
|
|
|
381
382
|
approveCurationDelegation: a
|
|
382
383
|
.mutation()
|
|
@@ -387,7 +388,7 @@ const definitions = {
|
|
|
387
388
|
.authorization((allow) => [
|
|
388
389
|
allow.groups(categoryWriteGroups),
|
|
389
390
|
])
|
|
390
|
-
.handler(
|
|
391
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
391
392
|
|
|
392
393
|
denyCurationDelegation: a
|
|
393
394
|
.mutation()
|
|
@@ -398,7 +399,7 @@ const definitions = {
|
|
|
398
399
|
.authorization((allow) => [
|
|
399
400
|
allow.groups(categoryWriteGroups),
|
|
400
401
|
])
|
|
401
|
-
.handler(
|
|
402
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
402
403
|
|
|
403
404
|
getCurationDelegationStatus: a
|
|
404
405
|
.query()
|
|
@@ -409,7 +410,7 @@ const definitions = {
|
|
|
409
410
|
.authorization((allow) => [
|
|
410
411
|
allow.authenticated("identityPool"),
|
|
411
412
|
])
|
|
412
|
-
.handler(
|
|
413
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
413
414
|
|
|
414
415
|
recordDelegatedCuration: a
|
|
415
416
|
.mutation()
|
|
@@ -431,7 +432,7 @@ const definitions = {
|
|
|
431
432
|
.authorization((allow) => [
|
|
432
433
|
allow.authenticated("identityPool"),
|
|
433
434
|
])
|
|
434
|
-
.handler(
|
|
435
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
435
436
|
|
|
436
437
|
setReferenceQualityRating: a
|
|
437
438
|
.mutation()
|
|
@@ -446,7 +447,7 @@ const definitions = {
|
|
|
446
447
|
.authorization((allow) => [
|
|
447
448
|
allow.groups(categoryWriteGroups),
|
|
448
449
|
])
|
|
449
|
-
.handler(
|
|
450
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
450
451
|
|
|
451
452
|
createCategorySetDraft: a
|
|
452
453
|
.mutation()
|
|
@@ -458,7 +459,7 @@ const definitions = {
|
|
|
458
459
|
})
|
|
459
460
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
460
461
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
461
|
-
.handler(
|
|
462
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
462
463
|
|
|
463
464
|
promoteCategorySetDraft: a
|
|
464
465
|
.mutation()
|
|
@@ -469,7 +470,7 @@ const definitions = {
|
|
|
469
470
|
})
|
|
470
471
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
471
472
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
472
|
-
.handler(
|
|
473
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
473
474
|
|
|
474
475
|
discardCategorySetDraft: a
|
|
475
476
|
.mutation()
|
|
@@ -480,7 +481,7 @@ const definitions = {
|
|
|
480
481
|
})
|
|
481
482
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
482
483
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
483
|
-
.handler(
|
|
484
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
484
485
|
|
|
485
486
|
createDraftCategory: a
|
|
486
487
|
.mutation()
|
|
@@ -496,7 +497,7 @@ const definitions = {
|
|
|
496
497
|
})
|
|
497
498
|
.returns(a.ref("SteeringActionResult"))
|
|
498
499
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
499
|
-
.handler(
|
|
500
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
500
501
|
|
|
501
502
|
updateDraftCategory: a
|
|
502
503
|
.mutation()
|
|
@@ -512,7 +513,7 @@ const definitions = {
|
|
|
512
513
|
})
|
|
513
514
|
.returns(a.ref("SteeringActionResult"))
|
|
514
515
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
515
|
-
.handler(
|
|
516
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
516
517
|
|
|
517
518
|
archiveDraftCategory: a
|
|
518
519
|
.mutation()
|
|
@@ -523,7 +524,7 @@ const definitions = {
|
|
|
523
524
|
})
|
|
524
525
|
.returns(a.ref("SteeringActionResult"))
|
|
525
526
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
526
|
-
.handler(
|
|
527
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
527
528
|
|
|
528
529
|
reviewReferenceTopicLabel: a
|
|
529
530
|
.mutation()
|
|
@@ -537,7 +538,7 @@ const definitions = {
|
|
|
537
538
|
})
|
|
538
539
|
.returns(a.ref("TopicLabelActionResult"))
|
|
539
540
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
540
|
-
.handler(
|
|
541
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
541
542
|
|
|
542
543
|
NewsroomSummary: a.customType({
|
|
543
544
|
generatedAt: a.datetime().required(),
|
|
@@ -557,56 +558,56 @@ const definitions = {
|
|
|
557
558
|
.query()
|
|
558
559
|
.returns(a.ref("NewsroomSummary"))
|
|
559
560
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
560
|
-
.handler(
|
|
561
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
561
562
|
|
|
562
563
|
deriveMarkus: a
|
|
563
564
|
.query()
|
|
564
565
|
.arguments({ input: a.json().required() })
|
|
565
566
|
.returns(a.json())
|
|
566
567
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
567
|
-
.handler(
|
|
568
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
568
569
|
|
|
569
570
|
intakePendingReferences: a
|
|
570
571
|
.mutation()
|
|
571
572
|
.arguments({ input: a.json().required() })
|
|
572
573
|
.returns(a.json())
|
|
573
574
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
574
|
-
.handler(
|
|
575
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
575
576
|
|
|
576
577
|
saveItemDraft: a
|
|
577
578
|
.mutation()
|
|
578
579
|
.arguments({ input: a.json().required() })
|
|
579
580
|
.returns(a.json())
|
|
580
581
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
581
|
-
.handler(
|
|
582
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
582
583
|
|
|
583
584
|
publishItem: a
|
|
584
585
|
.mutation()
|
|
585
586
|
.arguments({ input: a.json().required() })
|
|
586
587
|
.returns(a.json())
|
|
587
588
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
588
|
-
.handler(
|
|
589
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
589
590
|
|
|
590
591
|
moveStoryStage: a
|
|
591
592
|
.mutation()
|
|
592
593
|
.arguments({ input: a.json().required() })
|
|
593
594
|
.returns(a.json())
|
|
594
595
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
595
|
-
.handler(
|
|
596
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
596
597
|
|
|
597
598
|
unpublishItem: a
|
|
598
599
|
.mutation()
|
|
599
600
|
.arguments({ input: a.json().required() })
|
|
600
601
|
.returns(a.json())
|
|
601
602
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
602
|
-
.handler(
|
|
603
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
603
604
|
|
|
604
605
|
requestStagingBuild: a
|
|
605
606
|
.mutation()
|
|
606
607
|
.arguments({ input: a.json().required() })
|
|
607
608
|
.returns(a.json())
|
|
608
609
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
609
|
-
.handler(
|
|
610
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
610
611
|
|
|
611
612
|
knowledgeQuery: a
|
|
612
613
|
.query()
|
|
@@ -615,7 +616,7 @@ const definitions = {
|
|
|
615
616
|
})
|
|
616
617
|
.returns(a.json())
|
|
617
618
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
618
|
-
.handler(
|
|
619
|
+
.handler(functionHandler("knowledgeQuery", knowledgeQuery)),
|
|
619
620
|
|
|
620
621
|
updateNewsroomSummary: a
|
|
621
622
|
.mutation()
|
|
@@ -626,7 +627,7 @@ const definitions = {
|
|
|
626
627
|
})
|
|
627
628
|
.returns(a.ref("NewsroomSummary"))
|
|
628
629
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
629
|
-
.handler(
|
|
630
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
630
631
|
|
|
631
632
|
ModelAttachmentUploadSlot: a.customType({
|
|
632
633
|
ok: a.boolean().required(),
|
|
@@ -686,7 +687,7 @@ const definitions = {
|
|
|
686
687
|
})
|
|
687
688
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
688
689
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
689
|
-
.handler(
|
|
690
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
690
691
|
|
|
691
692
|
completeModelAttachmentUpload: a
|
|
692
693
|
.mutation()
|
|
@@ -708,7 +709,7 @@ const definitions = {
|
|
|
708
709
|
})
|
|
709
710
|
.returns(a.ref("ModelAttachment"))
|
|
710
711
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
711
|
-
.handler(
|
|
712
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
712
713
|
|
|
713
714
|
abortModelAttachmentUpload: a
|
|
714
715
|
.mutation()
|
|
@@ -730,7 +731,7 @@ const definitions = {
|
|
|
730
731
|
})
|
|
731
732
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
732
733
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
733
|
-
.handler(
|
|
734
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
734
735
|
|
|
735
736
|
createModelAttachmentDownload: a
|
|
736
737
|
.mutation()
|
|
@@ -739,7 +740,7 @@ const definitions = {
|
|
|
739
740
|
})
|
|
740
741
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
741
742
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
742
|
-
.handler(
|
|
743
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
743
744
|
|
|
744
745
|
AssignmentActionResult: a.customType({
|
|
745
746
|
ok: a.boolean().required(),
|
|
@@ -834,7 +835,7 @@ const definitions = {
|
|
|
834
835
|
})
|
|
835
836
|
.returns(a.ref("AssignmentContext").array().required())
|
|
836
837
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
837
|
-
.handler(
|
|
838
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
838
839
|
|
|
839
840
|
listAssignmentQueue: a
|
|
840
841
|
.query()
|
|
@@ -845,7 +846,7 @@ const definitions = {
|
|
|
845
846
|
})
|
|
846
847
|
.returns(a.ref("AssignmentContext").array().required())
|
|
847
848
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
848
|
-
.handler(
|
|
849
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
849
850
|
|
|
850
851
|
getEditorialContext: a
|
|
851
852
|
.query()
|
|
@@ -859,7 +860,7 @@ const definitions = {
|
|
|
859
860
|
})
|
|
860
861
|
.returns(a.json().required())
|
|
861
862
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
862
|
-
.handler(
|
|
863
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
863
864
|
|
|
864
865
|
getAssignmentContext: a
|
|
865
866
|
.query()
|
|
@@ -868,7 +869,7 @@ const definitions = {
|
|
|
868
869
|
})
|
|
869
870
|
.returns(a.ref("AssignmentContext"))
|
|
870
871
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
871
|
-
.handler(
|
|
872
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
872
873
|
|
|
873
874
|
claimAssignment: a
|
|
874
875
|
.mutation()
|
|
@@ -885,7 +886,7 @@ const definitions = {
|
|
|
885
886
|
})
|
|
886
887
|
.returns(a.ref("AssignmentActionResult"))
|
|
887
888
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
888
|
-
.handler(
|
|
889
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
889
890
|
|
|
890
891
|
releaseAssignment: a
|
|
891
892
|
.mutation()
|
|
@@ -897,7 +898,7 @@ const definitions = {
|
|
|
897
898
|
})
|
|
898
899
|
.returns(a.ref("AssignmentActionResult"))
|
|
899
900
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
900
|
-
.handler(
|
|
901
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
901
902
|
|
|
902
903
|
completeAssignment: a
|
|
903
904
|
.mutation()
|
|
@@ -909,7 +910,7 @@ const definitions = {
|
|
|
909
910
|
})
|
|
910
911
|
.returns(a.ref("AssignmentActionResult"))
|
|
911
912
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
912
|
-
.handler(
|
|
913
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
913
914
|
|
|
914
915
|
cancelAssignment: a
|
|
915
916
|
.mutation()
|
|
@@ -921,7 +922,7 @@ const definitions = {
|
|
|
921
922
|
})
|
|
922
923
|
.returns(a.ref("AssignmentActionResult"))
|
|
923
924
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
924
|
-
.handler(
|
|
925
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
925
926
|
|
|
926
927
|
reopenAssignment: a
|
|
927
928
|
.mutation()
|
|
@@ -933,7 +934,7 @@ const definitions = {
|
|
|
933
934
|
})
|
|
934
935
|
.returns(a.ref("AssignmentActionResult"))
|
|
935
936
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
936
|
-
.handler(
|
|
937
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
937
938
|
|
|
938
939
|
retryImmediateAssignment: a
|
|
939
940
|
.mutation()
|
|
@@ -945,13 +946,13 @@ const definitions = {
|
|
|
945
946
|
})
|
|
946
947
|
.returns(a.ref("AssignmentActionResult"))
|
|
947
948
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
948
|
-
.handler(
|
|
949
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
949
950
|
|
|
950
951
|
listNewsroomProcedureDefinitions: a
|
|
951
952
|
.query()
|
|
952
953
|
.returns(a.json())
|
|
953
954
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
954
|
-
.handler(
|
|
955
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
955
956
|
|
|
956
957
|
getNewsroomProcedureDefinition: a
|
|
957
958
|
.query()
|
|
@@ -961,7 +962,7 @@ const definitions = {
|
|
|
961
962
|
})
|
|
962
963
|
.returns(a.json())
|
|
963
964
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
964
|
-
.handler(
|
|
965
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
965
966
|
|
|
966
967
|
saveNewsroomProcedureDefinition: a
|
|
967
968
|
.mutation()
|
|
@@ -970,7 +971,7 @@ const definitions = {
|
|
|
970
971
|
})
|
|
971
972
|
.returns(a.json())
|
|
972
973
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
973
|
-
.handler(
|
|
974
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
974
975
|
|
|
975
976
|
saveNewsroomProcedureVersionDraft: a
|
|
976
977
|
.mutation()
|
|
@@ -979,7 +980,7 @@ const definitions = {
|
|
|
979
980
|
})
|
|
980
981
|
.returns(a.json())
|
|
981
982
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
982
|
-
.handler(
|
|
983
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
983
984
|
|
|
984
985
|
publishNewsroomProcedureVersion: a
|
|
985
986
|
.mutation()
|
|
@@ -988,7 +989,7 @@ const definitions = {
|
|
|
988
989
|
})
|
|
989
990
|
.returns(a.json())
|
|
990
991
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
991
|
-
.handler(
|
|
992
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
992
993
|
|
|
993
994
|
startNewsroomProcedureRun: a
|
|
994
995
|
.mutation()
|
|
@@ -1003,7 +1004,7 @@ const definitions = {
|
|
|
1003
1004
|
})
|
|
1004
1005
|
.returns(a.json())
|
|
1005
1006
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1006
|
-
.handler(
|
|
1007
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1007
1008
|
|
|
1008
1009
|
getNewsroomProcedureRun: a
|
|
1009
1010
|
.query()
|
|
@@ -1012,7 +1013,7 @@ const definitions = {
|
|
|
1012
1013
|
})
|
|
1013
1014
|
.returns(a.json())
|
|
1014
1015
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1015
|
-
.handler(
|
|
1016
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1016
1017
|
|
|
1017
1018
|
listNewsroomProcedureRunsByProcedure: a
|
|
1018
1019
|
.query()
|
|
@@ -1021,7 +1022,7 @@ const definitions = {
|
|
|
1021
1022
|
})
|
|
1022
1023
|
.returns(a.json())
|
|
1023
1024
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1024
|
-
.handler(
|
|
1025
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1025
1026
|
|
|
1026
1027
|
Assignment: modelWithoutSubscriptions({
|
|
1027
1028
|
id: a.id().required(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a } from "@aws-amplify/backend";
|
|
2
2
|
import { automationView } from "./resource.js";
|
|
3
|
+
import { functionHandler } from "../../data/function-handler.js";
|
|
3
4
|
const editors = ["editor", "admin"];
|
|
4
5
|
/**
|
|
5
6
|
* Core to every site's data API. The Automation page reads the automation records, the monitoring
|
|
@@ -15,11 +16,11 @@ export const automationViewSchemaDefinitions = {
|
|
|
15
16
|
.arguments({ automationId: a.string() })
|
|
16
17
|
.returns(a.json())
|
|
17
18
|
.authorization((allow) => [allow.groups(editors)])
|
|
18
|
-
.handler(
|
|
19
|
+
.handler(functionHandler("automationView", automationView)),
|
|
19
20
|
runAutomation: a
|
|
20
21
|
.mutation()
|
|
21
22
|
.arguments({ automationId: a.string().required(), input: a.json() })
|
|
22
23
|
.returns(a.json())
|
|
23
24
|
.authorization((allow) => [allow.groups(editors)])
|
|
24
|
-
.handler(
|
|
25
|
+
.handler(functionHandler("automationView", automationView)),
|
|
25
26
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a } from "@aws-amplify/backend";
|
|
2
2
|
import { automationView } from "./resource";
|
|
3
|
+
import { functionHandler } from "../../data/function-handler";
|
|
3
4
|
|
|
4
5
|
const editors = ["editor", "admin"];
|
|
5
6
|
|
|
@@ -17,11 +18,11 @@ export const automationViewSchemaDefinitions = {
|
|
|
17
18
|
.arguments({ automationId: a.string() })
|
|
18
19
|
.returns(a.json())
|
|
19
20
|
.authorization((allow) => [allow.groups(editors)])
|
|
20
|
-
.handler(
|
|
21
|
+
.handler(functionHandler("automationView", automationView)),
|
|
21
22
|
runAutomation: a
|
|
22
23
|
.mutation()
|
|
23
24
|
.arguments({ automationId: a.string().required(), input: a.json() })
|
|
24
25
|
.returns(a.json())
|
|
25
26
|
.authorization((allow) => [allow.groups(editors)])
|
|
26
|
-
.handler(
|
|
27
|
+
.handler(functionHandler("automationView", automationView)),
|
|
27
28
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a } from "@aws-amplify/backend";
|
|
2
2
|
import { editorialChecks } from "./resource.js";
|
|
3
|
+
import { functionHandler } from "../../data/function-handler.js";
|
|
3
4
|
const editors = ["editor", "admin"];
|
|
4
5
|
/**
|
|
5
6
|
* Core to every site's data API. Policies, settings and editors' decisions live in Papyrus; Humanus checks
|
|
@@ -69,19 +70,19 @@ export const editorialChecksSchemaDefinitions = {
|
|
|
69
70
|
.query()
|
|
70
71
|
.returns(a.json())
|
|
71
72
|
.authorization((allow) => [allow.groups(editors)])
|
|
72
|
-
.handler(
|
|
73
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
73
74
|
checkItemVersion: a
|
|
74
75
|
.mutation()
|
|
75
76
|
.arguments({ itemId: a.id().required() })
|
|
76
77
|
.returns(a.json())
|
|
77
78
|
.authorization((allow) => [allow.groups(editors)])
|
|
78
|
-
.handler(
|
|
79
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
79
80
|
checkEditorial: a
|
|
80
81
|
.query()
|
|
81
82
|
.arguments({ body: a.string().required(), format: a.string(), section: a.string() })
|
|
82
83
|
.returns(a.json())
|
|
83
84
|
.authorization((allow) => [allow.groups(editors)])
|
|
84
|
-
.handler(
|
|
85
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
85
86
|
suggestEditorialRewrite: a
|
|
86
87
|
.query()
|
|
87
88
|
.arguments({
|
|
@@ -94,28 +95,28 @@ export const editorialChecksSchemaDefinitions = {
|
|
|
94
95
|
})
|
|
95
96
|
.returns(a.json())
|
|
96
97
|
.authorization((allow) => [allow.groups(editors)])
|
|
97
|
-
.handler(
|
|
98
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
98
99
|
draftEditorialQuestions: a
|
|
99
100
|
.query()
|
|
100
101
|
.arguments({ title: a.string().required(), guidance: a.string().required(), examples: a.json() })
|
|
101
102
|
.returns(a.json())
|
|
102
103
|
.authorization((allow) => [allow.group("admin")])
|
|
103
|
-
.handler(
|
|
104
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
104
105
|
tryEditorialPolicy: a
|
|
105
106
|
.query()
|
|
106
107
|
.arguments({ policy: a.json().required(), text: a.string().required(), format: a.string() })
|
|
107
108
|
.returns(a.json())
|
|
108
109
|
.authorization((allow) => [allow.group("admin")])
|
|
109
|
-
.handler(
|
|
110
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
110
111
|
importEditorialStarterPack: a
|
|
111
112
|
.mutation()
|
|
112
113
|
.arguments({ name: a.string().required() })
|
|
113
114
|
.returns(a.json())
|
|
114
115
|
.authorization((allow) => [allow.group("admin")])
|
|
115
|
-
.handler(
|
|
116
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
116
117
|
recalibrateEditorialPolicies: a
|
|
117
118
|
.mutation()
|
|
118
119
|
.returns(a.json())
|
|
119
120
|
.authorization((allow) => [allow.group("admin")])
|
|
120
|
-
.handler(
|
|
121
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
121
122
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a } from "@aws-amplify/backend";
|
|
2
2
|
import { editorialChecks } from "./resource";
|
|
3
|
+
import { functionHandler } from "../../data/function-handler";
|
|
3
4
|
|
|
4
5
|
const editors = ["editor", "admin"];
|
|
5
6
|
|
|
@@ -71,19 +72,19 @@ export const editorialChecksSchemaDefinitions = {
|
|
|
71
72
|
.query()
|
|
72
73
|
.returns(a.json())
|
|
73
74
|
.authorization((allow) => [allow.groups(editors)])
|
|
74
|
-
.handler(
|
|
75
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
75
76
|
checkItemVersion: a
|
|
76
77
|
.mutation()
|
|
77
78
|
.arguments({ itemId: a.id().required() })
|
|
78
79
|
.returns(a.json())
|
|
79
80
|
.authorization((allow) => [allow.groups(editors)])
|
|
80
|
-
.handler(
|
|
81
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
81
82
|
checkEditorial: a
|
|
82
83
|
.query()
|
|
83
84
|
.arguments({ body: a.string().required(), format: a.string(), section: a.string() })
|
|
84
85
|
.returns(a.json())
|
|
85
86
|
.authorization((allow) => [allow.groups(editors)])
|
|
86
|
-
.handler(
|
|
87
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
87
88
|
suggestEditorialRewrite: a
|
|
88
89
|
.query()
|
|
89
90
|
.arguments({
|
|
@@ -96,28 +97,28 @@ export const editorialChecksSchemaDefinitions = {
|
|
|
96
97
|
})
|
|
97
98
|
.returns(a.json())
|
|
98
99
|
.authorization((allow) => [allow.groups(editors)])
|
|
99
|
-
.handler(
|
|
100
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
100
101
|
draftEditorialQuestions: a
|
|
101
102
|
.query()
|
|
102
103
|
.arguments({ title: a.string().required(), guidance: a.string().required(), examples: a.json() })
|
|
103
104
|
.returns(a.json())
|
|
104
105
|
.authorization((allow) => [allow.group("admin")])
|
|
105
|
-
.handler(
|
|
106
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
106
107
|
tryEditorialPolicy: a
|
|
107
108
|
.query()
|
|
108
109
|
.arguments({ policy: a.json().required(), text: a.string().required(), format: a.string() })
|
|
109
110
|
.returns(a.json())
|
|
110
111
|
.authorization((allow) => [allow.group("admin")])
|
|
111
|
-
.handler(
|
|
112
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
112
113
|
importEditorialStarterPack: a
|
|
113
114
|
.mutation()
|
|
114
115
|
.arguments({ name: a.string().required() })
|
|
115
116
|
.returns(a.json())
|
|
116
117
|
.authorization((allow) => [allow.group("admin")])
|
|
117
|
-
.handler(
|
|
118
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
118
119
|
recalibrateEditorialPolicies: a
|
|
119
120
|
.mutation()
|
|
120
121
|
.returns(a.json())
|
|
121
122
|
.authorization((allow) => [allow.group("admin")])
|
|
122
|
-
.handler(
|
|
123
|
+
.handler(functionHandler("editorialChecks", editorialChecks)),
|
|
123
124
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a } from "@aws-amplify/backend";
|
|
2
2
|
import { monitoringView } from "./resource.js";
|
|
3
|
+
import { functionHandler } from "../../data/function-handler.js";
|
|
3
4
|
const editors = ["editor", "admin"];
|
|
4
5
|
/**
|
|
5
6
|
* Core to every site's data API. The Monitoring page reads the shared monitoring pipeline through
|
|
@@ -12,5 +13,5 @@ export const monitoringViewSchemaDefinitions = {
|
|
|
12
13
|
.arguments({ scope: a.string() })
|
|
13
14
|
.returns(a.json())
|
|
14
15
|
.authorization((allow) => [allow.groups(editors)])
|
|
15
|
-
.handler(
|
|
16
|
+
.handler(functionHandler("monitoringView", monitoringView)),
|
|
16
17
|
};
|