-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor(api): Update remaining webhook routes to modular structure #2252
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5972e65
refactor: Update sendSlackNotification to modular structure
DafyddLlyr 0757585
test: Add email-submission tests
DafyddLlyr 69be7ce
refactor: Rename and restructure folders, simplify service
DafyddLlyr ced39ca
feat: Add exemption status to notification
DafyddLlyr 915cf6c
feat: CreatePaymentInvitation
DafyddLlyr a99ba91
feat: CreatePaymentReminderEvents
DafyddLlyr 0849782
feat: CreatePaymentExpiryEvents
DafyddLlyr 7b58274
docs: Swagger docs for payment event endpoints
DafyddLlyr 7279188
docs: Add response type
DafyddLlyr 409d2ca
fix: Tidy up
DafyddLlyr 3665eef
feat: Session reminder and expiry events
DafyddLlyr d94b65e
refactor: Move to /service folder
DafyddLlyr 80da1b4
feat: Sanitise application data endpoint
DafyddLlyr f7f3701
fix: Tidy up swagger docs
DafyddLlyr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ import { NextFunction, Request, Response } from "express"; | |
import { gql } from "graphql-request"; | ||
import { $admin } from "../client"; | ||
import { adminGraphQLClient as adminClient } from "../hasura"; | ||
import { createScheduledEvent } from "../hasura/metadata"; | ||
import { | ||
ScheduledEventResponse, | ||
createScheduledEvent, | ||
} from "../hasura/metadata"; | ||
import { getMostRecentPublishedFlow } from "../helpers"; | ||
import { Flow, Node, Team } from "../types"; | ||
|
||
|
@@ -14,9 +17,9 @@ enum Destination { | |
} | ||
|
||
interface CombinedResponse { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This type is repeated in |
||
bops?: Record<string, string>; | ||
uniform?: Record<string, string>; | ||
email?: Record<string, string>; | ||
bops?: ScheduledEventResponse; | ||
uniform?: ScheduledEventResponse; | ||
email?: ScheduledEventResponse; | ||
} | ||
|
||
// Create "One-off Scheduled Events" in Hasura when a payment request is paid | ||
|
This file was deleted.
Oops, something went wrong.
136 changes: 0 additions & 136 deletions
136
api.planx.uk/modules/webhooks/_old/paymentRequestEvents.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs: https://hasura.io/docs/latest/api-reference/metadata-api/scheduled-triggers/#metadata-create-scheduled-event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typing this cascaded across a few functions and tests which is a bit noisy for a PR, but quite nice in practice.