Skip to content

Commit

Permalink
pkp/pkp-lib#10412 Add API endpoints for emailLogEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
taslangraham authored Oct 2, 2024
2 parents 72995eb + 455fd18 commit 0a39ef9
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 2 deletions.
19 changes: 19 additions & 0 deletions api/v1/emails/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/**
* @defgroup api_v1_emails Email API requests
*/

/**
* @file api/v1/emails/index.php
*
* Copyright (c) 2023 Simon Fraser University
* Copyright (c) 2023 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @ingroup api_v1_emails
*
* @brief Handle requests for emails API functions.
*
*/
return new \PKP\handler\APIHandler(new \PKP\API\v1\emails\PKPEmailController());
105 changes: 104 additions & 1 deletion docs/dev/swagger-source.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"Vocabs",
"Temporary Files",
"Backend",
"ORCID"
"ORCID",
"Emails"
]
}
],
Expand Down Expand Up @@ -207,6 +208,10 @@
{
"name": "ORCID",
"description": "Endpoints for managing ORCID."
},
{
"name": "Emails",
"description": "Endpoints used to retrieve user emails."
}
],
"definitions": {
Expand Down Expand Up @@ -288,6 +293,7 @@
}
},
"EmailTemplate": "emailTemplate",
"Email": "emailLog",
"Galley": "galley",
"Institution": "institution",
"InvalidParametersResponse": {
Expand Down Expand Up @@ -4905,6 +4911,103 @@
}
}
},
"/emails/authorEmails": {
"get": {
"tags": [
"Emails"
],
"summary": "Gets an Author's email entry logs.",
"parameters": [
{
"name": "submissionId",
"description": "Filter results to emails associated with a specific submissionId.",
"in": "query",
"required": false,
"type": "integer"
},
{
"name": "eventType",
"description": "Filter results by an event type",
"in": "query",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"x-summary": "Success",
"description": "List of emails.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailSummary"
}
}
},
"403": {
"x-summary": "Request Unauthorized",
"description": "You do not have permission to view emails.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"x-summary": "Request Not Found",
"description": "No matching resource for a provided query param. Example: no submission found matching the provided `submissionId` query param.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"400": {
"x-summary": "Request Invalid",
"description": "Your request was not valid. One or more of the request query params are invalid. The error message will contain details about the invalid query param.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/emails/{emailId}": {
"get": {
"tags": [
"Emails"
],
"summary": "Get an email entry log by ID",
"parameters": [
{
"name": "emailId",
"description": "Email ID",
"in": "path",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"x-summary": "Success",
"description": "The email entry log details.",
"schema": {
"$ref": "#/definitions/EmailSummary"
}
},
"403": {
"x-summary": "Request Unauthorized",
"description": "You do not have permission to access this email.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"x-summary": "Request Not Found",
"description": "The email could not be found.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/institutions": {
"get": {
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 37 files
+31 −38 api/v1/announcements/PKPAnnouncementController.php
+187 −0 api/v1/emails/PKPEmailController.php
+1 −1 api/v1/reviews/PKPReviewController.php
+289 −210 classes/announcement/Announcement.php
+1 −3 classes/announcement/AnnouncementTypeDAO.php
+0 −242 classes/announcement/Collector.php
+20 −265 classes/announcement/Repository.php
+6 −3 classes/announcement/maps/Schema.php
+1 −0 classes/core/PKPApplication.php
+340 −0 classes/core/SettingsBuilder.php
+15 −2 classes/core/exceptions/StoreTemporaryFileException.php
+13 −0 classes/core/maps/Schema.php
+186 −0 classes/core/traits/ModelWithSettings.php
+34 −11 classes/log/EmailLogEntry.php
+30 −4 classes/log/Repository.php
+80 −0 classes/log/core/maps/Schema.php
+3 −3 classes/mail/mailables/AnnouncementNotify.php
+3 −2 classes/notification/PKPNotificationManager.php
+5 −5 classes/notification/managerDelegate/AnnouncementNotificationManager.php
+2 −2 classes/security/authorization/RoleBasedHandlerOperationPolicy.php
+3 −5 classes/services/PKPContextService.php
+62 −1 classes/services/PKPSchemaService.php
+3 −2 controllers/grid/notifications/NotificationsGridCellProvider.php
+1 −1 jobs/email/EditorialReminder.php
+4 −4 jobs/notifications/NewAnnouncementNotifyUsers.php
+3 −0 locale/en/api.po
+7 −8 pages/admin/AdminHandler.php
+13 −18 pages/announcement/AnnouncementHandler.php
+7 −14 pages/index/PKPIndexHandler.php
+4 −5 pages/management/ManagementHandler.php
+2 −5 pages/sitemap/PKPSitemapHandler.php
+12 −0 schemas/announcement.json
+79 −0 schemas/emailLog.json
+8 −8 templates/frontend/objects/announcement_full.tpl
+10 −10 templates/frontend/objects/announcement_summary.tpl
+3 −3 templates/frontend/objects/announcements_list.tpl
+2 −2 templates/frontend/pages/announcement.tpl

0 comments on commit 0a39ef9

Please sign in to comment.