ECHO-193 Report notification permissions and language fix#127
ECHO-193 Report notification permissions and language fix#127
Conversation
- Adjusted message IDs and context references in German, English, Spanish, French, and Dutch localization files to ensure accurate translations across various UI elements. - Enhanced existing translations for clarity and consistency, particularly in ProjectChatRoute and related components. - Updated references in localization files to reflect changes in the codebase, ensuring proper context management in conversation components.
- Introduced new GraphQL queries and mutations for managing project report notification participants, including create, read, update, and delete operations. - Updated permissions configuration to include actions for the new collection. - Enhanced OpenAPI specifications to document the new endpoints for project report notification participants. - Added necessary types and filters in GraphQL and OpenAPI to support the new functionality, improving user engagement and notification management for project reports.
WalkthroughThis change introduces a new collection, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant API
participant DB
User->>Frontend: Submit email to subscribe to report notifications
Frontend->>API: POST /items/project_report_notification_participants
API->>DB: Create participant entry (fields: email, project_id, email_opt_in)
DB-->>API: Entry created
API-->>Frontend: Success response
Frontend-->>User: Show confirmation (localized)
User->>Frontend: Request to unsubscribe
Frontend->>API: DELETE /items/project_report_notification_participants/{id}
API->>DB: Delete participant entry
DB-->>API: Entry deleted
API-->>Frontend: Success response
Frontend-->>User: Show unsubscribe confirmation (localized)
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (7)
echo/frontend/src/locales/fr-FR.ts (1)
1-1: LGTM – Optional: refine linting and parse approach
The file disables all ESLint rules at the top and uses a largeJSON.parsestring. Consider limiting the disable to specific lines or loading the messages as a static JSON import (typing it directly) to improve type safety and avoid runtime parsing overhead.echo/directus/sync/specs/system.graphql (3)
2080-2091: Define Project Report Notification Participants Type
The newproject_report_notification_participantstype cleanly models the subscription entity. For clarity in schema introspection, consider adding a brief"""…"""description above the type.
2982-2982: Allow Embeddings on Quote Creation
create_quote_inputnow accepts anembeddingstring. You may want to enforce a max length or validation rule to prevent oversized payloads or injection risks.
3735-3735: Filter Quotes by Embedding Field
Includingembeddinginquote_filterenables clients to query by vector data, but be mindful of performance—indexing or specialized search (e.g., PostgreSQL pgvector) may be needed for efficient queries.echo/directus/sync/specs/openapi.json (1)
22557-22560: Add descriptive metadata forembedding.The new
embeddingstring field inItemsQuoteis fine, but consider adding adescriptionto clarify its purpose (e.g., JSON vector embedding). Improves auto-generated docs. LGTM.echo/directus/sync/specs/item.graphql (2)
1953-1964: Defineproject_report_notification_participantstype
Core fields (date_submitted,date_updated,project(filter: project_filter): project) if consumers need to traverse from a participant to its parent project.
3158-3167: Add input and filter types for project_report_notification_participants
Thecreate_,update_, and filter input definitions cover all fields. If any fields (e.g.,Also applies to: 3763-3776, 4236-4245
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
echo/directus/sync/collections/permissions.json(1 hunks)echo/directus/sync/specs/item.graphql(22 hunks)echo/directus/sync/specs/openapi.json(64 hunks)echo/directus/sync/specs/system.graphql(10 hunks)echo/frontend/src/locales/de-DE.po(17 hunks)echo/frontend/src/locales/de-DE.ts(1 hunks)echo/frontend/src/locales/en-US.po(16 hunks)echo/frontend/src/locales/en-US.ts(1 hunks)echo/frontend/src/locales/es-ES.po(17 hunks)echo/frontend/src/locales/es-ES.ts(1 hunks)echo/frontend/src/locales/fr-FR.po(17 hunks)echo/frontend/src/locales/fr-FR.ts(1 hunks)echo/frontend/src/locales/nl-NL.po(15 hunks)echo/frontend/src/locales/nl-NL.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
echo/frontend/src/locales/en-US.ts (4)
echo/frontend/src/locales/fr-FR.ts (1)
messages(1-1)echo/frontend/src/locales/es-ES.ts (1)
messages(1-1)echo/frontend/src/locales/de-DE.ts (1)
messages(1-1)echo/frontend/src/locales/nl-NL.ts (1)
messages(1-1)
echo/frontend/src/locales/nl-NL.ts (1)
echo/frontend/src/locales/en-US.ts (1)
messages(1-1)
🔇 Additional comments (75)
echo/frontend/src/locales/de-DE.po (13)
52-56: LGTM – Added new source reference for the{0}placeholder.
The extra#: src/components/project/ProjectPortalEditor.tsx:232entry correctly maps the dynamic{0}string to its component.
127-130: LGTM – New reference for “Adding Context:”.
The updated line number inProjectChatRoute.tsx:428ensures the German translation stays in sync.
282-285: LGTM – Mapped “Basic (Essential tutorial slides)” to the correct source.
The added reference inProjectPortalEditor.tsx:339is accurate.
347-349: LGTM – Added source reference for “Citing the following sources”.
The new entry inSources.tsx:21keeps the translation metadata aligned.
528-531: LGTM – Added German translation for the “Dutch” language option.
“Niederländisch” is correct for theProjectPortalEditordropdown.
575-577: LGTM – Preserved the email placeholderemail@work.com.
No change to the string itself—just metadata alignment.
688-690: LGTM – New error message mapping for retranscription failure.
“Fehler beim Hertranskribieren des Gesprächs…” matches the English source.
692-695: LGTM – Added mapping for email verification error.
The German text correctly reflects “Failed to verify email status.”
1076-1079: LGTM – Fallback tutorial absence message added.
“No tutorial (only Privacy statements)” is now correctly mapped.
1273-1275: LGTM – Added status translation for “Processing Transcript”.
The German “Transkript wird verarbeitet” is spot on.
1644-1647: LGTM – Mapped the “Spanish” language option.
“Spanisch” is the correct German label.
2059-2062: LGTM – Confirmation message for successful unsubscribe added.
“Sie haben sich erfolgreich abgemeldet.” fits perfectly.
2063-2066: LGTM – Prompt for recording another conversation added.
The German string is accurate and clear.echo/frontend/src/locales/es-ES.po (11)
52-56: LGTM – Added new source reference for the{0}placeholder.
The extra#: src/components/project/ProjectPortalEditor.tsx:232entry keeps the Spanish metadata in sync.
127-130: LGTM – New reference for “Adding Context:”.
The updatedProjectChatRoute.tsx:428mapping is correct.
286-289: LGTM – Mapped “Basic (Essential tutorial slides)” entry.
The Spanish “Básico (Diapositivas esenciales del tutorial)” is correctly referenced.
351-354: LGTM – Added source reference for “Citar las siguientes fuentes”.
Aligns the translation with theSources.tsx:21component.
532-535: LGTM – Added Spanish translation for the “Dutch” language option.
“Holandés” is accurate for the dropdown.
579-582: LGTM – Preserved the placeholder emailemail@work.com.
The Spanish translation keeps the literal email intact.
692-694: LGTM – New error message mapping for retranscription failure.
“Error al retranscribir la conversación…” matches the source.
696-700: LGTM – Added mapping for email verification error.
The Spanish text is correct for “Failed to verify email status.”
1348-1351: LGTM – Added “Refresh” translation entry.
“Actualizar” fits the UI context.
2060-2062: LGTM – Confirmation for successful unsubscribe added.
“Has desuscribido con éxito.” is correct.
2064-2066: LGTM – Prompt for recording another conversation added.
“También puedes elegir registrar otra conversación.” is spot on.echo/frontend/src/locales/fr-FR.po (5)
127-129: Source reference update looks solidClean reference update for translations to match the new line numbers in the codebase. Standard source mapping maintenance.
351-352: Placeholder email translation is properly repositionedTranslation key repositioning with updated source refs. Nice work keeping the translation metadata in sync.
669-674: File reference update correctly implementedProper reference updates for "Experimental" translation key. This maintains the localization system's integrity.
692-694: Solid reference updates for system messagesUpdated references for retranscription and email verification status messages - aligned with code structure changes. These are critical system notifications for the user experience.
Also applies to: 696-700, 1461-1463
2060-2063: New unsubscribe message translation added correctlyThe addition of "You have successfully unsubscribed" translation aligns perfectly with the PR objective of adding report notification permissions. This message is essential for notification subscription flow completion.
echo/frontend/src/locales/es-ES.ts (1)
1-1: Spanish translations properly implemented for notification systemThe Spanish localization file has been comprehensively updated with all necessary translations for the notification system. Key translations like "Desuscribirse de Notificaciones", "E-mails añadidos", and subscription status messages are properly included. The minified format is appropriate for production.
The translations in this file perfectly complement the backend changes for project report notification participants mentioned in the PR objectives. All user-facing notification management flows now have complete Spanish language support.
echo/frontend/src/locales/en-US.po (5)
53-53: LGTM – Synced placeholder reference
You’ve added the new source reference for the{0}placeholder inProjectPortalEditor.tsx. This ensures the translation key is tracked for the new component.
132-134: LGTM – Added “Adding Context:” entry
Introduced the new translation key for “Adding Context:” at the correct code location. Everything looks in order.
303-305: LGTM – Added basic tutorial slides key
The “Basic (Essential tutorial slides)” message has been included with its source reference. Good to have this new UI string localized.
557-559: LGTM – Added language option “Dutch”
The new “Dutch” entry is properly inserted with the correct reference. Translation metadata stays consistent.
605-606: LGTM – Added placeholder email
New placeholder entry for"email@work.com"has been added to support the email subscription UI.echo/directus/sync/collections/permissions.json (1)
94-135: LGTM! Solid permission structure for notification participants collection.The new permissions for
project_report_notification_participantsare well-crafted and follow the established patterns in the codebase. The public sync policy with appropriate field-level permissions enables the notification subscription flow while maintaining proper security boundaries. Create/read/delete operations cover the full lifecycle for notification subscriptions.echo/frontend/src/locales/nl-NL.ts (6)
1-1: LGTM! Dutch translation file looks comprehensive and properly structured.The localization file follows best practices with appropriate key-value mapping structure, and includes all necessary translations for the report notification system. The translation quality is high with natural Dutch phrasing that maintains proper context.
132-132: Keys like "G3dSLc" suggest a strong i18n architecture.Translation for "Berichtsbenachrichtigingen inschakelen" (Enable report notifications) aligns perfectly with the new notification permissions functionality. The key-based approach prevents string duplication issues and ensures consistent translations throughout the app.
133-133: Translation for notification feature description is well-articulated.The Dutch copy for explaining the notification feature is clear and maintains the same meaning as other language versions while using natural Dutch sentence structure.
417-417: Notification report key "hIQOLx" translation is spot on."Rapportmeldingen" is correctly translated to represent "Report Notifications" in Dutch, maintaining consistency with the feature terminology across the app.
486-486: Email removal functionality properly translated."E-mail verwijderen" accurately represents the "Remove Email" functionality needed for the notification subscription management workflow.
539-539: Unsubscribe translation matches the feature purpose."Afmelden" is the proper Dutch term for "Unsubscribe", maintaining semantic equivalence across languages for this critical notification feature.
echo/frontend/src/locales/de-DE.ts (1)
1-1: This localization update is 🚀 - adding new notification feature strings!The German localization file has been updated with all the necessary strings for the new report notification features. The key translations like "Von Benachrichtigungen abmelden" (Unsubscribe from notifications) and "Berichtsbenachrichtigungen" (Report notifications) are all properly included.
echo/frontend/src/locales/nl-NL.po (2)
692-694: Nice work adding the Dutch email placeholder translation!Good call adding the work email placeholder translation from "email@work.com" to "email@werk.com" in Dutch. This maintains consistency across the localization ecosystem.
817-820: Email verification status message implementation looks great!The Dutch translation for "Failed to verify email status. Please try again." is correctly implemented. This is crucial for the notification subscription flow.
echo/frontend/src/locales/en-US.ts (1)
1-1: LGTM! Comprehensive notification strings implementation.This file now includes all the necessary English strings for the new report notification features, including:
- "Unsubscribe from Notifications"
- "Added emails"
- "Confirm Publishing"
- "An email Notification will be sent..."
- "This email is already in the list."
- "This email is already subscribed to notifications."
- "Thank you! We'll notify you when the report is ready."
These strings align perfectly with the new collection
project_report_notification_participantsand support the notification subscription flow.echo/directus/sync/specs/system.graphql (7)
266-267: New Subscription Events for Project Report Notifications
LGTM! Theproject_report_notification_participants_mutatedentry is correctly added and positioned beforeaspect_mutated. Ensure the server-side resolvers publish this event in sync with your Directus hooks.
2927-2927: Align Create Input with Project Type
You’ve addedis_project_notification_subscription_allowedtocreate_project_input. Verify that the mutation resolver and database layer initialize this field (default tofalseif omitted) to prevent unexpected nulls.
4324-4324: Support Notification Subscription in Update Input
update_project_inputnow acceptsis_project_notification_subscription_allowed. Confirm that partial updates respect this field and don’t reset it inadvertently when omitted in the payload.
3656-3656: Enable Filtering by Notification Subscription
Great addition toproject_filter—includingis_project_notification_subscription_allowedlets clients query projects by subscription preference. Ensure your GraphQL engine maps this filter to the underlying Boolean column.
2093-2097: Add Mutation Event Type for Project Report Notifications
Theproject_report_notification_participants_mutatedtype aligns with existing mutation events. Good to go!
2122-2122: Expose Embedding Field on Quote
Addingembedding: Stringto thequotetype is spot-on for returning vector data. Double-check that resolvers populate this field (e.g., after embedding generation) and that clients handle it correctly.
4378-4378: Support Embedding Updates
update_quote_inputcan now update theembedding. Verify that omitting this field in a patch doesn’t nullify existing embeddings and that your update logic respects partial inputs.echo/directus/sync/specs/openapi.json (11)
8307-8618: Consistent schema references forItemsAspect.All request bodies and responses now uniformly reference
#/components/schemas/ItemsAspect. This consistency ensures the OpenAPI spec stays DRY and accurate across create, read (list & single), update (bulk & single), and delete operations. LGTM.
8343-8352: ApproveItemsAspectoperation descriptions.The summaries, descriptions,
tags, andoperationIds for List (readItemsAspect), Update Multiple, Delete Multiple, Retrieve Single, Update Single, and Delete Single operations are clear and conform to naming conventions. LGTM.Also applies to: 8407-8414, 8476-8485, 8496-8502, 8560-8567, 8631-8638
8675-9025: ReviewItemsAccountendpoints.
- CRUD operation descriptions (
Create,List,Update Multiple,Delete Multiple,Retrieve Single,Update Single,Delete Single) are accurate and follow the established pattern.- Ensure that the
TagsandoperationIds align with other collections.
LGTM.
8694-9005: Consistent schema references forItemsAccount.All bulk and single create/update responses correctly reference
#/components/schemas/ItemsAccount. This consistency avoids mismatch between API and schema definitions. LGTM.
9059-9412: ReviewItemsAccountDirectusUsersendpoints.Operation summaries, descriptions,
tags, andoperationIds for all CRUD paths are consistent and descriptive. These changes properly integrate the new collection into the API spec. LGTM.
9081-9392: Consistent schema references forItemsAccountDirectusUsers.All relevant request/response bodies uniformly reference
#/components/schemas/ItemsAccountDirectusUsers. This keeps the spec aligned and reduces potential errors. LGTM.
9449-9799: ReviewItemsViewendpoints.Create, List, Update Multiple, Delete Multiple, Retrieve Single, Update Single, and Delete Single operations all have clear summaries/descriptions and correct
tags/operationIds. Consistency with other collections is spot on. LGTM.
9468-9779: Consistent schema references forItemsView.All endpoints for
ItemsViewnow correctly reference#/components/schemas/ItemsViewin their request and response bodies. This uniformity is excellent. LGTM.
18865-18873: Include new collection in components list.The
ItemsProjectReportNotificationParticipantsentry is added alongside existing collections. Confirm collection order and that no duplicates exist. LGTM.
20924-21052: Validate schema definitions for new and existing collections.
ItemsProjectReportNotificationParticipants: fields (email_opt_in,email_opt_out_token,project_id,sort) and requiredidare correctly defined.ItemsAspect: reintroduced schema matches expectations, includingoneOfreferences forview_idand nested quote types.
LGTM.
21284-21287: Approve new boolean field onItemsAccount.The
is_project_notification_subscription_allowedboolean is added correctly withnullable: true. Ensure front-end and GraphQL layers support this field. LGTM.echo/directus/sync/specs/item.graphql (11)
6-9: Add new Query entries for project_report_notification_participants
The Query type now supports listing (project_report_notification_participants), lookup by ID, aggregation, and versioned queries for the new collection—consistent with existing patterns. LGTM.
123-124: Add create mutations for project_report_notification_participants
Thecreate_project_report_notification_participants_itemsandcreate_project_report_notification_participants_itemmutations follow the established naming and parameter conventions.
125-126: Streamline Aspect CRUD & Subscription declarations
The create, update, delete, and subscription entries foraspectare now declared cleanly—duplicates were removed and naming aligns with other collections. LGTM.Also applies to: 185-187, 270-271, 350-350
182-184: Add update mutations for project_report_notification_participants
The batch and single-item update mutations forproject_report_notification_participants(items,batch,item) follow the existing schema conventions.
268-269: Add delete mutations for project_report_notification_participants
Thedelete_project_report_notification_participants_itemsanddelete_project_report_notification_participants_itemmutations are correctly named and parameterized for bulk and single-item deletion.
349-349: Add Subscription event for project_report_notification_participants
Theproject_report_notification_participants_mutatedsubscription event enables real-time updates on this collection.
1966-1977: Add aggregation types for project_report_notification_participants
Theaggregated,aggregated_count, andaggregated_fieldstypes mirror other collections, supporting grouping, counts, and numeric field aggregation (sort).Also applies to: 1979-1988, 1990-1992
1994-1998: Add mutated payload type for project_report_notification_participants
Theproject_report_notification_participants_mutatedtype wraps event data consistently with other mutated payloads.
2495-2504: Define versioned type for project_report_notification_participants
The version snapshot type includes all scalar fields (id,project_id, dates, flags) following the versioning pattern.
1520-1520: Introduceis_project_notification_subscription_allowedacross schema
The new boolean flag is added toproject, its aggregated count,create_project_input,project_filter, andupdate_project_input. Consistent implementation—LGTM.Also applies to: 1565-1565, 3125-3125, 3714-3714, 4203-4203
2050-2050: Addembeddingsupport forquote
Theembeddingfield is now available on thequotetype, its aggregated count, versioned snapshot, create/update inputs, and filter. Ensure the database schema and resolvers are updated to store, retrieve, and filter on this new field.Also applies to: 2084-2084, 2521-2521, 3200-3200, 3821-3821, 4278-4278
| image_generation_model: String | ||
| is_conversation_allowed: Boolean! | ||
| is_get_reply_enabled: Boolean | ||
| is_project_notification_subscription_allowed: Boolean |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider Non-Nullable Notification Subscription Field
The project.is_project_notification_subscription_allowed is defined as Boolean, but similar flags (e.g., is_conversation_allowed) use Boolean!. To avoid null checks downstream, consider making this field non-nullable (Boolean!) with a default of false.
| "/items/project_report_notification_participants": { | ||
| "post": { | ||
| "summary": "Create an Item", | ||
| "description": "Create a new project_report_notification_participants item.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "createItemsProjectReportNotificationParticipants", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Meta" | ||
| } | ||
| ], | ||
| "requestBody": { | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| }, | ||
| { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "items": { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| } | ||
| } | ||
| }, | ||
| "get": { | ||
| "summary": "List Items", | ||
| "description": "List the project_report_notification_participants items.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "readItemsProjectReportNotificationParticipants", | ||
| "security": [ | ||
| { | ||
| "Auth": [] | ||
| } | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Fields" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Limit" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Meta" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Offset" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Sort" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Filter" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Search" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| }, | ||
| "meta": { | ||
| "$ref": "#/components/schemas/x-metadata" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| } | ||
| } | ||
| }, | ||
| "patch": { | ||
| "summary": "Update Multiple Items", | ||
| "description": "Update multiple project_report_notification_participants items at the same time.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "updateItemsProjectReportNotificationParticipants", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Fields" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Limit" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Meta" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Offset" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Sort" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Filter" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Search" | ||
| } | ||
| ], | ||
| "requestBody": { | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| }, | ||
| { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "properties": { | ||
| "data": { | ||
| "items": { | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "summary": "Delete Multiple Items", | ||
| "description": "Delete multiple existing project_report_notification_participants items.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "deleteItemsProjectReportNotificationParticipants", | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request" | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| } | ||
| }, | ||
| "parameters": [] | ||
| } | ||
| }, | ||
| "/items/project_report_notification_participants/{id}": { | ||
| "get": { | ||
| "summary": "Retrieve an Item", | ||
| "description": "Retrieve a single project_report_notification_participants item by unique identifier.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "readSingleItemsProjectReportNotificationParticipants", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Fields" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Meta" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Version" | ||
| }, | ||
| { | ||
| "name": "id", | ||
| "description": "Index of the item.", | ||
| "in": "path", | ||
| "required": true, | ||
| "schema": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "integer", | ||
| "description": "Incremental index of the item.", | ||
| "example": 1 | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "description": "Unique identifier of the item.", | ||
| "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "type": "object", | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| }, | ||
| "404": { | ||
| "$ref": "#/components/responses/NotFoundError" | ||
| } | ||
| } | ||
| }, | ||
| "patch": { | ||
| "summary": "Update an Item", | ||
| "description": "Update an existing project_report_notification_participants item.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "updateSingleItemsProjectReportNotificationParticipants", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Fields" | ||
| }, | ||
| { | ||
| "$ref": "#/components/parameters/Meta" | ||
| }, | ||
| { | ||
| "name": "id", | ||
| "description": "Index of the item.", | ||
| "in": "path", | ||
| "required": true, | ||
| "schema": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "integer", | ||
| "description": "Incremental index of the item.", | ||
| "example": 1 | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "description": "Unique identifier of the item.", | ||
| "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "requestBody": { | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "data": { | ||
| "type": "object", | ||
| "$ref": "#/components/schemas/ItemsProjectReportNotificationParticipants" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| }, | ||
| "404": { | ||
| "$ref": "#/components/responses/NotFoundError" | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "summary": "Delete an Item", | ||
| "description": "Delete an existing project_report_notification_participants item.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsProjectReportNotificationParticipants" | ||
| ], | ||
| "operationId": "deleteSingleItemsProjectReportNotificationParticipants", | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successful request" | ||
| }, | ||
| "401": { | ||
| "$ref": "#/components/responses/UnauthorizedError" | ||
| }, | ||
| "404": { | ||
| "$ref": "#/components/responses/NotFoundError" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "name": "id", | ||
| "description": "Index of the item.", | ||
| "in": "path", | ||
| "required": true, | ||
| "schema": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "integer", | ||
| "description": "Incremental index of the item.", | ||
| "example": 1 | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "description": "Unique identifier of the item.", | ||
| "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "/items/aspect": { | ||
| "post": { | ||
| "summary": "Create an Item", | ||
| "description": "Create a new account item.", | ||
| "description": "Create a new aspect item.", | ||
| "tags": [ | ||
| "Items", | ||
| "ItemsAccount" | ||
| "ItemsAspect" | ||
| ], | ||
| "operationId": "createItemsAccount", | ||
| "operationId": "createItemsAspect", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/components/parameters/Meta" |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Missing security requirements on new endpoints.
The project_report_notification_participants CRUD operations (post, single-get, patch, delete) lack explicit "security": [ { "Auth": [] } ] blocks. Without these, unauthenticated clients may create, read, update, or delete participants. Please add authentication requirements to each operation (or verify global security settings apply). LGTM otherwise.
Let’s verify if a global security block exists in the root of the OpenAPI spec:
🏁 Script executed:
#!/bin/bash
# Search for global security definitions in the OpenAPI file
rg -n '"security":' echo/directus/sync/specs/openapi.json | head -n 200
Length of output: 1040
Time to confirm global auth policy up top—rockets don’t launch without checking the launch codes. Let’s peek at the first 50 lines for a "security" block:
🏁 Script executed:
#!/bin/bash
# Check for global security requirement in the OpenAPI spec
head -n 50 echo/directus/sync/specs/openapi.json | rg -n '"security":'
Length of output: 72
Confirming global security presence in the spec’s header:
🏁 Script executed:
#!/bin/bash
# Check for global security block in the first 200 lines
head -n 200 echo/directus/sync/specs/openapi.json | rg -n '"security":'
Length of output: 73
Enforce Auth on project_report_notification_participants CRUD endpoints
There’s no global security block in the spec header, so any operation without its own security is public. Please add:
• echo/directus/sync/specs/openapi.json
– /items/project_report_notification_participants:
• post
• patch
• delete
– /items/project_report_notification_participants/{id}:
• get
• patch
• delete
…each with:
security:
- Auth: []
LGTM otherwise—lock it down!
|
additional requirements need to be fulfilled |
Summary by CodeRabbit
New Features
Localization