@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.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,37 +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)),
|
|
594
|
+
intakePendingReferences: a
|
|
595
|
+
.mutation()
|
|
596
|
+
.arguments({ input: a.json().required() })
|
|
597
|
+
.returns(a.json())
|
|
598
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
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)),
|
|
592
606
|
saveItemDraft: a
|
|
593
607
|
.mutation()
|
|
594
608
|
.arguments({ input: a.json().required() })
|
|
595
609
|
.returns(a.json())
|
|
596
610
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
597
|
-
.handler(
|
|
611
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
598
612
|
publishItem: a
|
|
599
613
|
.mutation()
|
|
600
614
|
.arguments({ input: a.json().required() })
|
|
601
615
|
.returns(a.json())
|
|
602
616
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
603
|
-
.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)),
|
|
604
624
|
unpublishItem: a
|
|
605
625
|
.mutation()
|
|
606
626
|
.arguments({ input: a.json().required() })
|
|
607
627
|
.returns(a.json())
|
|
608
628
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
609
|
-
.handler(
|
|
629
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
610
630
|
requestStagingBuild: a
|
|
611
631
|
.mutation()
|
|
612
632
|
.arguments({ input: a.json().required() })
|
|
613
633
|
.returns(a.json())
|
|
614
634
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
615
|
-
.handler(
|
|
635
|
+
.handler(functionHandler("contentActions", contentActions)),
|
|
616
636
|
knowledgeQuery: a
|
|
617
637
|
.query()
|
|
618
638
|
.arguments({
|
|
@@ -620,7 +640,7 @@ const schema = a.schema({
|
|
|
620
640
|
})
|
|
621
641
|
.returns(a.json())
|
|
622
642
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
623
|
-
.handler(
|
|
643
|
+
.handler(functionHandler("knowledgeQuery", knowledgeQuery)),
|
|
624
644
|
updateNewsroomSummary: a
|
|
625
645
|
.mutation()
|
|
626
646
|
.arguments({
|
|
@@ -630,7 +650,7 @@ const schema = a.schema({
|
|
|
630
650
|
})
|
|
631
651
|
.returns(a.ref("NewsroomSummary"))
|
|
632
652
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
633
|
-
.handler(
|
|
653
|
+
.handler(functionHandler("newsroomSummary", newsroomSummary)),
|
|
634
654
|
ModelAttachmentUploadSlot: a.customType({
|
|
635
655
|
ok: a.boolean().required(),
|
|
636
656
|
uploadId: a.string().required(),
|
|
@@ -686,7 +706,7 @@ const schema = a.schema({
|
|
|
686
706
|
})
|
|
687
707
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
688
708
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
689
|
-
.handler(
|
|
709
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
690
710
|
completeModelAttachmentUpload: a
|
|
691
711
|
.mutation()
|
|
692
712
|
.arguments({
|
|
@@ -707,7 +727,7 @@ const schema = a.schema({
|
|
|
707
727
|
})
|
|
708
728
|
.returns(a.ref("ModelAttachment"))
|
|
709
729
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
710
|
-
.handler(
|
|
730
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
711
731
|
abortModelAttachmentUpload: a
|
|
712
732
|
.mutation()
|
|
713
733
|
.arguments({
|
|
@@ -728,7 +748,7 @@ const schema = a.schema({
|
|
|
728
748
|
})
|
|
729
749
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
730
750
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
731
|
-
.handler(
|
|
751
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
732
752
|
createModelAttachmentDownload: a
|
|
733
753
|
.mutation()
|
|
734
754
|
.arguments({
|
|
@@ -736,7 +756,7 @@ const schema = a.schema({
|
|
|
736
756
|
})
|
|
737
757
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
738
758
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
739
|
-
.handler(
|
|
759
|
+
.handler(functionHandler("modelAttachmentUpload", modelAttachmentUpload)),
|
|
740
760
|
AssignmentActionResult: a.customType({
|
|
741
761
|
ok: a.boolean().required(),
|
|
742
762
|
assignmentId: a.id(),
|
|
@@ -824,7 +844,7 @@ const schema = a.schema({
|
|
|
824
844
|
})
|
|
825
845
|
.returns(a.ref("AssignmentContext").array().required())
|
|
826
846
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
827
|
-
.handler(
|
|
847
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
828
848
|
listAssignmentQueue: a
|
|
829
849
|
.query()
|
|
830
850
|
.arguments({
|
|
@@ -834,7 +854,7 @@ const schema = a.schema({
|
|
|
834
854
|
})
|
|
835
855
|
.returns(a.ref("AssignmentContext").array().required())
|
|
836
856
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
837
|
-
.handler(
|
|
857
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
838
858
|
getEditorialContext: a
|
|
839
859
|
.query()
|
|
840
860
|
.arguments({
|
|
@@ -843,10 +863,11 @@ const schema = a.schema({
|
|
|
843
863
|
storyLineageId: a.id(),
|
|
844
864
|
assignmentId: a.id(),
|
|
845
865
|
maxCharacters: a.integer(),
|
|
866
|
+
optionalPublicationDoctrine: a.boolean(),
|
|
846
867
|
})
|
|
847
868
|
.returns(a.json().required())
|
|
848
869
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
849
|
-
.handler(
|
|
870
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
850
871
|
getAssignmentContext: a
|
|
851
872
|
.query()
|
|
852
873
|
.arguments({
|
|
@@ -854,7 +875,7 @@ const schema = a.schema({
|
|
|
854
875
|
})
|
|
855
876
|
.returns(a.ref("AssignmentContext"))
|
|
856
877
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
857
|
-
.handler(
|
|
878
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
858
879
|
claimAssignment: a
|
|
859
880
|
.mutation()
|
|
860
881
|
.arguments({
|
|
@@ -870,7 +891,7 @@ const schema = a.schema({
|
|
|
870
891
|
})
|
|
871
892
|
.returns(a.ref("AssignmentActionResult"))
|
|
872
893
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
873
|
-
.handler(
|
|
894
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
874
895
|
releaseAssignment: a
|
|
875
896
|
.mutation()
|
|
876
897
|
.arguments({
|
|
@@ -881,7 +902,7 @@ const schema = a.schema({
|
|
|
881
902
|
})
|
|
882
903
|
.returns(a.ref("AssignmentActionResult"))
|
|
883
904
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
884
|
-
.handler(
|
|
905
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
885
906
|
completeAssignment: a
|
|
886
907
|
.mutation()
|
|
887
908
|
.arguments({
|
|
@@ -892,7 +913,7 @@ const schema = a.schema({
|
|
|
892
913
|
})
|
|
893
914
|
.returns(a.ref("AssignmentActionResult"))
|
|
894
915
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
895
|
-
.handler(
|
|
916
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
896
917
|
cancelAssignment: a
|
|
897
918
|
.mutation()
|
|
898
919
|
.arguments({
|
|
@@ -903,7 +924,7 @@ const schema = a.schema({
|
|
|
903
924
|
})
|
|
904
925
|
.returns(a.ref("AssignmentActionResult"))
|
|
905
926
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
906
|
-
.handler(
|
|
927
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
907
928
|
reopenAssignment: a
|
|
908
929
|
.mutation()
|
|
909
930
|
.arguments({
|
|
@@ -914,7 +935,7 @@ const schema = a.schema({
|
|
|
914
935
|
})
|
|
915
936
|
.returns(a.ref("AssignmentActionResult"))
|
|
916
937
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
917
|
-
.handler(
|
|
938
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
918
939
|
retryImmediateAssignment: a
|
|
919
940
|
.mutation()
|
|
920
941
|
.arguments({
|
|
@@ -925,12 +946,12 @@ const schema = a.schema({
|
|
|
925
946
|
})
|
|
926
947
|
.returns(a.ref("AssignmentActionResult"))
|
|
927
948
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
928
|
-
.handler(
|
|
949
|
+
.handler(functionHandler("assignmentAction", assignmentAction)),
|
|
929
950
|
listNewsroomProcedureDefinitions: a
|
|
930
951
|
.query()
|
|
931
952
|
.returns(a.json())
|
|
932
953
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
933
|
-
.handler(
|
|
954
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
934
955
|
getNewsroomProcedureDefinition: a
|
|
935
956
|
.query()
|
|
936
957
|
.arguments({
|
|
@@ -939,7 +960,7 @@ const schema = a.schema({
|
|
|
939
960
|
})
|
|
940
961
|
.returns(a.json())
|
|
941
962
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
942
|
-
.handler(
|
|
963
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
943
964
|
saveNewsroomProcedureDefinition: a
|
|
944
965
|
.mutation()
|
|
945
966
|
.arguments({
|
|
@@ -947,7 +968,7 @@ const schema = a.schema({
|
|
|
947
968
|
})
|
|
948
969
|
.returns(a.json())
|
|
949
970
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
950
|
-
.handler(
|
|
971
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
951
972
|
saveNewsroomProcedureVersionDraft: a
|
|
952
973
|
.mutation()
|
|
953
974
|
.arguments({
|
|
@@ -955,7 +976,7 @@ const schema = a.schema({
|
|
|
955
976
|
})
|
|
956
977
|
.returns(a.json())
|
|
957
978
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
958
|
-
.handler(
|
|
979
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
959
980
|
publishNewsroomProcedureVersion: a
|
|
960
981
|
.mutation()
|
|
961
982
|
.arguments({
|
|
@@ -963,7 +984,7 @@ const schema = a.schema({
|
|
|
963
984
|
})
|
|
964
985
|
.returns(a.json())
|
|
965
986
|
.authorization((allow) => [allow.group(adminGroup)])
|
|
966
|
-
.handler(
|
|
987
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
967
988
|
startNewsroomProcedureRun: a
|
|
968
989
|
.mutation()
|
|
969
990
|
.arguments({
|
|
@@ -977,7 +998,7 @@ const schema = a.schema({
|
|
|
977
998
|
})
|
|
978
999
|
.returns(a.json())
|
|
979
1000
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
980
|
-
.handler(
|
|
1001
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
981
1002
|
getNewsroomProcedureRun: a
|
|
982
1003
|
.query()
|
|
983
1004
|
.arguments({
|
|
@@ -985,7 +1006,7 @@ const schema = a.schema({
|
|
|
985
1006
|
})
|
|
986
1007
|
.returns(a.json())
|
|
987
1008
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
988
|
-
.handler(
|
|
1009
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
989
1010
|
listNewsroomProcedureRunsByProcedure: a
|
|
990
1011
|
.query()
|
|
991
1012
|
.arguments({
|
|
@@ -993,7 +1014,7 @@ const schema = a.schema({
|
|
|
993
1014
|
})
|
|
994
1015
|
.returns(a.json())
|
|
995
1016
|
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
996
|
-
.handler(
|
|
1017
|
+
.handler(functionHandler("procedureAction", procedureAction)),
|
|
997
1018
|
Assignment: a
|
|
998
1019
|
.model({
|
|
999
1020
|
id: a.id().required(),
|
|
@@ -1138,6 +1159,8 @@ const schema = a.schema({
|
|
|
1138
1159
|
error: a.json(),
|
|
1139
1160
|
attempt: a.integer(),
|
|
1140
1161
|
newsroomFeedKey: a.string(),
|
|
1162
|
+
usage: a.json(),
|
|
1163
|
+
costUsd: a.float(),
|
|
1141
1164
|
})
|
|
1142
1165
|
.secondaryIndexes((index) => [
|
|
1143
1166
|
index("procedureId").sortKeys(["requestedAt"]).queryField("listProcedureRunsByProcedureAndRequestedAt"),
|
|
@@ -1149,6 +1172,73 @@ const schema = a.schema({
|
|
|
1149
1172
|
allow.group("editor").to(["read"]),
|
|
1150
1173
|
allow.group(adminGroup).to(authoringOperations),
|
|
1151
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
|
+
]),
|
|
1152
1242
|
NewsroomSection: a
|
|
1153
1243
|
.model({
|
|
1154
1244
|
id: a.id().required(),
|
|
@@ -2146,12 +2236,14 @@ const schema = a.schema({
|
|
|
2146
2236
|
allow.groups(contentWriteGroups),
|
|
2147
2237
|
]),
|
|
2148
2238
|
}).authorization((allow) => [
|
|
2239
|
+
allow.resource(assignmentAction).to(["query", "mutate"]),
|
|
2149
2240
|
allow.resource(categoryAction),
|
|
2150
2241
|
allow.resource(contentActions),
|
|
2151
2242
|
allow.resource(manageUserRole),
|
|
2152
2243
|
allow.resource(modelAttachmentUpload),
|
|
2153
2244
|
allow.resource(newsroomSummary),
|
|
2154
2245
|
allow.resource(procedureAction),
|
|
2246
|
+
allow.resource(publicForms).to(["mutate"]),
|
|
2155
2247
|
allow.resource(sesInboundReceive),
|
|
2156
2248
|
allow.resource(emailSubmissionProcessor),
|
|
2157
2249
|
allow.resource(slackEvents),
|
|
@@ -2161,10 +2253,15 @@ const schema = a.schema({
|
|
|
2161
2253
|
* The site's data API. Amplify allows one `defineData` per backend and registers it when called, so this is
|
|
2162
2254
|
* a function: a site without plugins passes none and gets exactly the base schema.
|
|
2163
2255
|
*/
|
|
2164
|
-
export function defineSiteData(pluginDefinitions = {}) {
|
|
2256
|
+
export function defineSiteData(pluginDefinitions = {}, excludeModelGroups = []) {
|
|
2257
|
+
assertKnownModelGroups(excludeModelGroups);
|
|
2258
|
+
const hasPlugins = Object.keys(pluginDefinitions).length > 0;
|
|
2165
2259
|
return defineData({
|
|
2166
2260
|
name: "PapyrusCmsApi",
|
|
2167
|
-
|
|
2261
|
+
functions: sharedFunctions(),
|
|
2262
|
+
schema: excludeModelGroups.length > 0
|
|
2263
|
+
? schemaExcludingGroups(excludeModelGroups, pluginDefinitions)
|
|
2264
|
+
: hasPlugins ? schemaWithPlugins(pluginDefinitions) : leanSchema,
|
|
2168
2265
|
authorizationModes: {
|
|
2169
2266
|
defaultAuthorizationMode: "userPool",
|
|
2170
2267
|
apiKeyAuthorizationMode: {
|