feat(tools): add @tpmjs/tools-postmark with 82 Postmark API tools

Full Postmark email API coverage: send emails, manage templates,
bounces, domains, webhooks, message streams, stats, suppressions,
inbound rules, sender signatures, and data removals. Dual auth
with server token (60 tools) and account token (22 tools).
This commit is contained in:
Ajax Davis 2026-02-06 22:14:37 +10:00
parent 86e523f3dc
commit 0d30a9cabb
8 changed files with 4814 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,214 @@
/**
* Block metadata for Postmark tools
* This file provides metadata for the blocks validator
*/
import {
activateBounce,
archiveMessageStream,
bypassInboundRules,
// Data Removals
createDataRemoval,
createDomain,
createInboundRule,
createMessageStream,
createSenderSignature,
createServer,
createSuppressions,
createTemplate,
createWebhook,
deleteDomain,
deleteInboundRule,
deleteSenderSignature,
deleteServer,
deleteSuppressions,
deleteTemplate,
deleteWebhook,
getBounce,
getBounceDump,
getBulkEmailStatus,
getDataRemovalStatus,
// Bounces
getDeliveryStats,
getDomain,
getInboundMessageDetails,
getMessageStream,
getOutboundMessageClicks,
getOutboundMessageDetails,
getOutboundMessageDump,
getOutboundMessageOpens,
getSenderSignature,
// Server Config
getServer,
getServerById,
getStatsBounces,
getStatsClicks,
getStatsClicksByBrowser,
getStatsClicksByLocation,
getStatsClicksByPlatform,
getStatsOpens,
getStatsOpensByClient,
getStatsOpensByPlatform,
// Stats
getStatsOverview,
getStatsSends,
getStatsSpamComplaints,
getStatsTracked,
getTemplate,
getWebhook,
// Domains
listDomains,
// Inbound Rules
listInboundRules,
// Message Streams
listMessageStreams,
// Sender Signatures
listSenderSignatures,
// Servers Management
listServers,
// Suppressions
listSuppressions,
// Templates
listTemplates,
// Webhooks
listWebhooks,
pushTemplates,
resendSenderConfirmation,
retryInboundMessage,
rotateDomainDkim,
searchBounces,
// Messages — Inbound
searchInboundMessages,
searchMessageClicks,
// Messages — Search Opens/Clicks
searchMessageOpens,
// Messages — Outbound
searchOutboundMessages,
sendBatchEmails,
sendBatchWithTemplates,
// Bulk Email
sendBulkEmail,
// Email Sending
sendEmail,
sendEmailWithTemplate,
unarchiveMessageStream,
updateDomain,
updateMessageStream,
updateSenderSignature,
updateServer,
updateServerById,
updateTemplate,
updateWebhook,
validateTemplate,
verifyDomainDkim,
verifyDomainReturnPath,
verifyDomainSpf,
} from './src/index.js';
export const block = {
name: 'postmark',
description:
'Postmark email API tools for AI agents. Send emails, manage templates, bounces, domains, webhooks, and more.',
tools: {
// Email Sending
sendEmail,
sendBatchEmails,
sendEmailWithTemplate,
sendBatchWithTemplates,
// Bulk Email
sendBulkEmail,
getBulkEmailStatus,
// Bounces
getDeliveryStats,
searchBounces,
getBounce,
getBounceDump,
activateBounce,
// Templates
listTemplates,
getTemplate,
createTemplate,
updateTemplate,
deleteTemplate,
validateTemplate,
pushTemplates,
// Server Config
getServer,
updateServer,
// Servers Management
listServers,
getServerById,
createServer,
updateServerById,
deleteServer,
// Message Streams
listMessageStreams,
getMessageStream,
createMessageStream,
updateMessageStream,
archiveMessageStream,
unarchiveMessageStream,
// Messages — Outbound
searchOutboundMessages,
getOutboundMessageDetails,
getOutboundMessageDump,
getOutboundMessageOpens,
getOutboundMessageClicks,
// Messages — Inbound
searchInboundMessages,
getInboundMessageDetails,
bypassInboundRules,
retryInboundMessage,
// Messages — Search Opens/Clicks
searchMessageOpens,
searchMessageClicks,
// Stats
getStatsOverview,
getStatsSends,
getStatsBounces,
getStatsSpamComplaints,
getStatsTracked,
getStatsOpens,
getStatsOpensByPlatform,
getStatsOpensByClient,
getStatsClicks,
getStatsClicksByBrowser,
getStatsClicksByPlatform,
getStatsClicksByLocation,
// Domains
listDomains,
getDomain,
createDomain,
updateDomain,
deleteDomain,
verifyDomainDkim,
verifyDomainReturnPath,
verifyDomainSpf,
rotateDomainDkim,
// Sender Signatures
listSenderSignatures,
getSenderSignature,
createSenderSignature,
updateSenderSignature,
deleteSenderSignature,
resendSenderConfirmation,
// Webhooks
listWebhooks,
getWebhook,
createWebhook,
updateWebhook,
deleteWebhook,
// Suppressions
listSuppressions,
createSuppressions,
deleteSuppressions,
// Inbound Rules
listInboundRules,
createInboundRule,
deleteInboundRule,
// Data Removals
createDataRemoval,
getDataRemovalStatus,
},
};
export default block;

