summaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-17 23:28:17 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-17 23:28:17 +0100
commitefed6c0a820c5c47e097fa29455157bbd318ffca (patch)
tree0c52968f8619ce62ba6f442c84dec10fbce4214d /src/ts
parent42315639d14ead79b5fac04508df8be793bbbc0b (diff)
chore: create mutation to send mail from contact form
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/contact.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ts/types/contact.ts b/src/ts/types/contact.ts
new file mode 100644
index 0000000..c0f23e0
--- /dev/null
+++ b/src/ts/types/contact.ts
@@ -0,0 +1,19 @@
+export type SentEmail = {
+ clientMutationId: string;
+ message: string;
+ origin: string;
+ replyTo: string;
+ sent: boolean;
+ to: string;
+};
+
+export type SentEmailResponse = {
+ sendEmail: SentEmail;
+};
+
+export type SendMailReturn = (
+ subject: string,
+ body: string,
+ replyTo: string,
+ mutationId: string
+) => Promise<SentEmail>;