-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new wasp/server/email API (#1701)
- Loading branch information
Showing
22 changed files
with
65 additions
and
49 deletions.
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
4 changes: 2 additions & 2 deletions
4
waspc/data/Generator/templates/sdk/server/auth/email/utils.ts
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{{={= =}=}} | ||
import { EmailFromField } from "wasp/email/core/types"; | ||
import { EmailFromField } from "./types"; | ||
|
||
// PRIVATE API | ||
// Formats an email address and an optional name into a string that can be used | ||
// as the "from" field in an email. | ||
// { email: "test@test.com, name: "Test" } -> "Test <[email protected]>" | ||
|
@@ -18,6 +19,7 @@ export function formatFromField({ | |
} | ||
|
||
{=# isDefaultFromFieldDefined =} | ||
// PRIVATE API | ||
export function getDefaultFromField(): EmailFromField { | ||
return { | ||
email: "{= defaultFromField.email =}", | ||
|
@@ -28,6 +30,7 @@ export function getDefaultFromField(): EmailFromField { | |
} | ||
{=/ isDefaultFromFieldDefined =} | ||
{=^ isDefaultFromFieldDefined =} | ||
// PRIVATE API | ||
export function getDefaultFromField(): EmailFromField { | ||
return { | ||
email: "", | ||
|
4 changes: 4 additions & 0 deletions
4
...nerator/templates/sdk/email/core/index.ts → .../templates/sdk/server/email/core/index.ts
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
{{={= =}=}} | ||
{=# isSmtpProviderUsed =} | ||
// PRIVATE API | ||
export { initSmtpEmailSender as initEmailSender } from "./providers/smtp.js"; | ||
{=/ isSmtpProviderUsed =} | ||
{=# isSendGridProviderUsed =} | ||
// PRIVATE API | ||
export { initSendGridEmailSender as initEmailSender } from "./providers/sendgrid.js"; | ||
{=/ isSendGridProviderUsed =} | ||
{=# isMailgunProviderUsed =} | ||
// PRIVATE API | ||
export { initMailgunEmailSender as initEmailSender } from "./providers/mailgun.js"; | ||
{=/ isMailgunProviderUsed =} | ||
{=# isDummyProviderUsed =} | ||
// PRIVATE API | ||
export { initDummyEmailSender as initEmailSender } from "./providers/dummy.js"; | ||
{=/ isDummyProviderUsed =} |
3 changes: 2 additions & 1 deletion
3
...mplates/sdk/email/core/providers/dummy.ts → .../sdk/server/email/core/providers/dummy.ts
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
3 changes: 2 additions & 1 deletion
3
...lates/sdk/email/core/providers/mailgun.ts → ...dk/server/email/core/providers/mailgun.ts
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
3 changes: 2 additions & 1 deletion
3
...ates/sdk/email/core/providers/sendgrid.ts → ...k/server/email/core/providers/sendgrid.ts
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
3 changes: 2 additions & 1 deletion
3
...emplates/sdk/email/core/providers/smtp.ts → ...s/sdk/server/email/core/providers/smtp.ts
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
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
2 changes: 1 addition & 1 deletion
2
waspc/data/Generator/templates/server/src/auth/providers/email/signup.ts
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
4 changes: 1 addition & 3 deletions
4
waspc/examples/todo-typescript/.wasp/out/sdk/wasp/auth/utils.ts
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
2 changes: 1 addition & 1 deletion
2
waspc/examples/todo-typescript/.wasp/out/sdk/wasp/auth/validation.ts
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
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
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
Oops, something went wrong.