View file

@ -0,0 +1,6 @@
/**
* Postmark Email API Tools for TPMJS
* Re-export all tools from src/index.ts
*/
export * from './src/index.js';
export { default } from './src/index.js';

View file

@ -0,0 +1,383 @@
{
"name": "@tpmjs/tools-postmark",
"version": "0.1.0",
"description": "Postmark email API tools for AI agents. Send emails, manage templates, bounces, domains, webhooks, and more.",
"type": "module",
"keywords": [
"tpmjs",
"postmark",
"email",
"transactional",
"smtp",
"agent"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist .turbo"
},
"devDependencies": {
"@tpmjs/tsconfig": "workspace:*",
"tsup": "^8.5.1",
"typescript": "^5.9.3"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/tpmjs/tpmjs.git",
"directory": "packages/tools/official/postmark"
},
"homepage": "https://tpmjs.com",
"license": "MIT",
"tpmjs": {
"category": "ops",
"frameworks": [
"vercel-ai"
],
"tools": [
{
"name": "sendEmail",
"description": "Send a single transactional email via Postmark."
},
{
"name": "sendBatchEmails",
"description": "Send a batch of up to 500 emails in a single API call."
},
{
"name": "sendEmailWithTemplate",
"description": "Send an email using a Postmark template."
},
{
"name": "sendBatchWithTemplates",
"description": "Send a batch of templated emails in a single API call."
},
{
"name": "sendBulkEmail",
"description": "Submit a bulk email job for large-scale sending."
},
{
"name": "getBulkEmailStatus",
"description": "Get the status of a bulk email job."
},
{
"name": "getDeliveryStats",
"description": "Get delivery statistics including bounce counts by type."
},
{
"name": "searchBounces",
"description": "Search bounces with optional filters."
},
{
"name": "getBounce",
"description": "Get details of a specific bounce by ID."
},
{
"name": "getBounceDump",
"description": "Get the raw SMTP dump for a specific bounce."
},
{
"name": "activateBounce",
"description": "Activate a bounced email address to allow sending again."
},
{
"name": "listTemplates",
"description": "List email templates with optional filtering."
},
{
"name": "getTemplate",
"description": "Get details of a specific template."
},
{
"name": "createTemplate",
"description": "Create a new email template."
},
{
"name": "updateTemplate",
"description": "Update an existing email template."
},
{
"name": "deleteTemplate",
"description": "Delete an email template."
},
{
"name": "validateTemplate",
"description": "Validate template content and model."
},
{
"name": "pushTemplates",
"description": "Push templates from one server to another."
},
{
"name": "getServer",
"description": "Get the current server configuration."
},
{
"name": "updateServer",
"description": "Update the current server configuration."
},
{
"name": "listServers",
"description": "List all servers in the account."
},
{
"name": "getServerById",
"description": "Get a specific server by ID."
},
{
"name": "createServer",
"description": "Create a new server in the account."
},
{
"name": "updateServerById",
"description": "Update a specific server by ID."
},
{
"name": "deleteServer",
"description": "Delete a server from the account."
},
{
"name": "listMessageStreams",
"description": "List all message streams for the server."
},
{
"name": "getMessageStream",
"description": "Get details of a specific message stream."
},
{
"name": "createMessageStream",
"description": "Create a new message stream."
},
{
"name": "updateMessageStream",
"description": "Update a message stream's properties."
},
{
"name": "archiveMessageStream",
"description": "Archive a message stream."
},
{
"name": "unarchiveMessageStream",
"description": "Unarchive a previously archived message stream."
},
{
"name": "searchOutboundMessages",
"description": "Search outbound messages with optional filters."
},
{
"name": "getOutboundMessageDetails",
"description": "Get full details of a specific outbound message."
},
{
"name": "getOutboundMessageDump",
"description": "Get the raw SMTP dump of an outbound message."
},
{
"name": "getOutboundMessageOpens",
"description": "Get open events for a specific outbound message."
},
{
"name": "getOutboundMessageClicks",
"description": "Get click events for a specific outbound message."
},
{
"name": "searchInboundMessages",
"description": "Search inbound messages with optional filters."
},
{
"name": "getInboundMessageDetails",
"description": "Get full details of a specific inbound message."
},
{
"name": "bypassInboundRules",
"description": "Bypass inbound rules for a specific message."
},
{
"name": "retryInboundMessage",
"description": "Retry processing of an inbound message."
},
{
"name": "searchMessageOpens",
"description": "Search message open events across all messages."
},
{
"name": "searchMessageClicks",
"description": "Search message click events across all messages."
},
{
"name": "getStatsOverview",
"description": "Get an overview of outbound email statistics."
},
{
"name": "getStatsSends",
"description": "Get send count statistics over time."
},
{
"name": "getStatsBounces",
"description": "Get bounce statistics over time."
},
{
"name": "getStatsSpamComplaints",
"description": "Get spam complaint statistics over time."
},
{
"name": "getStatsTracked",
"description": "Get tracked email statistics over time."
},
{
"name": "getStatsOpens",
"description": "Get email open statistics over time."
},
{
"name": "getStatsOpensByPlatform",
"description": "Get email open statistics grouped by platform."
},
{
"name": "getStatsOpensByClient",
"description": "Get email open statistics grouped by email client."
},
{
"name": "getStatsClicks",
"description": "Get link click statistics over time."
},
{
"name": "getStatsClicksByBrowser",
"description": "Get link click statistics grouped by browser."
},
{
"name": "getStatsClicksByPlatform",
"description": "Get link click statistics grouped by platform."
},
{
"name": "getStatsClicksByLocation",
"description": "Get link click statistics grouped by geographic location."
},
{
"name": "listDomains",
"description": "List all domains in the account."
},
{
"name": "getDomain",
"description": "Get details of a specific domain."
},
{
"name": "createDomain",
"description": "Create a new sending domain."
},
{
"name": "updateDomain",
"description": "Update a domain's return-path."
},
{
"name": "deleteDomain",
"description": "Delete a domain from the account."
},
{
"name": "verifyDomainDkim",
"description": "Trigger DKIM verification for a domain."
},
{
"name": "verifyDomainReturnPath",
"description": "Trigger return-path verification for a domain."
},
{
"name": "verifyDomainSpf",
"description": "Trigger SPF verification for a domain."
},
{
"name": "rotateDomainDkim",
"description": "Rotate DKIM keys for a domain."
},
{
"name": "listSenderSignatures",
"description": "List all sender signatures in the account."
},
{
"name": "getSenderSignature",
"description": "Get details of a specific sender signature."
},
{
"name": "createSenderSignature",
"description": "Create a new sender signature."
},
{
"name": "updateSenderSignature",
"description": "Update an existing sender signature."
},
{
"name": "deleteSenderSignature",
"description": "Delete a sender signature."
},
{
"name": "resendSenderConfirmation",
"description": "Resend the confirmation email for a sender signature."
},
{
"name": "listWebhooks",
"description": "List all webhooks for the server."
},
{
"name": "getWebhook",
"description": "Get details of a specific webhook."
},
{
"name": "createWebhook",
"description": "Create a new webhook."
},
{
"name": "updateWebhook",
"description": "Update an existing webhook."
},
{
"name": "deleteWebhook",
"description": "Delete a webhook."
},
{
"name": "listSuppressions",
"description": "List suppressed email addresses for a message stream."
},
{
"name": "createSuppressions",
"description": "Add email addresses to the suppression list."
},
{
"name": "deleteSuppressions",
"description": "Remove email addresses from the suppression list."
},
{
"name": "listInboundRules",
"description": "List all inbound processing rules."
},
{
"name": "createInboundRule",
"description": "Create a new inbound processing rule."
},
{
"name": "deleteInboundRule",
"description": "Delete an inbound processing rule."
},
{
"name": "createDataRemoval",
"description": "Request removal of personal data."
},
{
"name": "getDataRemovalStatus",
"description": "Get the status of a data removal request."
}
]
},
"dependencies": {
"ai": "6.0.49"
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
{
"extends": "@tpmjs/tsconfig/base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"incremental": false,
"composite": false
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

View file

@ -0,0 +1,10 @@
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
dts: true,
clean: true,
treeshake: true,
splitting: false,
});

16
pnpm-lock.yaml generated
View file

@ -2538,6 +2538,22 @@ importers:
specifier: ^5.9.3
version: 5.9.3
packages/tools/official/postmark:
dependencies:
ai:
specifier: 6.0.49
version: 6.0.49(zod@4.3.5)
devDependencies:
'@tpmjs/tsconfig':
specifier: workspace:*
version: link:../../../config/tsconfig
tsup:
specifier: ^8.5.1
version: 8.5.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.2)
typescript:
specifier: ^5.9.3
version: 5.9.3
packages/tools/official/postmortem-action-extractor:
dependencies:
ai: