MCPcopy Create free account
hub / github.com/pollinations/pollinations / createMicroServiceWrapper

Function createMicroServiceWrapper

apps/micro/src/wrapper.ts:32–75  ·  view source on GitHub ↗
(emailConfig: EmailConfig)

Source from the content-addressed store, hash-verified

30}
31
32export function createMicroServiceWrapper(emailConfig: EmailConfig): MicroServiceWrapper {
33 const microService = new MicroService(emailConfig);
34
35 return {
36 async sendMail(message: EmailMessage): Promise<EmailServiceResponse> {
37 return microService.sendMail(message);
38 },
39
40 async sendWelcomeEmail(
41 to: string | string[],
42 userName: string,
43 serviceName?: string
44 ): Promise<EmailServiceResponse> {
45 return microService.sendWelcomeEmail(to, userName, serviceName);
46 },
47
48 async sendPasswordResetEmail(
49 to: string | string[],
50 userName: string,
51 resetLink: string,
52 serviceName?: string,
53 expiryTime?: string
54 ): Promise<EmailServiceResponse> {
55 return microService.sendPasswordResetEmail(to, userName, resetLink, serviceName, expiryTime);
56 },
57
58 async sendNotificationEmail(
59 to: string | string[],
60 title: string,
61 message: string,
62 serviceName?: string
63 ): Promise<EmailServiceResponse> {
64 return microService.sendNotificationEmail(to, title, message, serviceName);
65 },
66
67 async verifyConnection(): Promise<boolean> {
68 return microService.verifyEmailConnection();
69 },
70
71 getTemplates(): Record<string, any> {
72 return microService.getTemplates();
73 },
74 };
75}
76
77// Export types for external use
78export type { EmailConfig, EmailMessage, EmailServiceResponse } from './types/index.js';

Callers 7

brevo-example.jsFile · 0.85
basic-usage.jsFile · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
resend-example.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected