first commit

This commit is contained in:
2026-04-01 15:16:25 +02:00
commit a3a136c65d
9 changed files with 236 additions and 0 deletions

27
dist/server/index.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
type PostalMessageInput = {
to: string[];
subject: string;
plainBody: string;
htmlBody: string;
};
type PostalClient = {
enabled: boolean;
sendMessage: (input: PostalMessageInput) => Promise<void>;
};
type CreatePostalClientOptions = {
baseUrl: string;
apiKey: string;
from: string;
fetchImpl?: typeof fetch;
};
type CreatePostalClientFromEnvOptions = {
baseUrlEnv?: string;
apiKeyEnv?: string;
fromEnv?: string;
env?: Record<string, string | undefined>;
fetchImpl?: typeof fetch;
};
declare function createPostalClient(options: CreatePostalClientOptions): PostalClient;
declare function createPostalClientFromEnv(options?: CreatePostalClientFromEnvOptions): PostalClient;
export { type CreatePostalClientOptions, type PostalClient, type PostalMessageInput, createPostalClient, createPostalClientFromEnv };