Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for webhook event log APIs #83

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/main/api/retrieveWebhookAttemptLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"uri": "/api/system/webhook-attempt-log",
"comments": [
"Retrieves a single webhook attempt log for the given Id."
],
"method": "get",
"methodName": "retrieveWebhookAttemptLog",
"successResponse": "WebhookAttemptLogResponse",
"errorResponse": "Errors",
"params": [
{
"name": "webhookAttemptLogId",
"comments": [
"The Id of the webhook attempt log to retrieve."
],
"type": "urlSegment",
"javaType": "UUID"
}
]
}
20 changes: 20 additions & 0 deletions src/main/api/retrieveWebhookEventLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"uri": "/api/system/webhook-event-log",
"comments": [
"Retrieves a single webhook event log for the given Id."
],
"method": "get",
"methodName": "retrieveWebhookEventLog",
"successResponse": "WebhookEventLogResponse",
"errorResponse": "Errors",
"params": [
{
"name": "webhookEventLogId",
"comments": [
"The Id of the webhook event log to retrieve."
],
"type": "urlSegment",
"javaType": "UUID"
}
]
}
20 changes: 20 additions & 0 deletions src/main/api/searchWebhookEventLogs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"uri": "/api/system/webhook-event-log/search",
"comments": [
"Searches the webhook event logs with the specified criteria and pagination."
],
"method": "post",
"methodName": "searchWebhookEventLogs",
"successResponse": "WebhookEventLogSearchResponse",
"errorResponse": "Errors",
"params": [
{
"name": "request",
"comments": [
"The search criteria and pagination information."
],
"type": "body",
"javaType": "WebhookEventLogSearchRequest"
}
]
}
4 changes: 4 additions & 0 deletions src/main/client/java.client.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ import io.fusionauth.domain.api.WebAuthnRegisterStartRequest;
import io.fusionauth.domain.api.WebAuthnRegisterStartResponse;
import io.fusionauth.domain.api.WebAuthnStartRequest;
import io.fusionauth.domain.api.WebAuthnStartResponse;
import io.fusionauth.domain.api.WebhookAttemptLogResponse;
import io.fusionauth.domain.api.WebhookEventLogResponse;
import io.fusionauth.domain.api.WebhookEventLogSearchRequest;
import io.fusionauth.domain.api.WebhookEventLogSearchResponse;
import io.fusionauth.domain.api.WebhookRequest;
import io.fusionauth.domain.api.WebhookResponse;
import io.fusionauth.domain.api.WebhookSearchRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
},
"uiConfiguration" : {
"type" : "UIConfiguration"
},
"webhookEventLogConfiguration" : {
"type" : "WebhookEventLogConfiguration"
}
}
}
55 changes: 55 additions & 0 deletions src/main/domain/io.fusionauth.domain.WebhookAttemptLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookAttemptLog",
"description" : "/**\n * A webhook call attempt log.\n *\n * @author Spencer Witt\n */\n",
"implements" : [ {
"type" : "Buildable",
"typeArguments" : [ {
"type" : "WebhookAttemptLog"
} ]
}, {
"type" : "Comparable",
"typeArguments" : [ {
"type" : "WebhookAttemptLog"
} ]
}, {
"type" : "JSONColumnable"
} ],
"fields" : {
"data" : {
"type" : "Map",
"typeArguments" : [ {
"type" : "String"
}, {
"type" : "Object"
} ]
},
"endInstant" : {
"type" : "ZonedDateTime"
},
"id" : {
"type" : "UUID"
},
"startInstant" : {
"type" : "ZonedDateTime"
},
"webhookCallResponse" : {
"type" : "WebhookCallResponse"
},
"webhookEventLogId" : {
"type" : "UUID"
},
"webhookId" : {
"type" : "UUID"
},
"attemptResult" : {
"type" : "WebhookAttemptResult"
},
"duration" : {
"type" : "long"
},
"url" : {
"type" : "String"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookAttemptResult",
"description" : "/**\n * The possible states of an individual webhook attempt to a single endpoint.\n *\n * @author Spencer Witt\n */\n",
"enum" : [ "Success", "Failure", "Unknown" ]
}
22 changes: 22 additions & 0 deletions src/main/domain/io.fusionauth.domain.WebhookCallResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookCallResponse",
"description" : "/**\n * A webhook call response.\n *\n * @author Spencer Witt\n */\n",
"implements" : [ {
"type" : "Buildable",
"typeArguments" : [ {
"type" : "WebhookCallResponse"
} ]
} ],
"fields" : {
"exception" : {
"type" : "String"
},
"statusCode" : {
"type" : "int"
},
"url" : {
"type" : "URI"
}
}
}
61 changes: 61 additions & 0 deletions src/main/domain/io.fusionauth.domain.WebhookEventLog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookEventLog",
"implements" : [ {
"type" : "Buildable",
"typeArguments" : [ {
"type" : "WebhookEventLog"
} ]
}, {
"type" : "JSONColumnable"
} ],
"fields" : {
"attempts" : {
"type" : "List",
"typeArguments" : [ {
"type" : "WebhookAttemptLog"
} ]
},
"data" : {
"type" : "Map",
"typeArguments" : [ {
"type" : "String"
}, {
"type" : "Object"
} ]
},
"event" : {
"type" : "EventRequest"
},
"eventResult" : {
"type" : "WebhookEventResult"
},
"eventType" : {
"type" : "EventType"
},
"id" : {
"type" : "UUID"
},
"insertInstant" : {
"type" : "ZonedDateTime"
},
"lastAttemptInstant" : {
"type" : "ZonedDateTime"
},
"lastUpdateInstant" : {
"type" : "ZonedDateTime"
},
"linkedObjectId" : {
"type" : "UUID"
},
"sequence" : {
"type" : "long"
},
"failedAttempts" : {
"type" : "int"
},
"successfulAttempts" : {
"type" : "int"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookEventLogConfiguration",
"description" : "/**\n * The system configuration for Webhook Event Log data.\n *\n * @author Spencer Witt\n */\n",
"fields" : {
"delete" : {
"type" : "DeleteConfiguration"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packageName" : "io.fusionauth.domain",
"type" : "WebhookEventResult",
"description" : "/**\n * The possible result states of a webhook event. This tracks the success of the overall webhook transaction according to the {@link TransactionType}\n * and configured webhooks.\n *\n * @author Spencer Witt\n */\n",
"enum" : [ "Failed", "Running", "Succeeded" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packageName" : "io.fusionauth.domain.api",
"type" : "WebhookAttemptLogResponse",
"description" : "/**\n * Webhook attempt log response.\n *\n * @author Spencer Witt\n */\n",
"fields" : {
"webhookAttemptLog" : {
"type" : "WebhookAttemptLog"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packageName" : "io.fusionauth.domain.api",
"type" : "WebhookEventLogResponse",
"description" : "/**\n * Webhook event log response.\n *\n * @author Spencer Witt\n */\n",
"implements" : [ {
"type" : "Buildable",
"typeArguments" : [ {
"type" : "WebhookEventLogResponse"
} ]
} ],
"fields" : {
"webhookEventLog" : {
"type" : "WebhookEventLog"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packageName" : "io.fusionauth.domain.api",
"type" : "WebhookEventLogSearchRequest",
"description" : "/**\n * Webhook event log search request.\n *\n * @author Spencer Witt\n */\n",
"fields" : {
"search" : {
"type" : "WebhookEventLogSearchCriteria"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packageName" : "io.fusionauth.domain.api",
"type" : "WebhookEventLogSearchResponse",
"description" : "/**\n * Webhook event log search response.\n *\n * @author Spencer Witt\n */\n",
"fields" : {
"total" : {
"type" : "long"
},
"webhookEventLogs" : {
"type" : "List",
"typeArguments" : [ {
"type" : "WebhookEventLog"
} ]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packageName" : "io.fusionauth.domain.event",
"type" : "BaseEvent",
"description" : "/**\n * Base-class for all FusionAuth events.\n *\n * @author Brian Pontarelli\n */\n",
"description" : "/**\n * Base class for all FusionAuth events.\n *\n * @author Brian Pontarelli\n */\n",
"fields" : {
"createInstant" : {
"type" : "ZonedDateTime"
Expand Down
16 changes: 16 additions & 0 deletions src/main/domain/io.fusionauth.domain.event.BaseGroupEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packageName" : "io.fusionauth.domain.event",
"type" : "BaseGroupEvent",
"description" : "/**\n * Base class for all {@link Group} and {@link GroupMember} events.\n *\n * @author Spencer Witt\n */\n",
"extends" : [ {
"type" : "BaseEvent"
} ],
"implements" : [ {
"type" : "ObjectIdentifiable"
} ],
"fields" : {
"group" : {
"type" : "Group"
}
}
}
16 changes: 16 additions & 0 deletions src/main/domain/io.fusionauth.domain.event.BaseUserEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packageName" : "io.fusionauth.domain.event",
"type" : "BaseUserEvent",
"description" : "/**\n * Base class for all {@link User}-related events.\n *\n * @author Spencer Witt\n */\n",
"extends" : [ {
"type" : "BaseEvent"
} ],
"implements" : [ {
"type" : "ObjectIdentifiable"
} ],
"fields" : {
"user" : {
"type" : "User"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type" : "GroupCreateCompleteEvent",
"description" : "/**\n * Models the Group Created Event.\n *\n * @author Daniel DeGroff\n */\n",
"extends" : [ {
"type" : "BaseEvent"
"type" : "BaseGroupEvent"
} ],
"implements" : [ {
"type" : "Buildable",
Expand All @@ -13,9 +13,5 @@
}, {
"type" : "NonTransactionalEvent"
} ],
"fields" : {
"group" : {
"type" : "Group"
}
}
"fields" : { }
}
Loading