Skip to content

Commit

Permalink
feat: Write docs for Workflow overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorJAY committed Jun 14, 2024
1 parent b36db26 commit 041110e
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/main/java/co/novu/common/base/Novu.java
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,13 @@ public UpdateOrganizationBrandResponse updateOrganizationBrand(final UpdateOrgan
}
}

/**
* Create a Workflow override.
* @param request an instance of {@link CreateWorkflowOverrideRequest}
* @return {@link WorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public WorkflowOverrideResponse createWorkflowOverride(final CreateWorkflowOverrideRequest request)
throws IOException, NovuNetworkException {
try {
Expand All @@ -1715,6 +1722,13 @@ public WorkflowOverrideResponse createWorkflowOverride(final CreateWorkflowOverr
}
}

/**
* Retrieve a list of Workflow overrides. This function supports pagination.
* @param request an instance of {@link GetWorkflowOverrideRequest}
* @return {@link BulkWorkflowOverridesResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public BulkWorkflowOverridesResponse getWorkflowOverrides(final GetWorkflowOverrideRequest request)
throws IOException, NovuNetworkException {
try {
Expand All @@ -1725,6 +1739,14 @@ public BulkWorkflowOverridesResponse getWorkflowOverrides(final GetWorkflowOverr
}
}

/**
* Retrieve a Workflow override associated with a Tenant.
* @param workflowId the ID of the Workflow override to be retrieved
* @param tenantId the ID of the Tenant
* @return {@link WorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public WorkflowOverrideResponse getWorkflowOverride(final String workflowId, final String tenantId)
throws IOException, NovuNetworkException {
try {
Expand All @@ -1735,6 +1757,13 @@ public WorkflowOverrideResponse getWorkflowOverride(final String workflowId, fin
}
}

/**
* Retrieve a Workflow override.
* @param overrideId the ID of the Workflow override to be retrieved
* @return {@link WorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public WorkflowOverrideResponse getWorkflowOverrideById(final String overrideId)
throws IOException, NovuNetworkException {
try {
Expand All @@ -1745,6 +1774,14 @@ public WorkflowOverrideResponse getWorkflowOverrideById(final String overrideId)
}
}

/**
* Update a Workflow override.
* @param overrideId the ID of the Workflow override to be updated
* @param request an instance of {@link UpdateWorkflowOverrideRequest}
* @return {@link WorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public WorkflowOverrideResponse updateWorkflowOverrideById(final String overrideId,
final UpdateWorkflowOverrideRequest request)
throws IOException, NovuNetworkException {
Expand All @@ -1756,6 +1793,15 @@ public WorkflowOverrideResponse updateWorkflowOverrideById(final String override
}
}

/**
* Update a Workflow override associated with a Tenant.
* @param workflowId the ID of the Workflow override to be updated
* @param tenantId the ID of the Tenant
* @param request an instance of {@link UpdateWorkflowOverrideRequest}
* @return {@link WorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public WorkflowOverrideResponse updateWorkflowOverride(final String workflowId, final String tenantId,
final UpdateWorkflowOverrideRequest request)
throws IOException, NovuNetworkException {
Expand All @@ -1767,6 +1813,13 @@ public WorkflowOverrideResponse updateWorkflowOverride(final String workflowId,
}
}

/**
* Delete a Workflow override.
* @param overrideId the ID of the Workflow override to be deleted
* @return {@link DeleteWorkflowOverrideResponse}
* @throws IOException if a problem occurred talking to the server
* @throws NovuNetworkException if there is a connection error
*/
public DeleteWorkflowOverrideResponse deleteWorkflowOverride(final String overrideId)
throws IOException, NovuNetworkException {
try {
Expand Down

0 comments on commit 041110e

Please sign in to comment.