/** * Shared Postmark transport: server vs account tokens, dry-run previews, * setup-aware errors, and token stripping. * * Default secrets are `postmark` (Server API token) and `postmark-account` * (Account API token). Extra accounts use `account: "work"` → `postmark-work` * / `postmark-account-work`. There are no hard-coded aliases, tokens, or * from-addresses. */ export const API_BASE_URL = 'https://api.postmarkapp.com' export const API_HOST = 'api.postmarkapp.com' export const DASHBOARD_URL = 'https://account.postmarkapp.com' export const DASHBOARD_SERVERS_URL = 'https://account.postmarkapp.com/servers' export const DEFAULT_SERVER_SECRET = 'postmark' export const DEFAULT_ACCOUNT_SECRET = 'postmark-account' const SECRET_SUFFIX = '(?:-[A-Za-z0-9][A-Za-z0-9_-]{0,47})?' const SERVER_SECRET_PATTERN = new RegExp('^postmark' + SECRET_SUFFIX + '$') const ACCOUNT_SECRET_PATTERN = new RegExp('^postmark-account' + SECRET_SUFFIX + '$') const ACCOUNT_LABEL_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,47}$/ export type TokenKind = 'server' | 'account' export type PostmarkAuthOptions = { /** * Extra account label. `work` reads `postmark-work` and * `postmark-account-work`. Omit (or pass `default`) for the defaults. */ account?: string /** Override the Server API token secret. Must be `postmark` or `postmark-