@anthusai/papyrus 2.0.0-next.11 → 2.0.0-next.110
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 +152 -62
- package/amplify/data/resource.ts +158 -62
- package/amplify/data/schema.js +2101 -1987
- package/amplify/data/schema.ts +197 -70
- package/amplify/functions/assignment-action/data-access.js +2 -0
- package/amplify/functions/assignment-action/data-access.ts +2 -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 +64 -3
- 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 +2 -2
- package/amplify/functions/editorial-checks/requirements.txt +1 -1
- package/amplify/functions/editorial-checks/resource.js +3 -3
- package/amplify/functions/editorial-checks/resource.ts +3 -3
- package/amplify/functions/editorial-checks/schema.js +38 -8
- package/amplify/functions/editorial-checks/schema.ts +38 -8
- package/amplify/functions/editorial-checks/wire.js +4 -0
- package/amplify/functions/editorial-checks/wire.ts +4 -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 +1589 -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 +487 -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 +187 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.ts +213 -0
- package/amplify/plugins/reader-steering/schema.js +252 -0
- package/amplify/plugins/reader-steering/schema.ts +254 -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 +42 -4
- package/amplify/site-backend.ts +45 -4
- package/app/.well-known/papyrus-cli.json/route.ts +9 -0
- 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 +32 -17
- package/components/moderation-panel.tsx +248 -0
- package/components/monitoring-overview-view.tsx +422 -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 +9 -7
- package/components/newsroom-articles-view.tsx +6 -6
- package/components/newsroom-assignment-detail.tsx +6 -6
- package/components/newsroom-board-view.tsx +8 -3
- package/components/newsroom-curation-bootstrap.tsx +45 -0
- package/components/newsroom-ops-overview.tsx +26 -96
- package/components/newsroom-ops-shell.tsx +2 -2
- package/components/newsroom-organizer.css +33 -0
- package/components/newsroom-overview-skeleton.tsx +25 -0
- package/components/newsroom-references-view.tsx +192 -49
- 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 +58 -19
- package/components/reference-cyclotron-suggestion.tsx +10 -6
- package/components/reference-priming.tsx +14 -10
- package/components/reference-relevance-review.tsx +3 -3
- package/components/reference-section-suggestion.tsx +1 -1
- package/components/topic-steering-workspace.tsx +230 -144
- 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/cli-login-discovery.ts +78 -0
- package/lib/console-web-context.ts +1 -1
- package/lib/curation-routes.ts +345 -0
- package/lib/cyclotron-suggestions.ts +4 -4
- package/lib/editorial-checks-client.ts +18 -0
- package/lib/editorial-checks-demo.ts +1 -1
- package/lib/editorial-checks.ts +8 -4
- package/lib/editorial-preview.ts +5 -5
- package/lib/monitoring-client.ts +83 -0
- package/lib/monitoring-overview-fixture.ts +51 -0
- package/lib/monitoring-overview.ts +191 -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-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 +2 -2
- 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 +6 -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 +67 -3
- package/routes.manifest.json +238 -2
- package/src/sync.mjs +11 -2
- package/src/with-papyrus.d.mts +1 -0
- package/src/with-papyrus.mjs +17 -1
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,49 +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)),
|
|
643
645
|
|
|
644
646
|
intakePendingReferences: a
|
|
645
647
|
.mutation()
|
|
646
648
|
.arguments({ input: a.json().required() })
|
|
647
649
|
.returns(a.json())
|
|
648
650
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
649
|
-
.handler(
|
|
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)),
|
|
650
659
|
|
|
651
660
|
saveItemDraft: a
|
|
652
661
|
.mutation()
|
|
653
662
|
.arguments({ input: a.json().required() })
|
|
654
663
|
.returns(a.json())
|
|
655
664
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
656
|
-
.handler(
|
|
665
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
657
666
|
|
|
658
667
|
publishItem: a
|
|
659
668
|
.mutation()
|
|
660
669
|
.arguments({ input: a.json().required() })
|
|
661
670
|
.returns(a.json())
|
|
662
671
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
663
|
-
.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)),
|
|
664
680
|
|
|
665
681
|
unpublishItem: a
|
|
666
682
|
.mutation()
|
|
667
683
|
.arguments({ input: a.json().required() })
|
|
668
684
|
.returns(a.json())
|
|
669
685
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
670
|
-
.handler(
|
|
686
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
671
687
|
|
|
672
688
|
requestStagingBuild: a
|
|
673
689
|
.mutation()
|
|
674
690
|
.arguments({ input: a.json().required() })
|
|
675
691
|
.returns(a.json())
|
|
676
692
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
677
|
-
.handler(
|
|
693
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
678
694
|
|
|
679
695
|
knowledgeQuery: a
|
|
680
696
|
.query()
|
|
@@ -683,7 +699,7 @@ const schema = a.schema({
|
|
|
683
699
|
})
|
|
684
700
|
.returns(a.json())
|
|
685
701
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
686
|
-
.handler(
|
|
702
|
+
.handler(functionHandler("knowledgeQuery", knowledgeQuery)),
|
|
687
703
|
|
|
688
704
|
updateNewsroomSummary: a
|
|
689
705
|
.mutation()
|
|
@@ -694,7 +710,7 @@ const schema = a.schema({
|
|
|
694
710
|
})
|
|
695
711
|
.returns(a.ref("NewsroomSummary"))
|
|
696
712
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
697
|
-
.handler(
|
|
713
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
698
714
|
|
|
699
715
|
ModelAttachmentUploadSlot: a.customType({
|
|
700
716
|
ok: a.boolean().required(),
|
|
@@ -754,7 +770,7 @@ const schema = a.schema({
|
|
|
754
770
|
})
|
|
755
771
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
756
772
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
757
|
-
.handler(
|
|
773
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
758
774
|
|
|
759
775
|
completeModelAttachmentUpload: a
|
|
760
776
|
.mutation()
|
|
@@ -776,7 +792,7 @@ const schema = a.schema({
|
|
|
776
792
|
})
|
|
777
793
|
.returns(a.ref("ModelAttachment"))
|
|
778
794
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
779
|
-
.handler(
|
|
795
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
780
796
|
|
|
781
797
|
abortModelAttachmentUpload: a
|
|
782
798
|
.mutation()
|
|
@@ -798,7 +814,7 @@ const schema = a.schema({
|
|
|
798
814
|
})
|
|
799
815
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
800
816
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
801
|
-
.handler(
|
|
817
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
802
818
|
|
|
803
819
|
createModelAttachmentDownload: a
|
|
804
820
|
.mutation()
|
|
@@ -807,7 +823,7 @@ const schema = a.schema({
|
|
|
807
823
|
})
|
|
808
824
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
809
825
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
810
|
-
.handler(
|
|
826
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
811
827
|
|
|
812
828
|
AssignmentActionResult: a.customType({
|
|
813
829
|
ok: a.boolean().required(),
|
|
@@ -902,7 +918,7 @@ const schema = a.schema({
|
|
|
902
918
|
})
|
|
903
919
|
.returns(a.ref("AssignmentContext").array().required())
|
|
904
920
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
905
|
-
.handler(
|
|
921
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
906
922
|
|
|
907
923
|
listAssignmentQueue: a
|
|
908
924
|
.query()
|
|
@@ -913,7 +929,7 @@ const schema = a.schema({
|
|
|
913
929
|
})
|
|
914
930
|
.returns(a.ref("AssignmentContext").array().required())
|
|
915
931
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
916
|
-
.handler(
|
|
932
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
917
933
|
|
|
918
934
|
getEditorialContext: a
|
|
919
935
|
.query()
|
|
@@ -923,10 +939,11 @@ const schema = a.schema({
|
|
|
923
939
|
storyLineageId: a.id(),
|
|
924
940
|
assignmentId: a.id(),
|
|
925
941
|
maxCharacters: a.integer(),
|
|
942
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
926
943
|
})
|
|
927
944
|
.returns(a.json().required())
|
|
928
945
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
929
|
-
.handler(
|
|
946
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
930
947
|
|
|
931
948
|
getAssignmentContext: a
|
|
932
949
|
.query()
|
|
@@ -935,7 +952,7 @@ const schema = a.schema({
|
|
|
935
952
|
})
|
|
936
953
|
.returns(a.ref("AssignmentContext"))
|
|
937
954
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
938
|
-
.handler(
|
|
955
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
939
956
|
|
|
940
957
|
claimAssignment: a
|
|
941
958
|
.mutation()
|
|
@@ -952,7 +969,7 @@ const schema = a.schema({
|
|
|
952
969
|
})
|
|
953
970
|
.returns(a.ref("AssignmentActionResult"))
|
|
954
971
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
955
|
-
.handler(
|
|
972
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
956
973
|
|
|
957
974
|
releaseAssignment: a
|
|
958
975
|
.mutation()
|
|
@@ -964,7 +981,7 @@ const schema = a.schema({
|
|
|
964
981
|
})
|
|
965
982
|
.returns(a.ref("AssignmentActionResult"))
|
|
966
983
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
967
|
-
.handler(
|
|
984
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
968
985
|
|
|
969
986
|
completeAssignment: a
|
|
970
987
|
.mutation()
|
|
@@ -976,7 +993,7 @@ const schema = a.schema({
|
|
|
976
993
|
})
|
|
977
994
|
.returns(a.ref("AssignmentActionResult"))
|
|
978
995
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
979
|
-
.handler(
|
|
996
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
980
997
|
|
|
981
998
|
cancelAssignment: a
|
|
982
999
|
.mutation()
|
|
@@ -988,7 +1005,7 @@ const schema = a.schema({
|
|
|
988
1005
|
})
|
|
989
1006
|
.returns(a.ref("AssignmentActionResult"))
|
|
990
1007
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
991
|
-
.handler(
|
|
1008
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
992
1009
|
|
|
993
1010
|
reopenAssignment: a
|
|
994
1011
|
.mutation()
|
|
@@ -1000,7 +1017,7 @@ const schema = a.schema({
|
|
|
1000
1017
|
})
|
|
1001
1018
|
.returns(a.ref("AssignmentActionResult"))
|
|
1002
1019
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1003
|
-
.handler(
|
|
1020
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
1004
1021
|
|
|
1005
1022
|
retryImmediateAssignment: a
|
|
1006
1023
|
.mutation()
|
|
@@ -1012,13 +1029,13 @@ const schema = a.schema({
|
|
|
1012
1029
|
})
|
|
1013
1030
|
.returns(a.ref("AssignmentActionResult"))
|
|
1014
1031
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1015
|
-
.handler(
|
|
1032
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
1016
1033
|
|
|
1017
1034
|
listNewsroomProcedureDefinitions: a
|
|
1018
1035
|
.query()
|
|
1019
1036
|
.returns(a.json())
|
|
1020
1037
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1021
|
-
.handler(
|
|
1038
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1022
1039
|
|
|
1023
1040
|
getNewsroomProcedureDefinition: a
|
|
1024
1041
|
.query()
|
|
@@ -1028,7 +1045,7 @@ const schema = a.schema({
|
|
|
1028
1045
|
})
|
|
1029
1046
|
.returns(a.json())
|
|
1030
1047
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1031
|
-
.handler(
|
|
1048
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1032
1049
|
|
|
1033
1050
|
saveNewsroomProcedureDefinition: a
|
|
1034
1051
|
.mutation()
|
|
@@ -1037,7 +1054,7 @@ const schema = a.schema({
|
|
|
1037
1054
|
})
|
|
1038
1055
|
.returns(a.json())
|
|
1039
1056
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1040
|
-
.handler(
|
|
1057
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1041
1058
|
|
|
1042
1059
|
saveNewsroomProcedureVersionDraft: a
|
|
1043
1060
|
.mutation()
|
|
@@ -1046,7 +1063,7 @@ const schema = a.schema({
|
|
|
1046
1063
|
})
|
|
1047
1064
|
.returns(a.json())
|
|
1048
1065
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1049
|
-
.handler(
|
|
1066
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1050
1067
|
|
|
1051
1068
|
publishNewsroomProcedureVersion: a
|
|
1052
1069
|
.mutation()
|
|
@@ -1055,7 +1072,7 @@ const schema = a.schema({
|
|
|
1055
1072
|
})
|
|
1056
1073
|
.returns(a.json())
|
|
1057
1074
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
1058
|
-
.handler(
|
|
1075
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1059
1076
|
|
|
1060
1077
|
startNewsroomProcedureRun: a
|
|
1061
1078
|
.mutation()
|
|
@@ -1070,7 +1087,7 @@ const schema = a.schema({
|
|
|
1070
1087
|
})
|
|
1071
1088
|
.returns(a.json())
|
|
1072
1089
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1073
|
-
.handler(
|
|
1090
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1074
1091
|
|
|
1075
1092
|
getNewsroomProcedureRun: a
|
|
1076
1093
|
.query()
|
|
@@ -1079,7 +1096,7 @@ const schema = a.schema({
|
|
|
1079
1096
|
})
|
|
1080
1097
|
.returns(a.json())
|
|
1081
1098
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1082
|
-
.handler(
|
|
1099
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1083
1100
|
|
|
1084
1101
|
listNewsroomProcedureRunsByProcedure: a
|
|
1085
1102
|
.query()
|
|
@@ -1088,7 +1105,7 @@ const schema = a.schema({
|
|
|
1088
1105
|
})
|
|
1089
1106
|
.returns(a.json())
|
|
1090
1107
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1091
|
-
.handler(
|
|
1108
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1092
1109
|
|
|
1093
1110
|
Assignment: a
|
|
1094
1111
|
.model({
|
|
@@ -1238,6 +1255,8 @@ const schema = a.schema({
|
|
|
1238
1255
|
error: a.json(),
|
|
1239
1256
|
attempt: a.integer(),
|
|
1240
1257
|
newsroomFeedKey: a.string(),
|
|
1258
|
+
usage: a.json(),
|
|
1259
|
+
costUsd: a.float(),
|
|
1241
1260
|
})
|
|
1242
1261
|
.secondaryIndexes((index) => [
|
|
1243
1262
|
index("procedureId").sortKeys(["requestedAt"]).queryField("listProcedureRunsByProcedureAndRequestedAt"),
|
|
@@ -1250,6 +1269,77 @@ const schema = a.schema({
|
|
|
1250
1269
|
allow.group(adminGroup).to(authoringOperations),
|
|
1251
1270
|
]),
|
|
1252
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
|
+
|
|
1253
1343
|
NewsroomSection: a
|
|
1254
1344
|
.model({
|
|
1255
1345
|
id: a.id().required(),
|
|
@@ -2285,6 +2375,7 @@ const schema = a.schema({
|
|
|
2285
2375
|
allow.resource(modelAttachmentUpload),
|
|
2286
2376
|
allow.resource(newsroomSummary),
|
|
2287
2377
|
allow.resource(procedureAction),
|
|
2378
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2288
2379
|
allow.resource(sesInboundReceive),
|
|
2289
2380
|
allow.resource(emailSubmissionProcessor),
|
|
2290
2381
|
allow.resource(slackEvents),
|
|
@@ -2297,10 +2388,15 @@ export type Schema = ClientSchema<typeof schema>;
|
|
|
2297
2388
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2298
2389
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2299
2390
|
*/
|
|
2300
|
-
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;
|
|
2301
2394
|
return defineData({
|
|
2302
2395
|
name: "PapyrusCmsApi",
|
|
2303
|
-
|
|
2396
|
+
functions: sharedFunctions(),
|
|
2397
|
+
schema: excludeModelGroups.length > 0
|
|
2398
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2399
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2304
2400
|
authorizationModes: {
|
|
2305
2401
|
defaultAuthorizationMode: "userPool",
|
|
2306
2402
|
apiKeyAuthorizationMode: {
|