From fa6adedc42e9c6ec39cc30df16b54900c220b094 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 20 Dec 2021 00:15:20 +0100 Subject: refactor: rewrite types and services I was repeating myself a lot in services. So I rewrited the different functions to improve readability and I extracted some formatting functions to put them in utils. I also rewrited/reorganized some types to keep consistent names. --- src/ts/types/contact.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ts/types/contact.ts') diff --git a/src/ts/types/contact.ts b/src/ts/types/contact.ts index c0f23e0..ef6847a 100644 --- a/src/ts/types/contact.ts +++ b/src/ts/types/contact.ts @@ -1,3 +1,10 @@ +export type ContactData = { + body: string; + mutationId: string; + replyTo: string; + subject: string; +}; + export type SentEmail = { clientMutationId: string; message: string; @@ -7,13 +14,6 @@ export type SentEmail = { to: string; }; -export type SentEmailResponse = { +export type SendEmail = { sendEmail: SentEmail; }; - -export type SendMailReturn = ( - subject: string, - body: string, - replyTo: string, - mutationId: string -) => Promise; -- cgit v1.2.3