@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.js
CHANGED
|
@@ -6,13 +6,15 @@ import { knowledgeQuery } from "../functions/knowledge-query/resource.js";
|
|
|
6
6
|
import { manageUserRole } from "../functions/manage-user-role/resource.js";
|
|
7
7
|
import { modelAttachmentUpload } from "../functions/model-attachment-upload/resource.js";
|
|
8
8
|
import { newsroomSummary } from "../functions/newsroom-summary/resource.js";
|
|
9
|
+
import { publicForms } from "../functions/public-forms/resource.js";
|
|
9
10
|
import { procedureAction } from "../functions/procedure-action/resource.js";
|
|
10
11
|
import { readerSettings } from "../functions/reader-settings/resource.js";
|
|
11
12
|
import { emailSubmissionProcessor } from "../functions/email-submission-processor/resource.js";
|
|
12
13
|
import { sesInboundReceive } from "../functions/ses-inbound-receive/resource.js";
|
|
13
14
|
import { slackDelivery } from "../functions/slack-delivery/resource.js";
|
|
14
15
|
import { slackEvents } from "../functions/slack-events/resource.js";
|
|
15
|
-
import { schema as leanSchema, schemaWithPlugins } from "./schema.js";
|
|
16
|
+
import { assertKnownModelGroups, schema as leanSchema, schemaExcludingGroups, schemaWithPlugins } from "./schema.js";
|
|
17
|
+
import { functionHandler, sharedFunctions } from "./function-handler.js";
|
|
16
18
|
const authoringOperations = [
|
|
17
19
|
"read",
|
|
18
20
|
"create",
|
|
@@ -135,7 +137,7 @@ const schema = a.schema({
|
|
|
135
137
|
.query()
|
|
136
138
|
.returns(a.ref("UserDirectoryResult"))
|
|
137
139
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
138
|
-
.handler(
|
|
140
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
139
141
|
grantUserRole: a
|
|
140
142
|
.mutation()
|
|
141
143
|
.arguments({
|
|
@@ -146,7 +148,7 @@ const schema = a.schema({
|
|
|
146
148
|
})
|
|
147
149
|
.returns(a.ref("UserRoleMutationResult"))
|
|
148
150
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
149
|
-
.handler(
|
|
151
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
150
152
|
revokeUserRole: a
|
|
151
153
|
.mutation()
|
|
152
154
|
.arguments({
|
|
@@ -157,7 +159,7 @@ const schema = a.schema({
|
|
|
157
159
|
})
|
|
158
160
|
.returns(a.ref("UserRoleMutationResult"))
|
|
159
161
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
160
|
-
.handler(
|
|
162
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
161
163
|
mergeUserProfiles: a
|
|
162
164
|
.mutation()
|
|
163
165
|
.arguments({
|
|
@@ -169,12 +171,12 @@ const schema = a.schema({
|
|
|
169
171
|
})
|
|
170
172
|
.returns(a.ref("UserDirectoryEntry"))
|
|
171
173
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
172
|
-
.handler(
|
|
174
|
+
.handler(functionHandler("manageUserRole", manageUserRole)),
|
|
173
175
|
getReaderSettings: a
|
|
174
176
|
.query()
|
|
175
177
|
.returns(a.ref("ReaderSettingsResult"))
|
|
176
178
|
.authorization((allow) => [allow.authenticated()])
|
|
177
|
-
.handler(
|
|
179
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
178
180
|
updateReaderSettings: a
|
|
179
181
|
.mutation()
|
|
180
182
|
.arguments({
|
|
@@ -182,7 +184,7 @@ const schema = a.schema({
|
|
|
182
184
|
})
|
|
183
185
|
.returns(a.ref("ReaderSettingsResult"))
|
|
184
186
|
.authorization((allow) => [allow.authenticated()])
|
|
185
|
-
.handler(
|
|
187
|
+
.handler(functionHandler("readerSettings", readerSettings)),
|
|
186
188
|
SteeringActionResult: a.customType({
|
|
187
189
|
ok: a.boolean().required(),
|
|
188
190
|
action: a.string().required(),
|
|
@@ -210,7 +212,7 @@ const schema = a.schema({
|
|
|
210
212
|
})
|
|
211
213
|
.returns(a.ref("SteeringActionResult"))
|
|
212
214
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
213
|
-
.handler(
|
|
215
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
214
216
|
CurationDelegationResult: a.customType({
|
|
215
217
|
ok: a.boolean().required(),
|
|
216
218
|
delegationId: a.id().required(),
|
|
@@ -323,7 +325,7 @@ const schema = a.schema({
|
|
|
323
325
|
.authorization((allow) => [
|
|
324
326
|
allow.groups(categoryWriteGroups),
|
|
325
327
|
])
|
|
326
|
-
.handler(
|
|
328
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
327
329
|
createCurationDelegation: a
|
|
328
330
|
.mutation()
|
|
329
331
|
.arguments({
|
|
@@ -334,7 +336,7 @@ const schema = a.schema({
|
|
|
334
336
|
.authorization((allow) => [
|
|
335
337
|
allow.groups(categoryWriteGroups),
|
|
336
338
|
])
|
|
337
|
-
.handler(
|
|
339
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
338
340
|
revokeCurationDelegation: a
|
|
339
341
|
.mutation()
|
|
340
342
|
.arguments({
|
|
@@ -344,14 +346,14 @@ const schema = a.schema({
|
|
|
344
346
|
.authorization((allow) => [
|
|
345
347
|
allow.groups(categoryWriteGroups),
|
|
346
348
|
])
|
|
347
|
-
.handler(
|
|
349
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
348
350
|
listCurationDelegations: a
|
|
349
351
|
.query()
|
|
350
352
|
.returns(a.ref("CurationDelegationResult").array())
|
|
351
353
|
.authorization((allow) => [
|
|
352
354
|
allow.groups(categoryWriteGroups),
|
|
353
355
|
])
|
|
354
|
-
.handler(
|
|
356
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
355
357
|
requestCurationDelegation: a
|
|
356
358
|
.mutation()
|
|
357
359
|
.arguments({
|
|
@@ -364,7 +366,7 @@ const schema = a.schema({
|
|
|
364
366
|
.authorization((allow) => [
|
|
365
367
|
allow.authenticated("identityPool"),
|
|
366
368
|
])
|
|
367
|
-
.handler(
|
|
369
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
368
370
|
approveCurationDelegation: a
|
|
369
371
|
.mutation()
|
|
370
372
|
.arguments({
|
|
@@ -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
|
denyCurationDelegation: a
|
|
379
381
|
.mutation()
|
|
380
382
|
.arguments({
|
|
@@ -384,7 +386,7 @@ const schema = a.schema({
|
|
|
384
386
|
.authorization((allow) => [
|
|
385
387
|
allow.groups(categoryWriteGroups),
|
|
386
388
|
])
|
|
387
|
-
.handler(
|
|
389
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
388
390
|
getCurationDelegationStatus: a
|
|
389
391
|
.query()
|
|
390
392
|
.arguments({
|
|
@@ -394,7 +396,7 @@ const schema = a.schema({
|
|
|
394
396
|
.authorization((allow) => [
|
|
395
397
|
allow.authenticated("identityPool"),
|
|
396
398
|
])
|
|
397
|
-
.handler(
|
|
399
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
398
400
|
recordDelegatedCuration: a
|
|
399
401
|
.mutation()
|
|
400
402
|
.arguments({
|
|
@@ -415,7 +417,7 @@ const schema = a.schema({
|
|
|
415
417
|
.authorization((allow) => [
|
|
416
418
|
allow.authenticated("identityPool"),
|
|
417
419
|
])
|
|
418
|
-
.handler(
|
|
420
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
419
421
|
setReferenceQualityRating: a
|
|
420
422
|
.mutation()
|
|
421
423
|
.arguments({
|
|
@@ -429,7 +431,7 @@ const schema = a.schema({
|
|
|
429
431
|
.authorization((allow) => [
|
|
430
432
|
allow.groups(categoryWriteGroups),
|
|
431
433
|
])
|
|
432
|
-
.handler(
|
|
434
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
433
435
|
createReferenceNote: a
|
|
434
436
|
.mutation()
|
|
435
437
|
.arguments({
|
|
@@ -443,7 +445,7 @@ const schema = a.schema({
|
|
|
443
445
|
.authorization((allow) => [
|
|
444
446
|
allow.groups(categoryWriteGroups),
|
|
445
447
|
])
|
|
446
|
-
.handler(
|
|
448
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
447
449
|
moveReferenceCorpus: a
|
|
448
450
|
.mutation()
|
|
449
451
|
.arguments({
|
|
@@ -457,7 +459,7 @@ const schema = a.schema({
|
|
|
457
459
|
.authorization((allow) => [
|
|
458
460
|
allow.groups(categoryWriteGroups),
|
|
459
461
|
])
|
|
460
|
-
.handler(
|
|
462
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
461
463
|
startReferenceCuration: a
|
|
462
464
|
.mutation()
|
|
463
465
|
.arguments({
|
|
@@ -470,7 +472,7 @@ const schema = a.schema({
|
|
|
470
472
|
.authorization((allow) => [
|
|
471
473
|
allow.groups(categoryWriteGroups),
|
|
472
474
|
])
|
|
473
|
-
.handler(
|
|
475
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
474
476
|
getReferenceCurationStatus: a
|
|
475
477
|
.query()
|
|
476
478
|
.arguments({
|
|
@@ -480,7 +482,7 @@ const schema = a.schema({
|
|
|
480
482
|
.authorization((allow) => [
|
|
481
483
|
allow.groups(categoryWriteGroups),
|
|
482
484
|
])
|
|
483
|
-
.handler(
|
|
485
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
484
486
|
createCategorySetDraft: a
|
|
485
487
|
.mutation()
|
|
486
488
|
.arguments({
|
|
@@ -491,7 +493,7 @@ const schema = a.schema({
|
|
|
491
493
|
})
|
|
492
494
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
493
495
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
494
|
-
.handler(
|
|
496
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
495
497
|
promoteCategorySetDraft: a
|
|
496
498
|
.mutation()
|
|
497
499
|
.arguments({
|
|
@@ -501,7 +503,7 @@ const schema = a.schema({
|
|
|
501
503
|
})
|
|
502
504
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
503
505
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
504
|
-
.handler(
|
|
506
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
505
507
|
discardCategorySetDraft: a
|
|
506
508
|
.mutation()
|
|
507
509
|
.arguments({
|
|
@@ -511,7 +513,7 @@ const schema = a.schema({
|
|
|
511
513
|
})
|
|
512
514
|
.returns(a.ref("CategorySetDraftActionResult"))
|
|
513
515
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
514
|
-
.handler(
|
|
516
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
515
517
|
createDraftCategory: a
|
|
516
518
|
.mutation()
|
|
517
519
|
.arguments({
|
|
@@ -526,7 +528,7 @@ const schema = a.schema({
|
|
|
526
528
|
})
|
|
527
529
|
.returns(a.ref("SteeringActionResult"))
|
|
528
530
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
529
|
-
.handler(
|
|
531
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
530
532
|
updateDraftCategory: a
|
|
531
533
|
.mutation()
|
|
532
534
|
.arguments({
|
|
@@ -541,7 +543,7 @@ const schema = a.schema({
|
|
|
541
543
|
})
|
|
542
544
|
.returns(a.ref("SteeringActionResult"))
|
|
543
545
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
544
|
-
.handler(
|
|
546
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
545
547
|
archiveDraftCategory: a
|
|
546
548
|
.mutation()
|
|
547
549
|
.arguments({
|
|
@@ -551,7 +553,7 @@ const schema = a.schema({
|
|
|
551
553
|
})
|
|
552
554
|
.returns(a.ref("SteeringActionResult"))
|
|
553
555
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
554
|
-
.handler(
|
|
556
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
555
557
|
reviewReferenceTopicLabel: a
|
|
556
558
|
.mutation()
|
|
557
559
|
.arguments({
|
|
@@ -564,7 +566,7 @@ const schema = a.schema({
|
|
|
564
566
|
})
|
|
565
567
|
.returns(a.ref("TopicLabelActionResult"))
|
|
566
568
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
567
|
-
.handler(
|
|
569
|
+
.handler(functionHandler("categoryAction", categoryAction)),
|
|
568
570
|
NewsroomSummary: a.customType({
|
|
569
571
|
generatedAt: a.datetime().required(),
|
|
570
572
|
staleAt: a.datetime(),
|
|
@@ -582,43 +584,55 @@ const schema = a.schema({
|
|
|
582
584
|
.query()
|
|
583
585
|
.returns(a.ref("NewsroomSummary"))
|
|
584
586
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
585
|
-
.handler(
|
|
587
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
586
588
|
deriveMarkus: a
|
|
587
589
|
.query()
|
|
588
590
|
.arguments({ input: a.json().required() })
|
|
589
591
|
.returns(a.json())
|
|
590
592
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
591
|
-
.handler(
|
|
593
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
592
594
|
intakePendingReferences: a
|
|
593
595
|
.mutation()
|
|
594
596
|
.arguments({ input: a.json().required() })
|
|
595
597
|
.returns(a.json())
|
|
596
598
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
597
|
-
.handler(
|
|
599
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
600
|
+
intakeEmailSubmissionReferences: a
|
|
601
|
+
.mutation()
|
|
602
|
+
.arguments({ input: a.json().required() })
|
|
603
|
+
.returns(a.json())
|
|
604
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
605
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
598
606
|
saveItemDraft: a
|
|
599
607
|
.mutation()
|
|
600
608
|
.arguments({ input: a.json().required() })
|
|
601
609
|
.returns(a.json())
|
|
602
610
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
603
|
-
.handler(
|
|
611
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
604
612
|
publishItem: a
|
|
605
613
|
.mutation()
|
|
606
614
|
.arguments({ input: a.json().required() })
|
|
607
615
|
.returns(a.json())
|
|
608
616
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
609
|
-
.handler(
|
|
617
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
618
|
+
moveStoryStage: a
|
|
619
|
+
.mutation()
|
|
620
|
+
.arguments({ input: a.json().required() })
|
|
621
|
+
.returns(a.json())
|
|
622
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
623
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
610
624
|
unpublishItem: a
|
|
611
625
|
.mutation()
|
|
612
626
|
.arguments({ input: a.json().required() })
|
|
613
627
|
.returns(a.json())
|
|
614
628
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
615
|
-
.handler(
|
|
629
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
616
630
|
requestStagingBuild: a
|
|
617
631
|
.mutation()
|
|
618
632
|
.arguments({ input: a.json().required() })
|
|
619
633
|
.returns(a.json())
|
|
620
634
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
621
|
-
.handler(
|
|
635
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
622
636
|
knowledgeQuery: a
|
|
623
637
|
.query()
|
|
624
638
|
.arguments({
|
|
@@ -626,7 +640,7 @@ const schema = a.schema({
|
|
|
626
640
|
})
|
|
627
641
|
.returns(a.json())
|
|
628
642
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
629
|
-
.handler(
|
|
643
|
+
.handler(functionHandler("knowledgeQuery", knowledgeQuery)),
|
|
630
644
|
updateNewsroomSummary: a
|
|
631
645
|
.mutation()
|
|
632
646
|
.arguments({
|
|
@@ -636,7 +650,7 @@ const schema = a.schema({
|
|
|
636
650
|
})
|
|
637
651
|
.returns(a.ref("NewsroomSummary"))
|
|
638
652
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
639
|
-
.handler(
|
|
653
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
640
654
|
ModelAttachmentUploadSlot: a.customType({
|
|
641
655
|
ok: a.boolean().required(),
|
|
642
656
|
uploadId: a.string().required(),
|
|
@@ -692,7 +706,7 @@ const schema = a.schema({
|
|
|
692
706
|
})
|
|
693
707
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
694
708
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
695
|
-
.handler(
|
|
709
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
696
710
|
completeModelAttachmentUpload: a
|
|
697
711
|
.mutation()
|
|
698
712
|
.arguments({
|
|
@@ -713,7 +727,7 @@ const schema = a.schema({
|
|
|
713
727
|
})
|
|
714
728
|
.returns(a.ref("ModelAttachment"))
|
|
715
729
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
716
|
-
.handler(
|
|
730
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
717
731
|
abortModelAttachmentUpload: a
|
|
718
732
|
.mutation()
|
|
719
733
|
.arguments({
|
|
@@ -734,7 +748,7 @@ const schema = a.schema({
|
|
|
734
748
|
})
|
|
735
749
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
736
750
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
737
|
-
.handler(
|
|
751
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
738
752
|
createModelAttachmentDownload: a
|
|
739
753
|
.mutation()
|
|
740
754
|
.arguments({
|
|
@@ -742,7 +756,7 @@ const schema = a.schema({
|
|
|
742
756
|
})
|
|
743
757
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
744
758
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
745
|
-
.handler(
|
|
759
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
746
760
|
AssignmentActionResult: a.customType({
|
|
747
761
|
ok: a.boolean().required(),
|
|
748
762
|
assignmentId: a.id(),
|
|
@@ -830,7 +844,7 @@ const schema = a.schema({
|
|
|
830
844
|
})
|
|
831
845
|
.returns(a.ref("AssignmentContext").array().required())
|
|
832
846
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
833
|
-
.handler(
|
|
847
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
834
848
|
listAssignmentQueue: a
|
|
835
849
|
.query()
|
|
836
850
|
.arguments({
|
|
@@ -840,7 +854,7 @@ const schema = a.schema({
|
|
|
840
854
|
})
|
|
841
855
|
.returns(a.ref("AssignmentContext").array().required())
|
|
842
856
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
843
|
-
.handler(
|
|
857
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
844
858
|
getEditorialContext: a
|
|
845
859
|
.query()
|
|
846
860
|
.arguments({
|
|
@@ -849,10 +863,11 @@ const schema = a.schema({
|
|
|
849
863
|
storyLineageId: a.id(),
|
|
850
864
|
assignmentId: a.id(),
|
|
851
865
|
maxCharacters: a.integer(),
|
|
866
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
852
867
|
})
|
|
853
868
|
.returns(a.json().required())
|
|
854
869
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
855
|
-
.handler(
|
|
870
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
856
871
|
getAssignmentContext: a
|
|
857
872
|
.query()
|
|
858
873
|
.arguments({
|
|
@@ -860,7 +875,7 @@ const schema = a.schema({
|
|
|
860
875
|
})
|
|
861
876
|
.returns(a.ref("AssignmentContext"))
|
|
862
877
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
863
|
-
.handler(
|
|
878
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
864
879
|
claimAssignment: a
|
|
865
880
|
.mutation()
|
|
866
881
|
.arguments({
|
|
@@ -876,7 +891,7 @@ const schema = a.schema({
|
|
|
876
891
|
})
|
|
877
892
|
.returns(a.ref("AssignmentActionResult"))
|
|
878
893
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
879
|
-
.handler(
|
|
894
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
880
895
|
releaseAssignment: a
|
|
881
896
|
.mutation()
|
|
882
897
|
.arguments({
|
|
@@ -887,7 +902,7 @@ const schema = a.schema({
|
|
|
887
902
|
})
|
|
888
903
|
.returns(a.ref("AssignmentActionResult"))
|
|
889
904
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
890
|
-
.handler(
|
|
905
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
891
906
|
completeAssignment: a
|
|
892
907
|
.mutation()
|
|
893
908
|
.arguments({
|
|
@@ -898,7 +913,7 @@ const schema = a.schema({
|
|
|
898
913
|
})
|
|
899
914
|
.returns(a.ref("AssignmentActionResult"))
|
|
900
915
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
901
|
-
.handler(
|
|
916
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
902
917
|
cancelAssignment: a
|
|
903
918
|
.mutation()
|
|
904
919
|
.arguments({
|
|
@@ -909,7 +924,7 @@ const schema = a.schema({
|
|
|
909
924
|
})
|
|
910
925
|
.returns(a.ref("AssignmentActionResult"))
|
|
911
926
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
912
|
-
.handler(
|
|
927
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
913
928
|
reopenAssignment: a
|
|
914
929
|
.mutation()
|
|
915
930
|
.arguments({
|
|
@@ -920,7 +935,7 @@ const schema = a.schema({
|
|
|
920
935
|
})
|
|
921
936
|
.returns(a.ref("AssignmentActionResult"))
|
|
922
937
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
923
|
-
.handler(
|
|
938
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
924
939
|
retryImmediateAssignment: a
|
|
925
940
|
.mutation()
|
|
926
941
|
.arguments({
|
|
@@ -931,12 +946,12 @@ const schema = a.schema({
|
|
|
931
946
|
})
|
|
932
947
|
.returns(a.ref("AssignmentActionResult"))
|
|
933
948
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
934
|
-
.handler(
|
|
949
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
935
950
|
listNewsroomProcedureDefinitions: a
|
|
936
951
|
.query()
|
|
937
952
|
.returns(a.json())
|
|
938
953
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
939
|
-
.handler(
|
|
954
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
940
955
|
getNewsroomProcedureDefinition: a
|
|
941
956
|
.query()
|
|
942
957
|
.arguments({
|
|
@@ -945,7 +960,7 @@ const schema = a.schema({
|
|
|
945
960
|
})
|
|
946
961
|
.returns(a.json())
|
|
947
962
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
948
|
-
.handler(
|
|
963
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
949
964
|
saveNewsroomProcedureDefinition: a
|
|
950
965
|
.mutation()
|
|
951
966
|
.arguments({
|
|
@@ -953,7 +968,7 @@ const schema = a.schema({
|
|
|
953
968
|
})
|
|
954
969
|
.returns(a.json())
|
|
955
970
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
956
|
-
.handler(
|
|
971
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
957
972
|
saveNewsroomProcedureVersionDraft: a
|
|
958
973
|
.mutation()
|
|
959
974
|
.arguments({
|
|
@@ -961,7 +976,7 @@ const schema = a.schema({
|
|
|
961
976
|
})
|
|
962
977
|
.returns(a.json())
|
|
963
978
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
964
|
-
.handler(
|
|
979
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
965
980
|
publishNewsroomProcedureVersion: a
|
|
966
981
|
.mutation()
|
|
967
982
|
.arguments({
|
|
@@ -969,7 +984,7 @@ const schema = a.schema({
|
|
|
969
984
|
})
|
|
970
985
|
.returns(a.json())
|
|
971
986
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
972
|
-
.handler(
|
|
987
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
973
988
|
startNewsroomProcedureRun: a
|
|
974
989
|
.mutation()
|
|
975
990
|
.arguments({
|
|
@@ -983,7 +998,7 @@ const schema = a.schema({
|
|
|
983
998
|
})
|
|
984
999
|
.returns(a.json())
|
|
985
1000
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
986
|
-
.handler(
|
|
1001
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
987
1002
|
getNewsroomProcedureRun: a
|
|
988
1003
|
.query()
|
|
989
1004
|
.arguments({
|
|
@@ -991,7 +1006,7 @@ const schema = a.schema({
|
|
|
991
1006
|
})
|
|
992
1007
|
.returns(a.json())
|
|
993
1008
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
994
|
-
.handler(
|
|
1009
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
995
1010
|
listNewsroomProcedureRunsByProcedure: a
|
|
996
1011
|
.query()
|
|
997
1012
|
.arguments({
|
|
@@ -999,7 +1014,7 @@ const schema = a.schema({
|
|
|
999
1014
|
})
|
|
1000
1015
|
.returns(a.json())
|
|
1001
1016
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
1002
|
-
.handler(
|
|
1017
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
1003
1018
|
Assignment: a
|
|
1004
1019
|
.model({
|
|
1005
1020
|
id: a.id().required(),
|
|
@@ -1144,6 +1159,8 @@ const schema = a.schema({
|
|
|
1144
1159
|
error: a.json(),
|
|
1145
1160
|
attempt: a.integer(),
|
|
1146
1161
|
newsroomFeedKey: a.string(),
|
|
1162
|
+
usage: a.json(),
|
|
1163
|
+
costUsd: a.float(),
|
|
1147
1164
|
})
|
|
1148
1165
|
.secondaryIndexes((index) => [
|
|
1149
1166
|
index("procedureId").sortKeys(["requestedAt"]).queryField("listProcedureRunsByProcedureAndRequestedAt"),
|
|
@@ -1155,6 +1172,73 @@ const schema = a.schema({
|
|
|
1155
1172
|
allow.group("editor").to(["read"]),
|
|
1156
1173
|
allow.group(adminGroup).to(authoringOperations),
|
|
1157
1174
|
]),
|
|
1175
|
+
Automation: a
|
|
1176
|
+
.model({
|
|
1177
|
+
id: a.id().required(),
|
|
1178
|
+
title: a.string().required(),
|
|
1179
|
+
description: a.string(),
|
|
1180
|
+
enabled: a.boolean().required(),
|
|
1181
|
+
trigger: a.json().required(),
|
|
1182
|
+
procedureKey: a.string().required(),
|
|
1183
|
+
inputTemplate: a.json(),
|
|
1184
|
+
limits: a.json(),
|
|
1185
|
+
createdBy: a.string(),
|
|
1186
|
+
createdAt: a.datetime().required(),
|
|
1187
|
+
updatedBy: a.string(),
|
|
1188
|
+
updatedAt: a.datetime().required(),
|
|
1189
|
+
})
|
|
1190
|
+
.authorization((allow) => [
|
|
1191
|
+
allow.group("editor").to(["read", "create", "update"]),
|
|
1192
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1193
|
+
]),
|
|
1194
|
+
/** A human review point raised by a step on any item (PPY-ab6a50). Review is not a story state. */
|
|
1195
|
+
ReviewRequest: a
|
|
1196
|
+
.model({
|
|
1197
|
+
id: a.id().required(),
|
|
1198
|
+
subject: a.json().required(),
|
|
1199
|
+
mode: a.string().required(),
|
|
1200
|
+
reason: a.string().required(),
|
|
1201
|
+
ask: a.string(),
|
|
1202
|
+
raisedBy: a.string().required(),
|
|
1203
|
+
raisedAt: a.datetime().required(),
|
|
1204
|
+
deadline: a.datetime(),
|
|
1205
|
+
state: a.string().required(),
|
|
1206
|
+
answer: a.json(),
|
|
1207
|
+
links: a.json(),
|
|
1208
|
+
history: a.json(),
|
|
1209
|
+
appliedIn: a.json(),
|
|
1210
|
+
updatedAt: a.datetime().required(),
|
|
1211
|
+
})
|
|
1212
|
+
.authorization((allow) => [
|
|
1213
|
+
allow.group("editor").to(["read", "create", "update"]),
|
|
1214
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1215
|
+
]),
|
|
1216
|
+
/** One user's read mark on one review request; id is "<userKey>#<requestId>". */
|
|
1217
|
+
ReviewReadMark: a
|
|
1218
|
+
.model({
|
|
1219
|
+
id: a.id().required(),
|
|
1220
|
+
requestId: a.string().required(),
|
|
1221
|
+
userKey: a.string().required(),
|
|
1222
|
+
readAt: a.datetime().required(),
|
|
1223
|
+
})
|
|
1224
|
+
.authorization((allow) => [
|
|
1225
|
+
allow.groups(["editor", adminGroup]).to(["read", "create", "update"]),
|
|
1226
|
+
]),
|
|
1227
|
+
/** Who is told about review requests: scope default, mode or automation. Changed by data, not code. */
|
|
1228
|
+
ReviewRecipientRule: a
|
|
1229
|
+
.model({
|
|
1230
|
+
id: a.id().required(),
|
|
1231
|
+
scope: a.string().required(),
|
|
1232
|
+
key: a.string(),
|
|
1233
|
+
roles: a.string().array(),
|
|
1234
|
+
emails: a.string().array(),
|
|
1235
|
+
updatedBy: a.string(),
|
|
1236
|
+
updatedAt: a.datetime().required(),
|
|
1237
|
+
})
|
|
1238
|
+
.authorization((allow) => [
|
|
1239
|
+
allow.group("editor").to(["read"]),
|
|
1240
|
+
allow.group(adminGroup).to(authoringOperations),
|
|
1241
|
+
]),
|
|
1158
1242
|
NewsroomSection: a
|
|
1159
1243
|
.model({
|
|
1160
1244
|
id: a.id().required(),
|
|
@@ -2159,6 +2243,7 @@ const schema = a.schema({
|
|
|
2159
2243
|
allow.resource(modelAttachmentUpload),
|
|
2160
2244
|
allow.resource(newsroomSummary),
|
|
2161
2245
|
allow.resource(procedureAction),
|
|
2246
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2162
2247
|
allow.resource(sesInboundReceive),
|
|
2163
2248
|
allow.resource(emailSubmissionProcessor),
|
|
2164
2249
|
allow.resource(slackEvents),
|
|
@@ -2168,10 +2253,15 @@ const schema = a.schema({
|
|
|
2168
2253
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2169
2254
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2170
2255
|
*/
|
|
2171
|
-
export function defineSiteData(pluginDefinitions = {}) {
|
|
2256
|
+
export function defineSiteData(pluginDefinitions = {}, excludeModelGroups = []) {
|
|
2257
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2258
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2172
2259
|
return defineData({
|
|
2173
2260
|
name: "PapyrusCmsApi",
|
|
2174
|
-
|
|
2261
|
+
functions: sharedFunctions(),
|
|
2262
|
+
schema: excludeModelGroups.length > 0
|
|
2263
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2264
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2175
2265
|
authorizationModes: {
|
|
2176
2266
|
defaultAuthorizationMode: "userPool",
|
|
2177
2267
|
apiKeyAuthorizationMode: {
|