@anthusai/papyrus 2.0.0-next.1 → 2.0.0-next.100
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/auth/resource.js +16 -1
- package/amplify/auth/resource.ts +19 -1
- package/amplify/data/function-handler.js +20 -0
- package/amplify/data/function-handler.ts +40 -0
- package/amplify/data/resource.js +158 -61
- package/amplify/data/resource.ts +165 -61
- package/amplify/data/schema.js +2103 -1979
- package/amplify/data/schema.ts +206 -68
- package/amplify/functions/assignment-action/data-access.js +90 -0
- package/amplify/functions/assignment-action/data-access.ts +89 -0
- package/amplify/functions/assignment-action/handler.ts +1 -1
- package/amplify/functions/automation-view/handler.py +17 -0
- package/amplify/functions/automation-view/resource.js +24 -0
- package/amplify/functions/automation-view/resource.ts +34 -0
- package/amplify/functions/automation-view/schema.js +26 -0
- package/amplify/functions/automation-view/schema.ts +28 -0
- package/amplify/functions/automation-view/wire.js +56 -0
- package/amplify/functions/automation-view/wire.ts +76 -0
- package/amplify/functions/content-actions/handler.py +70 -2
- package/amplify/functions/content-actions/requirements.txt +1 -0
- package/amplify/functions/content-actions/resource.js +1 -1
- package/amplify/functions/content-actions/resource.ts +1 -1
- package/amplify/functions/editorial-checks/handler.py +14 -0
- package/amplify/functions/editorial-checks/requirements.txt +1 -0
- package/amplify/functions/editorial-checks/resource.js +43 -0
- package/amplify/functions/editorial-checks/resource.ts +60 -0
- package/amplify/functions/editorial-checks/schema.js +122 -0
- package/amplify/functions/editorial-checks/schema.ts +124 -0
- package/amplify/functions/editorial-checks/wire.js +53 -0
- package/amplify/functions/editorial-checks/wire.ts +61 -0
- package/amplify/functions/model-attachment-upload/handler.ts +1 -0
- package/amplify/functions/monitoring-view/handler.py +11 -0
- package/amplify/functions/monitoring-view/resource.js +24 -0
- package/amplify/functions/monitoring-view/resource.ts +34 -0
- package/amplify/functions/monitoring-view/schema.js +29 -0
- package/amplify/functions/monitoring-view/schema.ts +31 -0
- package/amplify/functions/monitoring-view/wire.js +64 -0
- package/amplify/functions/monitoring-view/wire.ts +81 -0
- package/amplify/functions/public-forms/core.js +247 -0
- package/amplify/functions/public-forms/core.ts +310 -0
- package/amplify/functions/public-forms/handler.ts +41 -0
- package/amplify/functions/public-forms/origins.js +35 -0
- package/amplify/functions/public-forms/origins.ts +43 -0
- package/amplify/functions/public-forms/resource.js +9 -0
- package/amplify/functions/public-forms/resource.ts +10 -0
- package/amplify/functions/public-forms/wire.js +25 -0
- package/amplify/functions/public-forms/wire.ts +32 -0
- package/amplify/functions/shared/editorial-context.ts +63 -4
- package/amplify/functions/shared/python-bundle.js +20 -14
- package/amplify/functions/shared/python-bundle.ts +25 -18
- package/amplify/plugins/newsletter/config.js +245 -0
- package/amplify/plugins/newsletter/config.ts +305 -0
- package/amplify/plugins/newsletter/function/handler.py +6 -0
- package/amplify/plugins/newsletter/function/requirements.txt +5 -0
- package/amplify/plugins/newsletter/ops/handler.py +12 -0
- package/amplify/plugins/newsletter/ops/resource.js +27 -0
- package/amplify/plugins/newsletter/ops/resource.ts +37 -0
- package/amplify/plugins/newsletter/papyrus.plugin.js +263 -0
- package/amplify/plugins/newsletter/papyrus.plugin.ts +311 -0
- package/amplify/plugins/newsletter/schema.js +57 -0
- package/amplify/plugins/newsletter/schema.ts +62 -0
- package/amplify/plugins/newsletter/secure-string-parameter.js +107 -0
- package/amplify/plugins/newsletter/secure-string-parameter.ts +120 -0
- package/amplify/plugins/newsletter/sending.js +140 -0
- package/amplify/plugins/newsletter/sending.ts +186 -0
- package/amplify/plugins/reader-steering/config.js +182 -0
- package/amplify/plugins/reader-steering/config.ts +290 -0
- package/amplify/plugins/reader-steering/function/ai_moderation.py +246 -0
- package/amplify/plugins/reader-steering/function/handler.py +1567 -0
- package/amplify/plugins/reader-steering/function/moderation-prompt.md +27 -0
- package/amplify/plugins/reader-steering/function/moderation.py +316 -0
- package/amplify/plugins/reader-steering/function/proposals.py +458 -0
- package/amplify/plugins/reader-steering/function/resource.js +27 -0
- package/amplify/plugins/reader-steering/function/resource.ts +35 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.js +186 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.ts +212 -0
- package/amplify/plugins/reader-steering/schema.js +229 -0
- package/amplify/plugins/reader-steering/schema.ts +231 -0
- package/amplify/plugins/registry.js +4 -0
- package/amplify/plugins/registry.ts +4 -0
- package/amplify/plugins/signup/schema.js +2 -1
- package/amplify/plugins/signup/schema.ts +2 -1
- package/amplify/plugins/types.ts +5 -0
- package/amplify/plugins/wire.js +1 -0
- package/amplify/plugins/wire.ts +1 -0
- package/amplify/publication/projection-lease.js +30 -0
- package/amplify/publication/projection-lease.ts +39 -0
- package/amplify/publication/redirect-and-index.js +105 -0
- package/amplify/publication/redirect-rules.js +73 -0
- package/amplify/publication/redirect-rules.ts +93 -0
- package/amplify/publication/s3-projection.js +7 -1
- package/amplify/publication/s3-projection.ts +9 -1
- package/amplify/site-backend-config.js +19 -0
- package/amplify/site-backend-config.ts +45 -1
- package/amplify/site-backend-names.js +4 -2
- package/amplify/site-backend-names.ts +4 -2
- package/amplify/site-backend.js +51 -4
- package/amplify/site-backend.ts +60 -4
- package/app/api/auth/prospectus/sign-in/route.ts +4 -0
- package/app/api/newsletter/confirm/route.ts +13 -0
- package/app/api/newsletter/preferences/route.ts +13 -0
- package/app/api/newsletter/state/route.ts +9 -0
- package/app/api/newsletter/subscribe/route.ts +9 -0
- package/app/api/newsletter/unsubscribe/route.ts +13 -0
- package/app/api/newsroom/chat/[...path]/route.ts +17 -0
- package/app/api/newsroom/curation/context/route.ts +9 -0
- package/app/api/newsroom/curation/priming/route.ts +9 -0
- package/app/api/newsroom/curation/publication/route.ts +9 -0
- package/app/api/reader/comment/delete/route.ts +9 -0
- package/app/api/reader/comment/edit/route.ts +9 -0
- package/app/api/reader/comment/route.ts +9 -0
- package/app/api/reader/flag/route.ts +9 -0
- package/app/api/reader/handle/route.ts +9 -0
- package/app/api/reader/me/route.ts +9 -0
- package/app/api/reader/rating/route.ts +9 -0
- package/app/api/reader/report/route.ts +9 -0
- package/app/api/reader/retired/route.ts +9 -0
- package/app/api/reader/submit/route.ts +9 -0
- package/app/api/reader/vote/route.ts +9 -0
- package/app/layout.tsx +5 -1
- package/bin/papyrus-infra.mjs +20 -1
- package/components/automation-panel.tsx +49 -0
- package/components/automation-run-now.tsx +97 -0
- package/components/automation-view.tsx +195 -0
- package/components/editorial-checks-admin-panel.tsx +362 -0
- package/components/editorial-finding-card.tsx +162 -0
- package/components/editorial-findings-panel.tsx +91 -0
- package/components/editorial-preview-popover.tsx +103 -0
- package/components/markus-body-editor.tsx +213 -0
- package/components/markus-ir-preview.tsx +147 -6
- package/components/moderation-panel.tsx +248 -0
- package/components/monitoring-overview-view.tsx +414 -0
- package/components/monitoring-panel.tsx +60 -0
- package/components/news-desk-client-provider.tsx +18 -18
- package/components/news-desk-taxonomy-client.ts +28 -8
- package/components/newsletter-panel.tsx +474 -0
- package/components/newsletter-sections.tsx +163 -0
- package/components/newsroom-access-gate.tsx +16 -2
- package/components/newsroom-article-editor.tsx +145 -18
- package/components/newsroom-articles-view.tsx +6 -6
- package/components/newsroom-assignment-detail.tsx +6 -6
- package/components/newsroom-board-view.tsx +14 -10
- package/components/newsroom-curation-bootstrap.tsx +45 -0
- package/components/newsroom-ops-overview.tsx +26 -96
- package/components/newsroom-ops-shell.tsx +9 -5
- package/components/newsroom-organizer.css +90 -61
- package/components/newsroom-overview-skeleton.tsx +25 -0
- package/components/newsroom-references-view.tsx +192 -49
- package/components/newsroom-theme-fonts/broadsheet-green.css +10 -0
- package/components/newsroom-theme-fonts/broadsheet-green.tsx +6 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.css +9 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.tsx +6 -0
- package/components/newsroom-theme-fonts/night-desk.css +10 -0
- package/components/newsroom-theme-fonts/night-desk.tsx +6 -0
- package/components/newsroom-theme-fonts/refined-newsprint.css +11 -0
- package/components/newsroom-theme-fonts/refined-newsprint.tsx +6 -0
- package/components/newsroom-theme.css +39 -0
- package/components/newsroom-theme.tsx +33 -0
- package/components/notification-center.tsx +281 -0
- package/components/papyrus-console-conversation.css +14 -0
- package/components/papyrus-console-conversation.tsx +55 -0
- package/components/papyrus-console-shell.tsx +62 -420
- package/components/papyrus-private-chat-panel.tsx +134 -0
- package/components/publication-cyclotron-panel.tsx +15 -10
- package/components/reader-auth-state.ts +1 -1
- package/components/reference-add-entry.tsx +75 -0
- package/components/reference-curation-controls.tsx +31 -22
- package/components/reference-cyclotron-priming.tsx +63 -25
- package/components/reference-cyclotron-status.tsx +4 -4
- package/components/reference-cyclotron-suggestion.tsx +15 -11
- package/components/reference-live-agreement.tsx +10 -10
- package/components/reference-priming.tsx +14 -10
- package/components/reference-relevance-review.tsx +4 -4
- package/components/reference-section-suggestion.tsx +2 -2
- package/components/topic-steering-workspace.tsx +241 -144
- package/components/use-editorial-checks.ts +133 -0
- package/infra/amplify-app-shell.js +96 -16
- package/infra/amplify-app-shell.ts +108 -18
- package/infra/cloud-email-config.js +32 -0
- package/infra/cloud-email-config.ts +39 -0
- package/infra/cloud-email.js +57 -0
- package/infra/cloud-email.test.js +69 -0
- package/infra/cloud-email.test.ts +66 -0
- package/infra/cloud-email.ts +60 -0
- package/infra/index.js +1 -0
- package/infra/secure-string-parameter-handler.js +41 -0
- package/infra/secure-string-parameter-handler.ts +41 -0
- package/infra/secure-string-parameter.js +79 -0
- package/infra/secure-string-parameter.ts +91 -0
- package/infra/site-config.js +92 -6
- package/infra/site-config.ts +138 -6
- package/lib/automation-client.ts +54 -0
- package/lib/automation-fixture.ts +93 -0
- package/lib/automation-overview.ts +252 -0
- package/lib/category-repository.ts +14 -12
- package/lib/console-web-context.ts +1 -1
- package/lib/curation-routes.ts +345 -0
- package/lib/cyclotron-suggestions.ts +11 -11
- package/lib/editorial-checks-backend.ts +16 -0
- package/lib/editorial-checks-client.ts +212 -0
- package/lib/editorial-checks-demo.ts +147 -0
- package/lib/editorial-checks-settings.ts +27 -0
- package/lib/editorial-checks.ts +175 -0
- package/lib/editorial-preview.ts +228 -0
- package/lib/monitoring-client.ts +83 -0
- package/lib/monitoring-overview-fixture.ts +51 -0
- package/lib/monitoring-overview.ts +188 -0
- package/lib/news-desk-session.ts +12 -21
- package/lib/newsletter-api.ts +418 -0
- package/lib/newsletter-client.ts +46 -0
- package/lib/newsletter-fixture.ts +184 -0
- package/lib/newsletter-model.ts +202 -0
- package/lib/newsroom-board.ts +27 -2
- package/lib/newsroom-demo-dashboard.ts +1 -1
- package/lib/newsroom-nav.ts +1 -1
- package/lib/newsroom-organizer-nav.ts +2 -1
- package/lib/papyrus-chat-admission.ts +65 -0
- package/lib/papyrus-hosted-chat.ts +217 -0
- package/lib/papyrus-private-chat-client.ts +81 -0
- package/lib/prospectus-session.ts +30 -14
- package/lib/prospectus-sign-in-routes.ts +106 -31
- package/lib/prospectus-site-identity.ts +46 -6
- package/lib/reader-api.ts +145 -0
- package/lib/reader-moderation.ts +220 -0
- package/lib/reader-retirement-route.ts +89 -0
- package/lib/reader-subject.md +29 -0
- package/lib/reader-subject.ts +53 -0
- 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/relevance-status.ts +6 -6
- package/lib/review-client.ts +120 -0
- package/lib/review-fixture.ts +45 -0
- package/lib/review-requests.ts +246 -0
- package/lib/semantic-graph.ts +2 -0
- package/lib/shared-chat-admission.ts +182 -0
- package/lib/site-brand-tenant.ts +11 -6
- package/lib/site-brand.ts +23 -3
- package/lib/site-origin-value.ts +50 -0
- package/lib/site-origin.ts +8 -0
- package/lib/use-reference-review-data.ts +44 -0
- package/middleware.ts +14 -3
- package/package.json +98 -4
- package/routes.manifest.json +227 -2
- package/src/with-papyrus.mjs +1 -1
- package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-OFL.txt +0 -93
- package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +0 -93
- package/components/newsroom-newsprint-board.css +0 -7
package/amplify/data/resource.ts
CHANGED
|
@@ -6,13 +6,15 @@ import { knowledgeQuery } from "../functions/knowledge-query/resource";
|
|
|
6
6
|
import { manageUserRole } from "../functions/manage-user-role/resource";
|
|
7
7
|
import { modelAttachmentUpload } from "../functions/model-attachment-upload/resource";
|
|
8
8
|
import { newsroomSummary } from "../functions/newsroom-summary/resource";
|
|
9
|
+
import { publicForms } from "../functions/public-forms/resource";
|
|
9
10
|
import { procedureAction } from "../functions/procedure-action/resource";
|
|
10
11
|
import { readerSettings } from "../functions/reader-settings/resource";
|
|
11
12
|
import { emailSubmissionProcessor } from "../functions/email-submission-processor/resource";
|
|
12
13
|
import { sesInboundReceive } from "../functions/ses-inbound-receive/resource";
|
|
13
14
|
import { slackDelivery } from "../functions/slack-delivery/resource";
|
|
14
15
|
import { slackEvents } from "../functions/slack-events/resource";
|
|
15
|
-
import { schema as leanSchema, schemaWithPlugins } from "./schema";
|
|
16
|
+
import { assertKnownModelGroups, schema as leanSchema, schemaExcludingGroups, schemaWithPlugins } from "./schema";
|
|
17
|
+
import { functionHandler, sharedFunctions } from "./function-handler";
|
|
16
18
|
const authoringOperations: ("read" | "create" | "update" | "delete")[] = [
|
|
17
19
|
"read",
|
|
18
20
|
"create",
|
|
@@ -144,7 +146,7 @@ const schema = a.schema({
|
|
|
144
146
|
.query()
|
|
145
147
|
.returns(a.ref("UserDirectoryResult"))
|
|
146
148
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
147
|
-
.handler(
|
|
149
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
148
150
|
|
|
149
151
|
grantUserRole: a
|
|
150
152
|
.mutation()
|
|
@@ -156,7 +158,7 @@ const schema = a.schema({
|
|
|
156
158
|
})
|
|
157
159
|
.returns(a.ref("UserRoleMutationResult"))
|
|
158
160
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
159
|
-
.handler(
|
|
161
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
160
162
|
|
|
161
163
|
revokeUserRole: a
|
|
162
164
|
.mutation()
|
|
@@ -168,7 +170,7 @@ const schema = a.schema({
|
|
|
168
170
|
})
|
|
169
171
|
.returns(a.ref("UserRoleMutationResult"))
|
|
170
172
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
171
|
-
.handler(
|
|
173
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
172
174
|
|
|
173
175
|
mergeUserProfiles: a
|
|
174
176
|
.mutation()
|
|
@@ -181,13 +183,13 @@ const schema = a.schema({
|
|
|
181
183
|
})
|
|
182
184
|
.returns(a.ref("UserDirectoryEntry"))
|
|
183
185
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
184
|
-
.handler(
|
|
186
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
185
187
|
|
|
186
188
|
getReaderSettings: a
|
|
187
189
|
.query()
|
|
188
190
|
.returns(a.ref("ReaderSettingsResult"))
|
|
189
191
|
.authorization((allow) => [allow.authenticated()])
|
|
190
|
-
.handler(
|
|
192
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
191
193
|
|
|
192
194
|
updateReaderSettings: a
|
|
193
195
|
.mutation()
|
|
@@ -196,7 +198,7 @@ const schema = a.schema({
|
|
|
196
198
|
})
|
|
197
199
|
.returns(a.ref("ReaderSettingsResult"))
|
|
198
200
|
.authorization((allow) => [allow.authenticated()])
|
|
199
|
-
.handler(
|
|
201
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
200
202
|
|
|
201
203
|
SteeringActionResult: a.customType({
|
|
202
204
|
ok: a.boolean().required(),
|
|
@@ -226,7 +228,7 @@ const schema = a.schema({
|
|
|
226
228
|
})
|
|
227
229
|
.returns(a.ref("SteeringActionResult"))
|
|
228
230
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
229
|
-
.handler(
|
|
231
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
230
232
|
|
|
231
233
|
CurationDelegationResult: a.customType({
|
|
232
234
|
ok: a.boolean().required(),
|
|
@@ -351,7 +353,7 @@ const schema = a.schema({
|
|
|
351
353
|
.authorization((allow) => [
|
|
352
354
|
allow.groups(categoryWriteGroups),
|
|
353
355
|
])
|
|
354
|
-
.handler(
|
|
356
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
355
357
|
|
|
356
358
|
createCurationDelegation: a
|
|
357
359
|
.mutation()
|
|
@@ -363,7 +365,7 @@ const schema = a.schema({
|
|
|
363
365
|
.authorization((allow) => [
|
|
364
366
|
allow.groups(categoryWriteGroups),
|
|
365
367
|
])
|
|
366
|
-
.handler(
|
|
368
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
367
369
|
|
|
368
370
|
revokeCurationDelegation: a
|
|
369
371
|
.mutation()
|
|
@@ -374,7 +376,7 @@ const schema = a.schema({
|
|
|
374
376
|
.authorization((allow) => [
|
|
375
377
|
allow.groups(categoryWriteGroups),
|
|
376
378
|
])
|
|
377
|
-
.handler(
|
|
379
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
378
380
|
|
|
379
381
|
listCurationDelegations: a
|
|
380
382
|
.query()
|
|
@@ -382,7 +384,7 @@ const schema = a.schema({
|
|
|
382
384
|
.authorization((allow) => [
|
|
383
385
|
allow.groups(categoryWriteGroups),
|
|
384
386
|
])
|
|
385
|
-
.handler(
|
|
387
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
386
388
|
|
|
387
389
|
requestCurationDelegation: a
|
|
388
390
|
.mutation()
|
|
@@ -396,7 +398,7 @@ const schema = a.schema({
|
|
|
396
398
|
.authorization((allow) => [
|
|
397
399
|
allow.authenticated("identityPool"),
|
|
398
400
|
])
|
|
399
|
-
.handler(
|
|
401
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
400
402
|
|
|
401
403
|
approveCurationDelegation: a
|
|
402
404
|
.mutation()
|
|
@@ -407,7 +409,7 @@ const schema = a.schema({
|
|
|
407
409
|
.authorization((allow) => [
|
|
408
410
|
allow.groups(categoryWriteGroups),
|
|
409
411
|
])
|
|
410
|
-
.handler(
|
|
412
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
411
413
|
|
|
412
414
|
denyCurationDelegation: a
|
|
413
415
|
.mutation()
|
|
@@ -418,7 +420,7 @@ const schema = a.schema({
|
|
|
418
420
|
.authorization((allow) => [
|
|
419
421
|
allow.groups(categoryWriteGroups),
|
|
420
422
|
])
|
|
421
|
-
.handler(
|
|
423
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
422
424
|
|
|
423
425
|
getCurationDelegationStatus: a
|
|
424
426
|
.query()
|
|
@@ -429,7 +431,7 @@ const schema = a.schema({
|
|
|
429
431
|
.authorization((allow) => [
|
|
430
432
|
allow.authenticated("identityPool"),
|
|
431
433
|
])
|
|
432
|
-
.handler(
|
|
434
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
433
435
|
|
|
434
436
|
recordDelegatedCuration: a
|
|
435
437
|
.mutation()
|
|
@@ -451,7 +453,7 @@ const schema = a.schema({
|
|
|
451
453
|
.authorization((allow) => [
|
|
452
454
|
allow.authenticated("identityPool"),
|
|
453
455
|
])
|
|
454
|
-
.handler(
|
|
456
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
455
457
|
|
|
456
458
|
setReferenceQualityRating: a
|
|
457
459
|
.mutation()
|
|
@@ -466,7 +468,7 @@ const schema = a.schema({
|
|
|
466
468
|
.authorization((allow) => [
|
|
467
469
|
allow.groups(categoryWriteGroups),
|
|
468
470
|
])
|
|
469
|
-
.handler(
|
|
471
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
470
472
|
|
|
471
473
|
createReferenceNote: a
|
|
472
474
|
.mutation()
|
|
@@ -481,7 +483,7 @@ const schema = a.schema({
|
|
|
481
483
|
.authorization((allow) => [
|
|
482
484
|
allow.groups(categoryWriteGroups),
|
|
483
485
|
])
|
|
484
|
-
.handler(
|
|
486
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
485
487
|
|
|
486
488
|
moveReferenceCorpus: a
|
|
487
489
|
.mutation()
|
|
@@ -496,7 +498,7 @@ const schema = a.schema({
|
|
|
496
498
|
.authorization((allow) => [
|
|
497
499
|
allow.groups(categoryWriteGroups),
|
|
498
500
|
])
|
|
499
|
-
.handler(
|
|
501
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
500
502
|
|
|
501
503
|
startReferenceCuration: a
|
|
502
504
|
.mutation()
|
|
@@ -510,7 +512,7 @@ const schema = a.schema({
|
|
|
510
512
|
.authorization((allow) => [
|
|
511
513
|
allow.groups(categoryWriteGroups),
|
|
512
514
|
])
|
|
513
|
-
.handler(
|
|
515
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
514
516
|
|
|
515
517
|
getReferenceCurationStatus: a
|
|
516
518
|
.query()
|
|
@@ -521,7 +523,7 @@ const schema = a.schema({
|
|
|
521
523
|
.authorization((allow) => [
|
|
522
524
|
allow.groups(categoryWriteGroups),
|
|
523
525
|
])
|
|
524
|
-
.handler(
|
|
526
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
525
527
|
|
|
526
528
|
createCategorySetDraft: a
|
|
527
529
|
.mutation()
|
|
@@ -533,7 +535,7 @@ const schema = a.schema({
|
|
|
533
535
|
})
|
|
534
536
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
535
537
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
536
|
-
.handler(
|
|
538
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
537
539
|
|
|
538
540
|
promoteCategorySetDraft: a
|
|
539
541
|
.mutation()
|
|
@@ -544,7 +546,7 @@ const schema = a.schema({
|
|
|
544
546
|
})
|
|
545
547
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
546
548
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
547
|
-
.handler(
|
|
549
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
548
550
|
|
|
549
551
|
discardCategorySetDraft: a
|
|
550
552
|
.mutation()
|
|
@@ -555,7 +557,7 @@ const schema = a.schema({
|
|
|
555
557
|
})
|
|
556
558
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
557
559
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
558
|
-
.handler(
|
|
560
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
559
561
|
|
|
560
562
|
createDraftCategory: a
|
|
561
563
|
.mutation()
|
|
@@ -571,7 +573,7 @@ const schema = a.schema({
|
|
|
571
573
|
})
|
|
572
574
|
.returns(a.ref("SteeringActionResult"))
|
|
573
575
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
574
|
-
.handler(
|
|
576
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
575
577
|
|
|
576
578
|
updateDraftCategory: a
|
|
577
579
|
.mutation()
|
|
@@ -587,7 +589,7 @@ const schema = a.schema({
|
|
|
587
589
|
})
|
|
588
590
|
.returns(a.ref("SteeringActionResult"))
|
|
589
591
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
590
|
-
.handler(
|
|
592
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
591
593
|
|
|
592
594
|
archiveDraftCategory: a
|
|
593
595
|
.mutation()
|
|
@@ -598,7 +600,7 @@ const schema = a.schema({
|
|
|
598
600
|
})
|
|
599
601
|
.returns(a.ref("SteeringActionResult"))
|
|
600
602
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
601
|
-
.handler(
|
|
603
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
602
604
|
|
|
603
605
|
reviewReferenceTopicLabel: a
|
|
604
606
|
.mutation()
|
|
@@ -612,7 +614,7 @@ const schema = a.schema({
|
|
|
612
614
|
})
|
|
613
615
|
.returns(a.ref("TopicLabelActionResult"))
|
|
614
616
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
615
|
-
.handler(
|
|
617
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
616
618
|
|
|
617
619
|
NewsroomSummary: a.customType({
|
|
618
620
|
generatedAt: a.datetime().required(),
|
|
@@ -632,42 +634,63 @@ const schema = a.schema({
|
|
|
632
634
|
.query()
|
|
633
635
|
.returns(a.ref("NewsroomSummary"))
|
|
634
636
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
635
|
-
.handler(
|
|
637
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
636
638
|
|
|
637
639
|
deriveMarkus: a
|
|
638
640
|
.query()
|
|
639
641
|
.arguments({ input: a.json().required() })
|
|
640
642
|
.returns(a.json())
|
|
641
643
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
642
|
-
.handler(
|
|
644
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
645
|
+
|
|
646
|
+
intakePendingReferences: a
|
|
647
|
+
.mutation()
|
|
648
|
+
.arguments({ input: a.json().required() })
|
|
649
|
+
.returns(a.json())
|
|
650
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
651
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
652
|
+
|
|
653
|
+
intakeEmailSubmissionReferences: a
|
|
654
|
+
.mutation()
|
|
655
|
+
.arguments({ input: a.json().required() })
|
|
656
|
+
.returns(a.json())
|
|
657
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
658
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
643
659
|
|
|
644
660
|
saveItemDraft: a
|
|
645
661
|
.mutation()
|
|
646
662
|
.arguments({ input: a.json().required() })
|
|
647
663
|
.returns(a.json())
|
|
648
664
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
649
|
-
.handler(
|
|
665
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
650
666
|
|
|
651
667
|
publishItem: a
|
|
652
668
|
.mutation()
|
|
653
669
|
.arguments({ input: a.json().required() })
|
|
654
670
|
.returns(a.json())
|
|
655
671
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
656
|
-
.handler(
|
|
672
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
673
|
+
|
|
674
|
+
moveStoryStage: a
|
|
675
|
+
.mutation()
|
|
676
|
+
.arguments({ input: a.json().required() })
|
|
677
|
+
.returns(a.json())
|
|
678
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
679
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
657
680
|
|
|
658
681
|
unpublishItem: a
|
|
659
682
|
.mutation()
|
|
660
683
|
.arguments({ input: a.json().required() })
|
|
661
684
|
.returns(a.json())
|
|
662
685
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
663
|
-
.handler(
|
|
686
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
664
687
|
|
|
665
688
|
requestStagingBuild: a
|
|
666
689
|
.mutation()
|
|
667
690
|
.arguments({ input: a.json().required() })
|
|
668
691
|
.returns(a.json())
|
|
669
692
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
670
|
-
.handler(
|
|
693
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
671
694
|
|
|
672
695
|
knowledgeQuery: a
|
|
673
696
|
.query()
|
|
@@ -676,7 +699,7 @@ const schema = a.schema({
|
|
|
676
699
|
})
|
|
677
700
|
.returns(a.json())
|
|
678
701
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
679
|
-
.handler(
|
|
702
|
+
.handler(functionHandler("knowledgeQuery", knowledgeQuery)),
|
|
680
703
|
|
|
681
704
|
updateNewsroomSummary: a
|
|
682
705
|
.mutation()
|
|
@@ -687,7 +710,7 @@ const schema = a.schema({
|
|
|
687
710
|
})
|
|
688
711
|
.returns(a.ref("NewsroomSummary"))
|
|
689
712
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
690
|
-
.handler(
|
|
713
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
691
714
|
|
|
692
715
|
ModelAttachmentUploadSlot: a.customType({
|
|
693
716
|
ok: a.boolean().required(),
|
|
@@ -747,7 +770,7 @@ const schema = a.schema({
|
|
|
747
770
|
})
|
|
748
771
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
749
772
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
750
|
-
.handler(
|
|
773
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
751
774
|
|
|
752
775
|
completeModelAttachmentUpload: a
|
|
753
776
|
.mutation()
|
|
@@ -769,7 +792,7 @@ const schema = a.schema({
|
|
|
769
792
|
})
|
|
770
793
|
.returns(a.ref("ModelAttachment"))
|
|
771
794
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
772
|
-
.handler(
|
|
795
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
773
796
|
|
|
774
797
|
abortModelAttachmentUpload: a
|
|
775
798
|
.mutation()
|
|
@@ -791,7 +814,7 @@ const schema = a.schema({
|
|
|
791
814
|
})
|
|
792
815
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
793
816
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
794
|
-
.handler(
|
|
817
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
795
818
|
|
|
796
819
|
createModelAttachmentDownload: a
|
|
797
820
|
.mutation()
|
|
@@ -800,7 +823,7 @@ const schema = a.schema({
|
|
|
800
823
|
})
|
|
801
824
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
802
825
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
803
|
-
.handler(
|
|
826
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
804
827
|
|
|
805
828
|
AssignmentActionResult: a.customType({
|
|
806
829
|
ok: a.boolean().required(),
|
|
@@ -895,7 +918,7 @@ const schema = a.schema({
|
|
|
895
918
|
})
|
|
896
919
|
.returns(a.ref("AssignmentContext").array().required())
|
|
897
920
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
898
|
-
.handler(
|
|
921
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
899
922
|
|
|
900
923
|
listAssignmentQueue: a
|
|
901
924
|
.query()
|
|
@@ -906,7 +929,7 @@ const schema = a.schema({
|
|
|
906
929
|
})
|
|
907
930
|
.returns(a.ref("AssignmentContext").array().required())
|
|
908
931
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
909
|
-
.handler(
|
|
932
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
910
933
|
|
|
911
934
|
getEditorialContext: a
|
|
912
935
|
.query()
|
|
@@ -916,10 +939,11 @@ const schema = a.schema({
|
|
|
916
939
|
storyLineageId: a.id(),
|
|
917
940
|
assignmentId: a.id(),
|
|
918
941
|
maxCharacters: a.integer(),
|
|
942
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
919
943
|
})
|
|
920
944
|
.returns(a.json().required())
|
|
921
945
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
922
|
-
.handler(
|
|
946
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
923
947
|
|
|
924
948
|
getAssignmentContext: a
|
|
925
949
|
.query()
|
|
@@ -928,7 +952,7 @@ const schema = a.schema({
|
|
|
928
952
|
})
|
|
929
953
|
.returns(a.ref("AssignmentContext"))
|
|
930
954
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
931
|
-
.handler(
|
|
955
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
932
956
|
|
|
933
957
|
claimAssignment: a
|
|
934
958
|
.mutation()
|
|
@@ -945,7 +969,7 @@ const schema = a.schema({
|
|
|
945
969
|
})
|
|
946
970
|
.returns(a.ref("AssignmentActionResult"))
|
|
947
971
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
948
|
-
.handler(
|
|
972
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
949
973
|
|
|
950
974
|
releaseAssignment: a
|
|
951
975
|
.mutation()
|
|
@@ -957,7 +981,7 @@ const schema = a.schema({
|
|
|
957
981
|
})
|
|
958
982
|
.returns(a.ref("AssignmentActionResult"))
|
|
959
983
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
960
|
-
.handler(
|
|
984
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
961
985
|
|
|
962
986
|
completeAssignment: a
|
|
963
987
|
.mutation()
|
|
@@ -969,7 +993,7 @@ const schema = a.schema({
|
|
|
969
993
|
})
|
|
970
994
|
.returns(a.ref("AssignmentActionResult"))
|
|
971
995
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
972
|
-
.handler(
|
|
996
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
973
997
|
|
|
974
998
|
cancelAssignment: a
|
|
975
999
|
.mutation()
|
|
@@ -981,7 +1005,7 @@ const schema = a.schema({
|
|
|
981
1005
|
})
|
|
982
1006
|
.returns(a.ref("AssignmentActionResult"))
|
|
983
1007
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
984
|
-
.handler(
|
|
1008
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
985
1009
|
|
|
986
1010
|
reopenAssignment: a
|
|
987
1011
|
.mutation()
|
|
@@ -993,7 +1017,7 @@ const schema = a.schema({
|
|
|
993
1017
|
})
|
|
994
1018
|
.returns(a.ref("AssignmentActionResult"))
|
|
995
1019
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
996
|
-
.handler(
|
|
1020
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
997
1021
|
|
|
998
1022
|
retryImmediateAssignment: a
|
|
999
1023
|
.mutation()
|
|
@@ -1005,13 +1029,13 @@ const schema = a.schema({
|
|
|
1005
1029
|
})
|
|
1006
1030
|
.returns(a.ref("AssignmentActionResult"))
|
|
1007
1031
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1008
|
-
.handler(
|
|
1032
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
1009
1033
|
|
|
1010
1034
|
listNewsroomProcedureDefinitions: a
|
|
1011
1035
|
.query()
|
|
1012
1036
|
.returns(a.json())
|
|
1013
1037
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1014
|
-
.handler(
|
|
1038
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1015
1039
|
|
|
1016
1040
|
getNewsroomProcedureDefinition: a
|
|
1017
1041
|
.query()
|
|
@@ -1021,7 +1045,7 @@ const schema = a.schema({
|
|
|
1021
1045
|
})
|
|
1022
1046
|
.returns(a.json())
|
|
1023
1047
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1024
|
-
.handler(
|
|
1048
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1025
1049
|
|
|
1026
1050
|
saveNewsroomProcedureDefinition: a
|
|
1027
1051
|
.mutation()
|
|
@@ -1030,7 +1054,7 @@ const schema = a.schema({
|
|
|
1030
1054
|
})
|
|
1031
1055
|
.returns(a.json())
|
|
1032
1056
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1033
|
-
.handler(
|
|
1057
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1034
1058
|
|
|
1035
1059
|
saveNewsroomProcedureVersionDraft: a
|
|
1036
1060
|
.mutation()
|
|
@@ -1039,7 +1063,7 @@ const schema = a.schema({
|
|
|
1039
1063
|
})
|
|
1040
1064
|
.returns(a.json())
|
|
1041
1065
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1042
|
-
.handler(
|
|
1066
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1043
1067
|
|
|
1044
1068
|
publishNewsroomProcedureVersion: a
|
|
1045
1069
|
.mutation()
|
|
@@ -1048,7 +1072,7 @@ const schema = a.schema({
|
|
|
1048
1072
|
})
|
|
1049
1073
|
.returns(a.json())
|
|
1050
1074
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1051
|
-
.handler(
|
|
1075
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1052
1076
|
|
|
1053
1077
|
startNewsroomProcedureRun: a
|
|
1054
1078
|
.mutation()
|
|
@@ -1063,7 +1087,7 @@ const schema = a.schema({
|
|
|
1063
1087
|
})
|
|
1064
1088
|
.returns(a.json())
|
|
1065
1089
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1066
|
-
.handler(
|
|
1090
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1067
1091
|
|
|
1068
1092
|
getNewsroomProcedureRun: a
|
|
1069
1093
|
.query()
|
|
@@ -1072,7 +1096,7 @@ const schema = a.schema({
|
|
|
1072
1096
|
})
|
|
1073
1097
|
.returns(a.json())
|
|
1074
1098
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1075
|
-
.handler(
|
|
1099
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1076
1100
|
|
|
1077
1101
|
listNewsroomProcedureRunsByProcedure: a
|
|
1078
1102
|
.query()
|
|
@@ -1081,7 +1105,7 @@ const schema = a.schema({
|
|
|
1081
1105
|
})
|
|
1082
1106
|
.returns(a.json())
|
|
1083
1107
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1084
|
-
.handler(
|
|
1108
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1085
1109
|
|
|
1086
1110
|
Assignment: a
|
|
1087
1111
|
.model({
|
|
@@ -1231,6 +1255,8 @@ const schema = a.schema({
|
|
|
1231
1255
|
error: a.json(),
|
|
1232
1256
|
attempt: a.integer(),
|
|
1233
1257
|
newsroomFeedKey: a.string(),
|
|
1258
|
+
usage: a.json(),
|
|
1259
|
+
costUsd: a.float(),
|
|
1234
1260
|
})
|
|
1235
1261
|
.secondaryIndexes((index) => [
|
|
1236
1262
|
index("procedureId").sortKeys(["requestedAt"]).queryField("listProcedureRunsByProcedureAndRequestedAt"),
|
|
@@ -1243,6 +1269,77 @@ const schema = a.schema({
|
|
|
1243
1269
|
allow.group(adminGroup).to(authoringOperations),
|
|
1244
1270
|
]),
|
|
1245
1271
|
|
|
1272
|
+
Automation: a
|
|
1273
|
+
.model({
|
|
1274
|
+
id: a.id().required(),
|
|
1275
|
+
title: a.string().required(),
|
|
1276
|
+
description: a.string(),
|
|
1277
|
+
enabled: a.boolean().required(),
|
|
1278
|
+
trigger: a.json().required(),
|
|
1279
|
+
procedureKey: a.string().required(),
|
|
1280
|
+
inputTemplate: a.json(),
|
|
1281
|
+
limits: a.json(),
|
|
1282
|
+
createdBy: a.string(),
|
|
1283
|
+
createdAt: a.datetime().required(),
|
|
1284
|
+
updatedBy: a.string(),
|
|
1285
|
+
updatedAt: a.datetime().required(),
|
|
1286
|
+
})
|
|
1287
|
+
.authorization((allow) => [
|
|
1288
|
+
allow.group("editor").to(["read", "create", "update"]),
|
|
1289
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1290
|
+
]),
|
|
1291
|
+
|
|
1292
|
+
/** A human review point raised by a step on any item (PPY-ab6a50). Review is not a story state. */
|
|
1293
|
+
ReviewRequest: a
|
|
1294
|
+
.model({
|
|
1295
|
+
id: a.id().required(),
|
|
1296
|
+
subject: a.json().required(),
|
|
1297
|
+
mode: a.string().required(),
|
|
1298
|
+
reason: a.string().required(),
|
|
1299
|
+
ask: a.string(),
|
|
1300
|
+
raisedBy: a.string().required(),
|
|
1301
|
+
raisedAt: a.datetime().required(),
|
|
1302
|
+
deadline: a.datetime(),
|
|
1303
|
+
state: a.string().required(),
|
|
1304
|
+
answer: a.json(),
|
|
1305
|
+
links: a.json(),
|
|
1306
|
+
history: a.json(),
|
|
1307
|
+
appliedIn: a.json(),
|
|
1308
|
+
updatedAt: a.datetime().required(),
|
|
1309
|
+
})
|
|
1310
|
+
.authorization((allow) => [
|
|
1311
|
+
allow.group("editor").to(["read", "create", "update"]),
|
|
1312
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1313
|
+
]),
|
|
1314
|
+
|
|
1315
|
+
/** One user's read mark on one review request; id is "<userKey>#<requestId>". */
|
|
1316
|
+
ReviewReadMark: a
|
|
1317
|
+
.model({
|
|
1318
|
+
id: a.id().required(),
|
|
1319
|
+
requestId: a.string().required(),
|
|
1320
|
+
userKey: a.string().required(),
|
|
1321
|
+
readAt: a.datetime().required(),
|
|
1322
|
+
})
|
|
1323
|
+
.authorization((allow) => [
|
|
1324
|
+
allow.groups(["editor", adminGroup]).to(["read", "create", "update"]),
|
|
1325
|
+
]),
|
|
1326
|
+
|
|
1327
|
+
/** Who is told about review requests: scope default, mode or automation. Changed by data, not code. */
|
|
1328
|
+
ReviewRecipientRule: a
|
|
1329
|
+
.model({
|
|
1330
|
+
id: a.id().required(),
|
|
1331
|
+
scope: a.string().required(),
|
|
1332
|
+
key: a.string(),
|
|
1333
|
+
roles: a.string().array(),
|
|
1334
|
+
emails: a.string().array(),
|
|
1335
|
+
updatedBy: a.string(),
|
|
1336
|
+
updatedAt: a.datetime().required(),
|
|
1337
|
+
})
|
|
1338
|
+
.authorization((allow) => [
|
|
1339
|
+
allow.group("editor").to(["read"]),
|
|
1340
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1341
|
+
]),
|
|
1342
|
+
|
|
1246
1343
|
NewsroomSection: a
|
|
1247
1344
|
.model({
|
|
1248
1345
|
id: a.id().required(),
|
|
@@ -2271,12 +2368,14 @@ const schema = a.schema({
|
|
|
2271
2368
|
allow.groups(contentWriteGroups),
|
|
2272
2369
|
]),
|
|
2273
2370
|
}).authorization((allow) => [
|
|
2371
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2274
2372
|
allow.resource(categoryAction),
|
|
2275
2373
|
allow.resource(contentActions),
|
|
2276
2374
|
allow.resource(manageUserRole),
|
|
2277
2375
|
allow.resource(modelAttachmentUpload),
|
|
2278
2376
|
allow.resource(newsroomSummary),
|
|
2279
2377
|
allow.resource(procedureAction),
|
|
2378
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2280
2379
|
allow.resource(sesInboundReceive),
|
|
2281
2380
|
allow.resource(emailSubmissionProcessor),
|
|
2282
2381
|
allow.resource(slackEvents),
|
|
@@ -2289,10 +2388,15 @@ export type Schema = ClientSchema<typeof schema>;
|
|
|
2289
2388
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2290
2389
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2291
2390
|
*/
|
|
2292
|
-
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}) {
|
|
2391
|
+
export function defineSiteData(pluginDefinitions: Record<string, unknown> = {}, excludeModelGroups: readonly string[] = []) {
|
|
2392
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2393
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2293
2394
|
return defineData({
|
|
2294
2395
|
name: "PapyrusCmsApi",
|
|
2295
|
-
|
|
2396
|
+
functions: sharedFunctions(),
|
|
2397
|
+
schema: excludeModelGroups.length > 0
|
|
2398
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2399
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2296
2400
|
authorizationModes: {
|
|
2297
2401
|
defaultAuthorizationMode: "userPool",
|
|
2298
2402
|
apiKeyAuthorizationMode: {
|