agenttwin 0.3.21 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +2113 -609
- package/dist/dashboard/assets/dashboard/agent-home.css +7 -7
- package/dist/dashboard/assets/dashboard/bay-morning.webp +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-afternoon.webp +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-portrait.webp +0 -0
- package/dist/dashboard/assets/dashboard/moonlit-coast.webp +0 -0
- package/dist/dashboard/assets/next/static/chunks/5663-403316746afad10e.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/dashboard/{page-9c11295678539a5f.js → page-0e0392368e0a891e.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-4981ea4966b19e3e.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-dd4ac0f5f36e6bfa.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/{page-34574448d210c775.js → page-de0fe6d84be21e6a.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-360cbffc57981f6b.js +1 -0
- package/dist/dashboard/assets/next/static/chunks/app/v2/{page-07c8054d57c9089b.js → page-3e86fffabfa87d88.js} +1 -1
- package/dist/dashboard/assets/next/static/chunks/{webpack-40324749d289e4a5.js → webpack-be6e526fd530c797.js} +1 -1
- package/dist/dashboard/assets/next/static/css/{42045de5f39b50ca.css → 37d81e1d2804cc5f.css} +1 -1
- package/dist/dashboard/assets/next/static/css/69ec1bae997c3bb0.css +1 -0
- package/dist/dashboard/assets/next/static/css/ad85402a1595e56e.css +1 -0
- package/dist/dashboard/assets/next/static/css/{4bbe78c2fe206b92.css → da981fb878a02b8c.css} +1 -1
- package/dist/dashboard/assets/next/static/media/bay-morning.82669113.webp +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.0aa49492.webp +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-portrait.89fc667a.webp +0 -0
- package/dist/dashboard/assets/next/static/media/moonlit-coast.09739ef4.webp +0 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/engine.js +6385 -4973
- package/dist/gateway.js +2194 -604
- package/dist/twins/catalog.json +6020 -0
- package/dist/twins/engine/v2/THIRD-PARTY.txt +25 -0
- package/dist/twins/engine/v2/chunks/2CHBP57N.mjs +8 -0
- package/dist/twins/engine/v2/chunks/4CPL6MPF.mjs +30 -0
- package/dist/twins/engine/v2/chunks/OYLYKZGD.mjs +2 -0
- package/dist/twins/engine/v2/chunks/SQSP35HM.mjs +38 -0
- package/dist/twins/engine/v2/chunks/YSJQQVUM.mjs +2 -0
- package/dist/twins/engine/v2/react-dom_client.mjs +272 -0
- package/dist/twins/engine/v2/react-dom_server.mjs +263 -0
- package/dist/twins/engine/v2/react.mjs +2 -0
- package/dist/twins/engine/v2/react_jsx-runtime.mjs +31 -0
- package/dist/twins/engine/v2/volter_world-core.mjs +195 -0
- package/dist/twins/engine/v2/volter_world-core_app-route.mjs +2 -0
- package/dist/twins/engine/v2/volter_world-core_network-policy.mjs +2 -0
- package/dist/twins/engine/v3/THIRD-PARTY.txt +65 -0
- package/dist/twins/engine/v3/chunks/2CHBP57N.mjs +8 -0
- package/dist/twins/engine/v3/chunks/2YSSPA5O.mjs +65 -0
- package/dist/twins/engine/v3/chunks/5PWRY4UK.mjs +154 -0
- package/dist/twins/engine/v3/chunks/7XRKSFFJ.mjs +2 -0
- package/dist/twins/engine/v3/chunks/AWOWH2H5.mjs +2 -0
- package/dist/twins/engine/v3/chunks/C46M5U3Q.mjs +2 -0
- package/dist/twins/engine/v3/chunks/MFH2VZPP.mjs +2 -0
- package/dist/twins/engine/v3/chunks/MWCO5UV3.mjs +2 -0
- package/dist/twins/engine/v3/chunks/N5BL5RDF.mjs +313 -0
- package/dist/twins/engine/v3/chunks/O7HGPMXG.mjs +2 -0
- package/dist/twins/engine/v3/chunks/OYLYKZGD.mjs +2 -0
- package/dist/twins/engine/v3/chunks/PLB7HTON.mjs +8 -0
- package/dist/twins/engine/v3/chunks/TY4LDBVH.mjs +7 -0
- package/dist/twins/engine/v3/chunks/VDIRUSCM.mjs +2 -0
- package/dist/twins/engine/v3/chunks/WGUCFQK6.mjs +2 -0
- package/dist/twins/engine/v3/chunks/WPATONSC.mjs +2 -0
- package/dist/twins/engine/v3/react_jsx-runtime.mjs +2 -0
- package/dist/twins/engine/v3/volter_world-core.mjs +2 -0
- package/dist/twins/engine/v3/volter_world-ui.mjs +559 -0
- package/dist/twins/packs/ahrefs/LICENSE +202 -0
- package/dist/twins/packs/ahrefs/NOTICE +7 -0
- package/dist/twins/packs/ahrefs/index.mjs +2 -0
- package/dist/twins/packs/ai-gateway/LICENSE +202 -0
- package/dist/twins/packs/ai-gateway/NOTICE +7 -0
- package/dist/twins/packs/ai-gateway/index.mjs +14 -0
- package/dist/twins/packs/airtable/LICENSE +202 -0
- package/dist/twins/packs/airtable/NOTICE +7 -0
- package/dist/twins/packs/airtable/index.mjs +2 -0
- package/dist/twins/packs/algolia/LICENSE +202 -0
- package/dist/twins/packs/algolia/NOTICE +7 -0
- package/dist/twins/packs/algolia/index.mjs +2 -0
- package/dist/twins/packs/ambientcg/LICENSE +202 -0
- package/dist/twins/packs/ambientcg/NOTICE +7 -0
- package/dist/twins/packs/ambientcg/index.mjs +2 -0
- package/dist/twins/packs/anthropic/LICENSE +202 -0
- package/dist/twins/packs/anthropic/NOTICE +7 -0
- package/dist/twins/packs/anthropic/index.mjs +18 -0
- package/dist/twins/packs/assemblyai/LICENSE +202 -0
- package/dist/twins/packs/assemblyai/NOTICE +7 -0
- package/dist/twins/packs/assemblyai/index.mjs +11 -0
- package/dist/twins/packs/aws/LICENSE +202 -0
- package/dist/twins/packs/aws/NOTICE +7 -0
- package/dist/twins/packs/aws/index.mjs +2 -0
- package/dist/twins/packs/azure/LICENSE +202 -0
- package/dist/twins/packs/azure/NOTICE +7 -0
- package/dist/twins/packs/azure/index.mjs +38 -0
- package/dist/twins/packs/azureformrecognizer/LICENSE +202 -0
- package/dist/twins/packs/azureformrecognizer/NOTICE +7 -0
- package/dist/twins/packs/azureformrecognizer/index.mjs +3 -0
- package/dist/twins/packs/bitly/LICENSE +202 -0
- package/dist/twins/packs/bitly/NOTICE +7 -0
- package/dist/twins/packs/bitly/index.mjs +2 -0
- package/dist/twins/packs/bluesky/LICENSE +202 -0
- package/dist/twins/packs/bluesky/NOTICE +7 -0
- package/dist/twins/packs/bluesky/index.mjs +30 -0
- package/dist/twins/packs/calcom/LICENSE +202 -0
- package/dist/twins/packs/calcom/NOTICE +7 -0
- package/dist/twins/packs/calcom/index.mjs +2 -0
- package/dist/twins/packs/clerk/LICENSE +202 -0
- package/dist/twins/packs/clerk/NOTICE +7 -0
- package/dist/twins/packs/clerk/index.mjs +5 -0
- package/dist/twins/packs/cloudflare/LICENSE +202 -0
- package/dist/twins/packs/cloudflare/NOTICE +7 -0
- package/dist/twins/packs/cloudflare/index.mjs +79 -0
- package/dist/twins/packs/cohere/LICENSE +202 -0
- package/dist/twins/packs/cohere/NOTICE +7 -0
- package/dist/twins/packs/cohere/index.mjs +2 -0
- package/dist/twins/packs/datadog/LICENSE +202 -0
- package/dist/twins/packs/datadog/NOTICE +7 -0
- package/dist/twins/packs/datadog/index.mjs +3 -0
- package/dist/twins/packs/deepinfra/LICENSE +202 -0
- package/dist/twins/packs/deepinfra/NOTICE +7 -0
- package/dist/twins/packs/deepinfra/index.mjs +13 -0
- package/dist/twins/packs/deepseek/LICENSE +202 -0
- package/dist/twins/packs/deepseek/NOTICE +7 -0
- package/dist/twins/packs/deepseek/index.mjs +12 -0
- package/dist/twins/packs/discord/LICENSE +202 -0
- package/dist/twins/packs/discord/NOTICE +7 -0
- package/dist/twins/packs/discord/index.mjs +2 -0
- package/dist/twins/packs/duckduckgo/LICENSE +202 -0
- package/dist/twins/packs/duckduckgo/NOTICE +7 -0
- package/dist/twins/packs/duckduckgo/index.mjs +532 -0
- package/dist/twins/packs/dynadot/LICENSE +202 -0
- package/dist/twins/packs/dynadot/NOTICE +7 -0
- package/dist/twins/packs/dynadot/index.mjs +2 -0
- package/dist/twins/packs/e2b/LICENSE +202 -0
- package/dist/twins/packs/e2b/NOTICE +7 -0
- package/dist/twins/packs/e2b/index.mjs +2 -0
- package/dist/twins/packs/elevenlabs/LICENSE +202 -0
- package/dist/twins/packs/elevenlabs/NOTICE +7 -0
- package/dist/twins/packs/elevenlabs/index.mjs +4 -0
- package/dist/twins/packs/expo/LICENSE +202 -0
- package/dist/twins/packs/expo/NOTICE +7 -0
- package/dist/twins/packs/expo/index.mjs +2 -0
- package/dist/twins/packs/fal/LICENSE +202 -0
- package/dist/twins/packs/fal/NOTICE +7 -0
- package/dist/twins/packs/fal/index.mjs +2 -0
- package/dist/twins/packs/figma/LICENSE +202 -0
- package/dist/twins/packs/figma/NOTICE +7 -0
- package/dist/twins/packs/figma/index.mjs +2 -0
- package/dist/twins/packs/firecrawl/LICENSE +202 -0
- package/dist/twins/packs/firecrawl/NOTICE +7 -0
- package/dist/twins/packs/firecrawl/index.mjs +9 -0
- package/dist/twins/packs/fireworks/LICENSE +202 -0
- package/dist/twins/packs/fireworks/NOTICE +7 -0
- package/dist/twins/packs/fireworks/index.mjs +13 -0
- package/dist/twins/packs/fly/LICENSE +202 -0
- package/dist/twins/packs/fly/NOTICE +7 -0
- package/dist/twins/packs/fly/index.mjs +2 -0
- package/dist/twins/packs/gcs/LICENSE +202 -0
- package/dist/twins/packs/gcs/NOTICE +7 -0
- package/dist/twins/packs/gcs/index.mjs +8 -0
- package/dist/twins/packs/gemini/LICENSE +202 -0
- package/dist/twins/packs/gemini/NOTICE +7 -0
- package/dist/twins/packs/gemini/index.mjs +7 -0
- package/dist/twins/packs/github/LICENSE +202 -0
- package/dist/twins/packs/github/NOTICE +7 -0
- package/dist/twins/packs/github/index.mjs +75153 -0
- package/dist/twins/packs/googleads/LICENSE +202 -0
- package/dist/twins/packs/googleads/NOTICE +7 -0
- package/dist/twins/packs/googleads/index.mjs +3 -0
- package/dist/twins/packs/googlemaps/LICENSE +202 -0
- package/dist/twins/packs/googlemaps/NOTICE +7 -0
- package/dist/twins/packs/googlemaps/index.mjs +2 -0
- package/dist/twins/packs/googleoauth/LICENSE +202 -0
- package/dist/twins/packs/googleoauth/NOTICE +7 -0
- package/dist/twins/packs/googleoauth/index.mjs +2 -0
- package/dist/twins/packs/hackernews/LICENSE +202 -0
- package/dist/twins/packs/hackernews/NOTICE +7 -0
- package/dist/twins/packs/hackernews/index.mjs +35 -0
- package/dist/twins/packs/huggingface/LICENSE +202 -0
- package/dist/twins/packs/huggingface/NOTICE +7 -0
- package/dist/twins/packs/huggingface/index.mjs +9 -0
- package/dist/twins/packs/inngest/LICENSE +202 -0
- package/dist/twins/packs/inngest/NOTICE +7 -0
- package/dist/twins/packs/inngest/index.mjs +2 -0
- package/dist/twins/packs/instagram/LICENSE +202 -0
- package/dist/twins/packs/instagram/NOTICE +7 -0
- package/dist/twins/packs/instagram/index.mjs +2 -0
- package/dist/twins/packs/jira/LICENSE +202 -0
- package/dist/twins/packs/jira/NOTICE +7 -0
- package/dist/twins/packs/jira/index.mjs +2 -0
- package/dist/twins/packs/langfuse/LICENSE +202 -0
- package/dist/twins/packs/langfuse/NOTICE +7 -0
- package/dist/twins/packs/langfuse/index.mjs +2 -0
- package/dist/twins/packs/linear/LICENSE +202 -0
- package/dist/twins/packs/linear/NOTICE +7 -0
- package/dist/twins/packs/linear/index.mjs +52866 -0
- package/dist/twins/packs/linkedin/LICENSE +202 -0
- package/dist/twins/packs/linkedin/NOTICE +7 -0
- package/dist/twins/packs/linkedin/index.mjs +78 -0
- package/dist/twins/packs/livekit/LICENSE +202 -0
- package/dist/twins/packs/livekit/NOTICE +7 -0
- package/dist/twins/packs/livekit/index.mjs +2 -0
- package/dist/twins/packs/mailgun/LICENSE +202 -0
- package/dist/twins/packs/mailgun/NOTICE +7 -0
- package/dist/twins/packs/mailgun/index.mjs +13 -0
- package/dist/twins/packs/mapbox/LICENSE +202 -0
- package/dist/twins/packs/mapbox/NOTICE +7 -0
- package/dist/twins/packs/mapbox/index.mjs +2 -0
- package/dist/twins/packs/merge/LICENSE +202 -0
- package/dist/twins/packs/merge/NOTICE +7 -0
- package/dist/twins/packs/merge/index.mjs +4 -0
- package/dist/twins/packs/mistral/LICENSE +202 -0
- package/dist/twins/packs/mistral/NOTICE +7 -0
- package/dist/twins/packs/mistral/index.mjs +6 -0
- package/dist/twins/packs/mixpanel/LICENSE +202 -0
- package/dist/twins/packs/mixpanel/NOTICE +8 -0
- package/dist/twins/packs/mixpanel/index.mjs +2 -0
- package/dist/twins/packs/mongodb/LICENSE +202 -0
- package/dist/twins/packs/mongodb/NOTICE +7 -0
- package/dist/twins/packs/mongodb/index.mjs +8 -0
- package/dist/twins/packs/moonshot/LICENSE +202 -0
- package/dist/twins/packs/moonshot/NOTICE +7 -0
- package/dist/twins/packs/moonshot/index.mjs +18 -0
- package/dist/twins/packs/notion/LICENSE +202 -0
- package/dist/twins/packs/notion/NOTICE +7 -0
- package/dist/twins/packs/notion/index.mjs +2 -0
- package/dist/twins/packs/npm-registry/LICENSE +202 -0
- package/dist/twins/packs/npm-registry/NOTICE +7 -0
- package/dist/twins/packs/npm-registry/index.mjs +2 -0
- package/dist/twins/packs/oa-treasury/LICENSE +202 -0
- package/dist/twins/packs/oa-treasury/NOTICE +8 -0
- package/dist/twins/packs/oa-treasury/index.mjs +16 -0
- package/dist/twins/packs/openai/LICENSE +202 -0
- package/dist/twins/packs/openai/NOTICE +7 -0
- package/dist/twins/packs/openai/index.mjs +3473 -0
- package/dist/twins/packs/openrouter/LICENSE +202 -0
- package/dist/twins/packs/openrouter/NOTICE +7 -0
- package/dist/twins/packs/openrouter/index.mjs +2 -0
- package/dist/twins/packs/openweather/LICENSE +202 -0
- package/dist/twins/packs/openweather/NOTICE +7 -0
- package/dist/twins/packs/openweather/index.mjs +2 -0
- package/dist/twins/packs/paypal/LICENSE +202 -0
- package/dist/twins/packs/paypal/NOTICE +7 -0
- package/dist/twins/packs/paypal/index.mjs +51 -0
- package/dist/twins/packs/pinecone/LICENSE +202 -0
- package/dist/twins/packs/pinecone/NOTICE +7 -0
- package/dist/twins/packs/pinecone/index.mjs +2 -0
- package/dist/twins/packs/plain/LICENSE +202 -0
- package/dist/twins/packs/plain/NOTICE +8 -0
- package/dist/twins/packs/plain/index.mjs +18426 -0
- package/dist/twins/packs/planetscale/LICENSE +202 -0
- package/dist/twins/packs/planetscale/NOTICE +7 -0
- package/dist/twins/packs/planetscale/index.mjs +18 -0
- package/dist/twins/packs/polar/LICENSE +202 -0
- package/dist/twins/packs/polar/NOTICE +7 -0
- package/dist/twins/packs/polar/index.mjs +2 -0
- package/dist/twins/packs/polyhaven/LICENSE +202 -0
- package/dist/twins/packs/polyhaven/NOTICE +7 -0
- package/dist/twins/packs/polyhaven/index.mjs +3 -0
- package/dist/twins/packs/postmark/LICENSE +202 -0
- package/dist/twins/packs/postmark/NOTICE +7 -0
- package/dist/twins/packs/postmark/index.mjs +12 -0
- package/dist/twins/packs/reddit/LICENSE +202 -0
- package/dist/twins/packs/reddit/NOTICE +7 -0
- package/dist/twins/packs/reddit/index.mjs +324 -0
- package/dist/twins/packs/redis/LICENSE +202 -0
- package/dist/twins/packs/redis/NOTICE +7 -0
- package/dist/twins/packs/redis/index.mjs +2 -0
- package/dist/twins/packs/replicate/LICENSE +202 -0
- package/dist/twins/packs/replicate/NOTICE +7 -0
- package/dist/twins/packs/replicate/index.mjs +2 -0
- package/dist/twins/packs/resend/LICENSE +202 -0
- package/dist/twins/packs/resend/NOTICE +7 -0
- package/dist/twins/packs/resend/index.mjs +139 -0
- package/dist/twins/packs/runhuman/LICENSE +202 -0
- package/dist/twins/packs/runhuman/NOTICE +7 -0
- package/dist/twins/packs/runhuman/index.mjs +3 -0
- package/dist/twins/packs/scrapecreators/LICENSE +202 -0
- package/dist/twins/packs/scrapecreators/NOTICE +7 -0
- package/dist/twins/packs/scrapecreators/index.mjs +2 -0
- package/dist/twins/packs/segment/LICENSE +202 -0
- package/dist/twins/packs/segment/NOTICE +8 -0
- package/dist/twins/packs/segment/index.mjs +2 -0
- package/dist/twins/packs/sendblue/LICENSE +202 -0
- package/dist/twins/packs/sendblue/NOTICE +7 -0
- package/dist/twins/packs/sendblue/index.mjs +2 -0
- package/dist/twins/packs/sendgrid/LICENSE +202 -0
- package/dist/twins/packs/sendgrid/NOTICE +8 -0
- package/dist/twins/packs/sendgrid/index.mjs +4 -0
- package/dist/twins/packs/sentry/LICENSE +202 -0
- package/dist/twins/packs/sentry/NOTICE +7 -0
- package/dist/twins/packs/sentry/index.mjs +5 -0
- package/dist/twins/packs/sigstore/LICENSE +202 -0
- package/dist/twins/packs/sigstore/NOTICE +7 -0
- package/dist/twins/packs/sigstore/index.mjs +12 -0
- package/dist/twins/packs/slack/LICENSE +202 -0
- package/dist/twins/packs/slack/NOTICE +7 -0
- package/dist/twins/packs/slack/index.mjs +66 -0
- package/dist/twins/packs/smtp/LICENSE +202 -0
- package/dist/twins/packs/smtp/NOTICE +7 -0
- package/dist/twins/packs/smtp/index.mjs +3 -0
- package/dist/twins/packs/snowflake/LICENSE +202 -0
- package/dist/twins/packs/snowflake/NOTICE +8 -0
- package/dist/twins/packs/snowflake/index.mjs +30 -0
- package/dist/twins/packs/stigg/LICENSE +202 -0
- package/dist/twins/packs/stigg/NOTICE +8 -0
- package/dist/twins/packs/stigg/index.mjs +22194 -0
- package/dist/twins/packs/stream/LICENSE +202 -0
- package/dist/twins/packs/stream/NOTICE +7 -0
- package/dist/twins/packs/stream/index.mjs +2 -0
- package/dist/twins/packs/stripe/LICENSE +202 -0
- package/dist/twins/packs/stripe/NOTICE +7 -0
- package/dist/twins/packs/stripe/index.mjs +211 -0
- package/dist/twins/packs/supabase/LICENSE +202 -0
- package/dist/twins/packs/supabase/NOTICE +7 -0
- package/dist/twins/packs/supabase/index.mjs +2 -0
- package/dist/twins/packs/supermemory/LICENSE +202 -0
- package/dist/twins/packs/supermemory/NOTICE +7 -0
- package/dist/twins/packs/supermemory/index.mjs +2 -0
- package/dist/twins/packs/svix/LICENSE +202 -0
- package/dist/twins/packs/svix/NOTICE +7 -0
- package/dist/twins/packs/svix/index.mjs +2 -0
- package/dist/twins/packs/tavily/LICENSE +202 -0
- package/dist/twins/packs/tavily/NOTICE +7 -0
- package/dist/twins/packs/tavily/index.mjs +2 -0
- package/dist/twins/packs/telegram/LICENSE +202 -0
- package/dist/twins/packs/telegram/NOTICE +7 -0
- package/dist/twins/packs/telegram/index.mjs +11 -0
- package/dist/twins/packs/temporal/LICENSE +202 -0
- package/dist/twins/packs/temporal/NOTICE +7 -0
- package/dist/twins/packs/temporal/index.mjs +44 -0
- package/dist/twins/packs/tiktok/LICENSE +202 -0
- package/dist/twins/packs/tiktok/NOTICE +7 -0
- package/dist/twins/packs/tiktok/index.mjs +2 -0
- package/dist/twins/packs/tinybird/LICENSE +202 -0
- package/dist/twins/packs/tinybird/NOTICE +7 -0
- package/dist/twins/packs/tinybird/index.mjs +50 -0
- package/dist/twins/packs/togetherai/LICENSE +202 -0
- package/dist/twins/packs/togetherai/NOTICE +7 -0
- package/dist/twins/packs/togetherai/index.mjs +11 -0
- package/dist/twins/packs/tremendous/LICENSE +202 -0
- package/dist/twins/packs/tremendous/NOTICE +7 -0
- package/dist/twins/packs/tremendous/index.mjs +2 -0
- package/dist/twins/packs/tripo/LICENSE +202 -0
- package/dist/twins/packs/tripo/NOTICE +7 -0
- package/dist/twins/packs/tripo/index.mjs +9 -0
- package/dist/twins/packs/tunnel/LICENSE +202 -0
- package/dist/twins/packs/tunnel/NOTICE +7 -0
- package/dist/twins/packs/tunnel/index.mjs +2 -0
- package/dist/twins/packs/twelvelabs/LICENSE +202 -0
- package/dist/twins/packs/twelvelabs/NOTICE +7 -0
- package/dist/twins/packs/twelvelabs/index.mjs +5 -0
- package/dist/twins/packs/twilio/LICENSE +202 -0
- package/dist/twins/packs/twilio/NOTICE +7 -0
- package/dist/twins/packs/twilio/index.mjs +2 -0
- package/dist/twins/packs/twitch/LICENSE +202 -0
- package/dist/twins/packs/twitch/NOTICE +7 -0
- package/dist/twins/packs/twitch/index.mjs +68 -0
- package/dist/twins/packs/upstash/LICENSE +202 -0
- package/dist/twins/packs/upstash/NOTICE +7 -0
- package/dist/twins/packs/upstash/index.mjs +14 -0
- package/dist/twins/packs/upstashvector/LICENSE +202 -0
- package/dist/twins/packs/upstashvector/NOTICE +7 -0
- package/dist/twins/packs/upstashvector/index.mjs +3 -0
- package/dist/twins/packs/vercel/LICENSE +202 -0
- package/dist/twins/packs/vercel/NOTICE +7 -0
- package/dist/twins/packs/vercel/index.mjs +10 -0
- package/dist/twins/packs/veriff/LICENSE +202 -0
- package/dist/twins/packs/veriff/NOTICE +7 -0
- package/dist/twins/packs/veriff/index.mjs +2 -0
- package/dist/twins/packs/vgauth/LICENSE +202 -0
- package/dist/twins/packs/vgauth/NOTICE +7 -0
- package/dist/twins/packs/vgauth/index.mjs +2 -0
- package/dist/twins/packs/vital/LICENSE +202 -0
- package/dist/twins/packs/vital/NOTICE +7 -0
- package/dist/twins/packs/vital/index.mjs +2 -0
- package/dist/twins/packs/volteridentity/LICENSE +202 -0
- package/dist/twins/packs/volteridentity/NOTICE +7 -0
- package/dist/twins/packs/volteridentity/index.mjs +2 -0
- package/dist/twins/packs/webrisk/LICENSE +202 -0
- package/dist/twins/packs/webrisk/NOTICE +7 -0
- package/dist/twins/packs/webrisk/index.mjs +2 -0
- package/dist/twins/packs/worldlabs/LICENSE +202 -0
- package/dist/twins/packs/worldlabs/NOTICE +7 -0
- package/dist/twins/packs/worldlabs/index.mjs +2 -0
- package/dist/twins/packs/x/LICENSE +202 -0
- package/dist/twins/packs/x/NOTICE +7 -0
- package/dist/twins/packs/x/index.mjs +63 -0
- package/dist/twins/packs/xai/LICENSE +202 -0
- package/dist/twins/packs/xai/NOTICE +7 -0
- package/dist/twins/packs/xai/index.mjs +4 -0
- package/dist/twins/packs/xidentity/LICENSE +202 -0
- package/dist/twins/packs/xidentity/NOTICE +8 -0
- package/dist/twins/packs/xidentity/index.mjs +209 -0
- package/dist/twins/packs/youtube/LICENSE +202 -0
- package/dist/twins/packs/youtube/NOTICE +7 -0
- package/dist/twins/packs/youtube/index.mjs +5 -0
- package/dist/worker.js +442 -18
- package/dist/world-host.js +928 -91
- package/package.json +5 -4
- package/dist/dashboard/assets/dashboard/bay-morning.png +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-afternoon.png +0 -0
- package/dist/dashboard/assets/dashboard/golden-gate-portrait.png +0 -0
- package/dist/dashboard/assets/dashboard/moonlit-coast.png +0 -0
- package/dist/dashboard/assets/next/static/chunks/2868-424d32cfc8ae81c9.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-f9fca2c08f779fa0.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-bc480c9258e5cc4d.js +0 -1
- package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-f04c0b236abaead3.js +0 -1
- package/dist/dashboard/assets/next/static/css/4af3c8ca0da0f48b.css +0 -1
- package/dist/dashboard/assets/next/static/css/6b8edde77e493a51.css +0 -1
- package/dist/dashboard/assets/next/static/media/bay-morning.1a9f358c.png +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.3e7cea58.png +0 -0
- package/dist/dashboard/assets/next/static/media/golden-gate-portrait.7941528f.png +0 -0
- package/dist/dashboard/assets/next/static/media/moonlit-coast.bbe901a1.png +0 -0
- /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → 8f121VqXS9LLPMmYd1SRn}/_buildManifest.js +0 -0
- /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → 8f121VqXS9LLPMmYd1SRn}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
|
|
2
|
+
var $e=Object.defineProperty;var De=(e,t)=>{for(var a in t)$e(e,a,{get:t[a],enumerable:!0})};import{packOf as mt,registerPack as pt}from"../../engine/v3/volter_world-core.mjs";function ae(e,t,a){let s=e.row(t.storedType,String(t.body.id??""),{withDeleted:!0})??t.body;if(a==="email.received")return{email_id:s.id,created_at:s.created_at,from:s.from,to:s.to,subject:s.subject,message_id:s.message_id,bcc:s.bcc??[],cc:s.cc??[],received_for:s.to,attachments:[]};let r=Object.fromEntries((s.tags??[]).map(n=>[String(n.name),String(n.value)])),i={email_id:s.id,created_at:new Date(Date.parse(String(s._created_iso))).toISOString(),from:s.from,to:a==="email.bounced"?s._bounced_to:s.to,subject:s.subject,...Object.keys(r).length?{tags:r}:{}};return a==="email.bounced"?{...i,bounce:{diagnosticCode:(s._bounced_to??[]).map(()=>"smtp; 550 5.1.1 user unknown"),message:"The recipient's mail server permanently rejected the email.",subType:"General",type:"Permanent"}}:a==="email.opened"?{...i,to:[s._opened_by]}:a==="email.complained"?{...i,to:[s._complained_by]}:i}function se(e,t){return{$team:(e.row(t.storedType,String(t.body.id??""),{withDeleted:!0})??t.body)._team}}var O=(e,t,a)=>({actor:"vendor",from:e,to:t,source:a}),z=(e,t,a)=>({actor:"external",from:e,to:t,source:a}),C='spec:/components/schemas/Email/properties/last_event "The status of the email."',Ie={initial:"queued",transitions:[O(["queued"],"sent",C),O(["queued"],"scheduled",'spec:/components/schemas/SendEmailRequest/properties/scheduled_at "Schedule email to be sent later."'),{actor:"time",from:["scheduled"],to:"queued",source:'spec:/components/schemas/SendEmailRequest/properties/scheduled_at "Schedule email to be sent later."'},O(["sent"],"delivered",C),O(["sent"],"bounced",C),z(["delivered"],"opened",C),z(["delivered","opened"],"clicked",C),z(["delivered","opened","clicked"],"complained",C)]},re="https://resend.com/docs/add-a-domain",Ge={initial:"not_started",transitions:[{operation:"domains/verify",from:["not_started","failed","pending"],to:"pending",source:"https://resend.com/docs/api-reference/domains/verify-domain"},{actor:"time",from:["pending"],to:"verified",source:re},{actor:"time",from:["pending"],to:"failed",source:re}]},Le={initial:"active",transitions:[z(["active"],"deleted","https://resend.com/docs/dashboard/api-keys/introduction")]},M={email:{state:{last_event:Ie}},domain:{state:{status:Ge}},_api_key:{state:{status:Le}}};var U={vendor:"resend",service:"resend",body:{json:"always"},ids:{template:"{uuid}"},time:"iso",error:{statusCode:"{status}",name:"{code}",message:"{message}"},defaultKind:"validation_error",readOnly:{status:405,code:"method_not_allowed",message:"Method is not allowed for the requested path."},malformedBody:{status:422,code:"validation_error",message:"The request body is not valid JSON."},notFound:{status:404,code:"not_found",message:"The requested endpoint does not exist."},gap:{status:404,code:"not_found",message:"The requested endpoint does not exist."},list:{style:"envelope",envelope:{object:"list",has_more:"{has_more}",data:"{data}"},limit:{param:"limit",default:20,max:100},after:"after"},unmodeled:["audiences/create-contact","audiences/remove-contact"],deleted:{object:"{object}",id:"{id}",deleted:!0},events:{scheme:{kind:"webhook-id",prefix:"svix",secretPrefix:"whsec_"},headers:{"content-type":"application/json"},types:{"email.send":"email.sent","email.deliver":"email.delivered","email.bounce":"email.bounced","email.open":"email.opened","email.click":"email.clicked","email.complain":"email.complained","email.receive":"email.received"},envelope:{type:"$type",created_at:"$time.iso",data:"$data"},render:ae,values:se,endpoints:{storedAs:"_webhook",url:"endpoint",secret:"signing_secret",filter:"events",status:{field:"status",live:"enabled"},match:{_team:"$team"}},record:"_webhook_delivery"},doors:[{id:"keys",method:"POST",path:"/_twin/api-keys",note:"{ name }: a full-access key, as the API Keys page makes it (shown once)"},{id:"removeKey",method:"DELETE",path:"/_twin/api-keys/{id}",note:"a key deleted on the API Keys page"},{id:"appCredentials",method:"POST",path:"/_twin/app-credentials",note:"the key the World's application holds, as the runtime issues it at every boot"},{id:"webhooks",method:"POST",path:"/_twin/webhooks",note:"{ endpoint, events }: an endpoint added on the Webhooks page, its signing secret answered"},{id:"dns",method:"POST",path:"/_twin/dns",note:"{ name, type, value }: a record the domain's owner sets at their DNS host"},{id:"recipients",method:"POST",path:"/_twin/recipients/{domain}",note:"{ rejects }: whether an outside mail server refuses mail for its domain"},{id:"open",method:"POST",path:"/_twin/mail/{email_id}/open",note:"{ to }: the recipient opens the email"},{id:"complain",method:"POST",path:"/_twin/mail/{email_id}/complain",note:"{ to }: the recipient marks it as spam"},{id:"inbound",method:"POST",path:"/_twin/inbound",note:"{ from, to, subject, text, html? }: mail sent from outside to an address at a receiving domain"},{id:"mail",method:"GET",path:"/_twin/mail",note:"?to=<address>: what reached that address's inbox"},{id:"deliveries",method:"GET",path:"/_twin/deliveries",note:"?to=<url>[&type=][&email=]: the webhooks Resend sent there, oldest first"}],screens:[{id:"emails",kind:"workspace",host:"resend.com",path:"/emails",demand:"An operator inspects SDK-sent email rows and their content in the familiar Emails list and detail view",status:"done",source:"https://resend.com/docs/dashboard/emails/manage-emails"},{id:"inbound-cdn",kind:"content",host:"inbound-cdn.resend.com",path:"/",demand:"Twenty downloads a received email's raw message at its pre-signed URL",status:"done",source:"https://resend.com/docs/api-reference/emails/retrieve-received-email"}],ingest:{scheme:{kind:"webhook-id",prefix:"svix",secretPrefix:"whsec_"},type:{body:"type"},object:"data",types:{"email.delivered":{resource:"email",id:"email_id",fields:{last_event:"delivered"}},"email.bounced":{resource:"email",id:"email_id",fields:{last_event:"bounced"}},"email.opened":{resource:"email",id:"email_id",fields:{last_event:"opened"}},"email.complained":{resource:"email",id:"email_id",fields:{last_event:"complained"}},"email.failed":{resource:"email",id:"email_id",fields:{last_event:"failed"}},"email.received":{resource:"GetReceivedEmailResponse",id:"email_id"}}},rateBudget:{allowance:{perMinute:600,source:"https://resend.com/docs/api-reference/rate-limit"},reason:"Resend's default limit is 10 requests a second per team, across all its API keys, answering 429 with retry-after over it (https://resend.com/docs/api-reference/rate-limit); the World allows 120 requests in a fixed minute window",windowMs:6e4,ceiling:120,defaultWeight:1,maxRetryAfterSeconds:300},discovery:{twinOf:"the Resend email API",stores:"API keys, domains, sent and received emails, webhook endpoints and deliveries"},resources:{email:{idPrefix:"",...M.email,refresh:{list:"emails/list",detail:"emails/get"}},domain:{idPrefix:"",...M.domain,refresh:{list:"domains/list",detail:"domains/get"}},_api_key:{idPrefix:"",...M._api_key},GetReceivedEmailResponse:{idPrefix:"",storedAs:"received",refresh:{list:"emails/list-receiving",items:"data",detail:"emails/get-receiving"}},_webhook:{idPrefix:""},_attachment_id:{idPrefix:""},_webhook_delivery:{idPrefix:""},_dns:{idPrefix:""},_recipient_domain:{idPrefix:""}},descriptor:{protocol:"3",transport:"rest",archetype:"crud",bin:"world-resend",resources:["email","domain","received"],specSource:"Resend's OpenAPI document (spec/, provenance in spec/SOURCE.md)",description:"Resend email API twin \u2014 emails sent singly and in batches and their lifecycle, sending domains verified against their DNS, received emails, and svix-signed webhooks; keys and endpoints made on the dashboard.",adoption:{pypi:["resend"],sdks:["resend"],envStems:["RESEND","NEXTPRIVATERESEND"]},hosts:[{host:"api.resend.com"},{host:"inbound-cdn.resend.com"},{host:"resend.com",pathPattern:"^/emails(?:/|$)"}],credentialDoor:{path:"/_twin/app-credentials",body:{},fill:{RESEND_API_KEY:"token"}}}};var B={generatedBy:"scripts/derive-pack.ts",spec:"openapi.json.gz",format:"openapi",version:"1.5.1",resources:[{name:"ApiKey",schema:"ApiKey",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"last_used_at",type:"string|null",nullable:!1},{name:"name",type:"string",nullable:!1}],stateCandidates:[],expandable:[]},{name:"Automation",schema:"Automation",fields:[{name:"connections",type:"array",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["enabled","disabled"]},{name:"steps",type:"array",nullable:!1},{name:"updated_at",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:["disabled","enabled"]}],expandable:[]},{name:"AutomationListItem",schema:"AutomationListItem",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["enabled","disabled"]},{name:"updated_at",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:["disabled","enabled"]}],expandable:[]},{name:"AutomationRun",schema:"AutomationRun",fields:[{name:"completed_at",type:"string|null",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"started_at",type:"string|null",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["running","completed","failed","cancelled"]},{name:"steps",type:"array",nullable:!1}],stateCandidates:[{field:"status",values:["cancelled","completed","failed","running"]}],expandable:[]},{name:"AutomationRunListItem",schema:"AutomationRunListItem",fields:[{name:"completed_at",type:"string|null",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"started_at",type:"string|null",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["running","completed","failed","cancelled"]}],stateCandidates:[{field:"status",values:["cancelled","completed","failed","running"]}],expandable:[]},{name:"ContactImport",schema:"ContactImport",fields:[{name:"completed_at",type:"string|null",nullable:!1},{name:"counts",type:"ContactImportCounts",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["queued","in_progress","completed","failed"]}],stateCandidates:[{field:"status",values:["completed","failed","in_progress","queued"]}],expandable:[]},{name:"Domain",schema:"Domain",fields:[{name:"capabilities",type:"DomainCapabilities",nullable:!1},{name:"click_tracking",type:"boolean",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"open_tracking",type:"boolean",nullable:!1},{name:"records",type:"array",nullable:!1},{name:"region",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["pending","verified","failed","not_started","partially_verified","partially_failed"]},{name:"tracking_subdomain",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:["failed","not_started","partially_failed","partially_verified","pending","verified"]}],expandable:[]},{name:"DomainClaim",schema:"DomainClaim",fields:[{name:"blocked_reason",type:"string|null",nullable:!1,enum:["grace_period","recent_owner_activity","pending_scheduled_emails","null"]},{name:"created_at",type:"string",nullable:!1},{name:"domain_id",type:"string|null",nullable:!1},{name:"expires_at",type:"string",nullable:!1},{name:"failure_reason",type:"string|null",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"record",type:"DomainClaimRecord",nullable:!1},{name:"region",type:"string|null",nullable:!1,enum:["us-east-1","eu-west-1","sa-east-1","ap-northeast-1","null"]},{name:"status",type:"string",nullable:!1,enum:["pending","verified","completed","blocked","expired","superseded","canceled","failed"]}],stateCandidates:[{field:"blocked_reason",values:["grace_period","null","pending_scheduled_emails","recent_owner_activity"]},{field:"region",values:["ap-northeast-1","eu-west-1","null","sa-east-1","us-east-1"]},{field:"status",values:["blocked","canceled","completed","expired","failed","pending","superseded","verified"]}],expandable:[]},{name:"Email",schema:"Email",fields:[{name:"bcc",type:"array",nullable:!1},{name:"cc",type:"array",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"from",type:"string",nullable:!1},{name:"html",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"last_event",type:"string",nullable:!1,enum:["bounced","canceled","clicked","complained","delivered","delivery_delayed","failed","opened","queued","scheduled","sent","suppressed"]},{name:"message_id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"reply_to",type:"array",nullable:!1},{name:"scheduled_at",type:"string|null",nullable:!1},{name:"subject",type:"string",nullable:!1},{name:"tags",type:"array",nullable:!1},{name:"text",type:"string",nullable:!1},{name:"to",type:"array",nullable:!1}],stateCandidates:[{field:"last_event",values:["bounced","canceled","clicked","complained","delivered","delivery_delayed","failed","opened","queued","scheduled","sent","suppressed"]}],expandable:[]},{name:"EmailMetricsDataRow",schema:"EmailMetricsDataRow",fields:[{name:"broadcast_id",type:"string",nullable:!1},{name:"broadcast_name",type:"string",nullable:!1},{name:"domain_id",type:"string",nullable:!1},{name:"domain_name",type:"string",nullable:!1},{name:"email_id",type:"string",nullable:!1},{name:"period",type:"string",nullable:!1}],stateCandidates:[],expandable:[]},{name:"Event",schema:"Event",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"schema",type:"object|null",nullable:!1},{name:"updated_at",type:"string|null",nullable:!1}],stateCandidates:[],expandable:[]},{name:"EventSummary",schema:"EventSummary",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"schema",type:"object|null",nullable:!1},{name:"updated_at",type:"string|null",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetAudienceResponseSuccess",schema:"GetAudienceResponseSuccess",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetBroadcastResponseSuccess",schema:"GetBroadcastResponseSuccess",fields:[{name:"audience_id",type:"string|null",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"from",type:"string",nullable:!1},{name:"html",type:"string|null",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"preview_text",type:"string",nullable:!1},{name:"reply_to",type:"array",nullable:!1},{name:"scheduled_at",type:"string",nullable:!1},{name:"segment_id",type:"string|null",nullable:!1},{name:"sent_at",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["draft","scheduled","queued","sent","canceled"]},{name:"subject",type:"string",nullable:!1},{name:"text",type:"string|null",nullable:!1},{name:"topic_id",type:"string|null",nullable:!1}],stateCandidates:[{field:"status",values:["canceled","draft","queued","scheduled","sent"]}],expandable:[]},{name:"GetContactImportResponseSuccess",schema:"GetContactImportResponseSuccess",fields:[{name:"completed_at",type:"string|null",nullable:!1},{name:"counts",type:"ContactImportCounts",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["queued","in_progress","completed","failed"]}],stateCandidates:[{field:"status",values:["completed","failed","in_progress","queued"]}],expandable:[]},{name:"GetContactPropertyResponseSuccess",schema:"GetContactPropertyResponseSuccess",fields:[{name:"created_at",type:"string",nullable:!1},{name:"fallback_value",type:"union",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"key",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"type",type:"string",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetContactResponseSuccess",schema:"GetContactResponseSuccess",fields:[{name:"created_at",type:"string",nullable:!1},{name:"email",type:"string",nullable:!1},{name:"first_name",type:"string|null",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"last_name",type:"string|null",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"properties",type:"object",nullable:!1},{name:"unsubscribed",type:"boolean",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetReceivedEmailResponse",schema:"GetReceivedEmailResponse",fields:[{name:"attachments",type:"array",nullable:!1},{name:"authentication",type:"object",nullable:!1},{name:"bcc",type:"array|null",nullable:!1},{name:"cc",type:"array|null",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"from",type:"string",nullable:!1},{name:"headers",type:"object|null",nullable:!1},{name:"html",type:"string|null",nullable:!1},{name:"html_format",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"message_id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"raw",type:"object",nullable:!1},{name:"received_for",type:"array",nullable:!1},{name:"reply_to",type:"array|null",nullable:!1},{name:"subject",type:"string",nullable:!1},{name:"text",type:"string|null",nullable:!1},{name:"to",type:"array",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetSegmentResponseSuccess",schema:"GetSegmentResponseSuccess",fields:[{name:"audience_id",type:"string",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"filter",type:"object",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1}],stateCandidates:[],expandable:[]},{name:"GetSuppressionResponseSuccess",schema:"GetSuppressionResponseSuccess",fields:[{name:"created_at",type:"string",nullable:!1},{name:"email",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"origin",type:"string",nullable:!1,enum:["bounce","complaint","manual"]},{name:"source_id",type:"string",nullable:!0}],stateCandidates:[{field:"origin",values:["bounce","complaint","manual"]}],expandable:[]},{name:"GetTopicResponseSuccess",schema:"GetTopicResponseSuccess",fields:[{name:"created_at",type:"string",nullable:!1},{name:"default_subscription",type:"string",nullable:!1,enum:["opt_in","opt_out"]},{name:"description",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"visibility",type:"string",nullable:!1,enum:["public","private"]}],stateCandidates:[{field:"default_subscription",values:["opt_in","opt_out"]},{field:"visibility",values:["private","public"]}],expandable:[]},{name:"GetWebhookEventResponse",schema:"GetWebhookEventResponse",fields:[{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"next_attempt_at",type:"string|null",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"payload",type:"object",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["pending","attempting","success","failed"]},{name:"type",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:["attempting","failed","pending","success"]}],expandable:[]},{name:"GetWebhookResponse",schema:"GetWebhookResponse",fields:[{name:"created_at",type:"string",nullable:!1},{name:"endpoint",type:"string",nullable:!1},{name:"events",type:"array|null",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"signing_secret",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:[]}],expandable:[]},{name:"ListDomainsItem",schema:"ListDomainsItem",fields:[{name:"capabilities",type:"DomainCapabilities",nullable:!1},{name:"click_tracking",type:"boolean",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"open_tracking",type:"boolean",nullable:!1},{name:"region",type:"string",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["pending","verified","failed","not_started","partially_verified","partially_failed"]}],stateCandidates:[{field:"status",values:["failed","not_started","partially_failed","partially_verified","pending","verified"]}],expandable:[]},{name:"Log",schema:"Log",fields:[{name:"created_at",type:"string",nullable:!1},{name:"endpoint",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"method",type:"string",nullable:!1,enum:["GET","POST","PUT","DELETE","PATCH","OPTIONS"]},{name:"object",type:"string",nullable:!1},{name:"request_body",type:"object|null",nullable:!1},{name:"response_body",type:"object|null",nullable:!1},{name:"response_status",type:"integer",nullable:!1},{name:"user_agent",type:"string|null",nullable:!1}],stateCandidates:[{field:"method",values:["DELETE","GET","OPTIONS","PATCH","POST","PUT"]}],expandable:[]},{name:"LogSummary",schema:"LogSummary",fields:[{name:"created_at",type:"string",nullable:!1},{name:"endpoint",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"method",type:"string",nullable:!1,enum:["GET","POST","PUT","DELETE","PATCH","OPTIONS"]},{name:"response_status",type:"integer",nullable:!1},{name:"user_agent",type:"string|null",nullable:!1}],stateCandidates:[{field:"method",values:["DELETE","GET","OPTIONS","PATCH","POST","PUT"]}],expandable:[]},{name:"OAuthGrant",schema:"OAuthGrant",fields:[{name:"client",type:"object",nullable:!1},{name:"client_id",type:"string",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"revoked_at",type:"string|null",nullable:!1},{name:"revoked_reason",type:"string|null",nullable:!1},{name:"scopes",type:"array",nullable:!1}],stateCandidates:[],expandable:[]},{name:"RetrievedAttachment",schema:"RetrievedAttachment",fields:[{name:"content_disposition",type:"string",nullable:!0,enum:["inline","attachment"]},{name:"content_id",type:"string",nullable:!1},{name:"content_type",type:"string",nullable:!1},{name:"download_url",type:"string",nullable:!1},{name:"expires_at",type:"string",nullable:!1},{name:"filename",type:"string",nullable:!0},{name:"id",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"size",type:"integer",nullable:!1}],stateCandidates:[{field:"content_disposition",values:["attachment","inline"]}],expandable:[]},{name:"Template",schema:"Template",fields:[{name:"alias",type:"string",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"current_version_id",type:"string",nullable:!1},{name:"from",type:"string",nullable:!1},{name:"has_unpublished_versions",type:"boolean",nullable:!1},{name:"html",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"object",type:"string",nullable:!1},{name:"published_at",type:"string|null",nullable:!1},{name:"reply_to",type:"array|null",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["draft","published"]},{name:"subject",type:"string",nullable:!1},{name:"text",type:"string",nullable:!1},{name:"updated_at",type:"string",nullable:!1},{name:"variables",type:"array",nullable:!1}],stateCandidates:[{field:"status",values:["draft","published"]}],expandable:[]},{name:"TemplateListItem",schema:"TemplateListItem",fields:[{name:"alias",type:"string",nullable:!1},{name:"created_at",type:"string",nullable:!1},{name:"id",type:"string",nullable:!1},{name:"name",type:"string",nullable:!1},{name:"published_at",type:"string|null",nullable:!1},{name:"status",type:"string",nullable:!1,enum:["draft","published"]},{name:"updated_at",type:"string",nullable:!1}],stateCandidates:[{field:"status",values:["draft","published"]}],expandable:[]}],operations:[{id:"api-keys/list",method:"get",path:"/api-keys",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"ApiKey",list:!0},class:"list",resource:"ApiKey"},{id:"api-keys/create",method:"post",path:"/api-keys",pathParams:[],query:[],body:[{name:"domain_id",type:"string",required:!1},{name:"name",type:"string",required:!0},{name:"permission",type:"string",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"api-keys/update",method:"patch",path:"/api-keys/{api_key_id}",pathParams:["api_key_id"],query:[],body:[{name:"name",type:"string",required:!0}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"api-keys/remove",method:"delete",path:"/api-keys/{api_key_id}",pathParams:["api_key_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete"},{id:"audiences/list",method:"get",path:"/audiences",pathParams:[],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListAudiencesResponseSuccess"},{id:"audiences/create",method:"post",path:"/audiences",pathParams:[],query:[],body:[{name:"name",type:"string",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"audiences/create-contact",method:"post",path:"/audiences/{audience_id}/contacts",pathParams:["audience_id"],query:[],body:[{name:"email",type:"string",required:!0},{name:"first_name",type:"string",required:!1},{name:"last_name",type:"string",required:!1},{name:"unsubscribed",type:"boolean",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"audiences/remove-contact",method:"delete",path:"/audiences/{audience_id}/contacts/{id}",pathParams:["audience_id","id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete"},{id:"audiences/get",method:"get",path:"/audiences/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetAudienceResponseSuccess",list:!1},class:"retrieve",resource:"GetAudienceResponseSuccess"},{id:"audiences/remove",method:"delete",path:"/audiences/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetAudienceResponseSuccess"},{id:"automations/list",method:"get",path:"/automations",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100},{name:"status",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"AutomationListItem",list:!0},class:"list",resource:"AutomationListItem"},{id:"automations/create",method:"post",path:"/automations",pathParams:[],query:[],body:[{name:"connections",type:"array",required:!0},{name:"name",type:"string",required:!0},{name:"status",type:"string",required:!1},{name:"steps",type:"array",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"automations/get",method:"get",path:"/automations/{automation_id}",pathParams:["automation_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Automation",list:!1},class:"retrieve",resource:"Automation"},{id:"automations/update",method:"patch",path:"/automations/{automation_id}",pathParams:["automation_id"],query:[],body:[{name:"connections",type:"array",required:!1},{name:"name",type:"string",required:!1},{name:"status",type:"string",required:!1},{name:"steps",type:"array",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"automations/remove",method:"delete",path:"/automations/{automation_id}",pathParams:["automation_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"Automation"},{id:"automations/duplicate",method:"post",path:"/automations/{automation_id}/duplicate",pathParams:["automation_id"],query:[],body:[],bodyEncoding:"none",successStatus:201,credentials:["bearerAuth"],class:"action",resource:"Automation"},{id:"automations/list-runs",method:"get",path:"/automations/{automation_id}/runs",pathParams:["automation_id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100},{name:"status",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"AutomationRunListItem",list:!0},class:"list",resource:"AutomationRunListItem"},{id:"automations/get-run",method:"get",path:"/automations/{automation_id}/runs/{run_id}",pathParams:["automation_id","run_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"AutomationRun",list:!1},class:"retrieve",resource:"AutomationRun"},{id:"automations/stop",method:"post",path:"/automations/{automation_id}/stop",pathParams:["automation_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"Automation"},{id:"broadcasts/list",method:"get",path:"/broadcasts",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListBroadcastsResponseSuccess"},{id:"broadcasts/create",method:"post",path:"/broadcasts",pathParams:[],query:[],body:[{name:"audience_id",type:"string",required:!1},{name:"from",type:"string",required:!0},{name:"html",type:"string",required:!1},{name:"name",type:"string",required:!1},{name:"preview_text",type:"string",required:!1},{name:"reply_to",type:"array",required:!1},{name:"scheduled_at",type:"string",required:!1},{name:"segment_id",type:"string",required:!0},{name:"send",type:"boolean",required:!1},{name:"subject",type:"string",required:!0},{name:"text",type:"string",required:!1},{name:"topic_id",type:"string",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"broadcasts/get",method:"get",path:"/broadcasts/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetBroadcastResponseSuccess",list:!1},class:"retrieve",resource:"GetBroadcastResponseSuccess"},{id:"broadcasts/update",method:"patch",path:"/broadcasts/{id}",pathParams:["id"],query:[],body:[{name:"audience_id",type:"string",required:!1},{name:"from",type:"string",required:!1},{name:"html",type:"string",required:!1},{name:"name",type:"string",required:!1},{name:"preview_text",type:"string",required:!1},{name:"reply_to",type:"array",required:!1},{name:"segment_id",type:"string",required:!1},{name:"subject",type:"string",required:!1},{name:"text",type:"string",required:!1},{name:"topic_id",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"broadcasts/remove",method:"delete",path:"/broadcasts/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetBroadcastResponseSuccess"},{id:"broadcasts/cancel",method:"post",path:"/broadcasts/{id}/cancel",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"GetBroadcastResponseSuccess"},{id:"broadcasts/list-clicked-links",method:"get",path:"/broadcasts/{id}/clicked-links",pathParams:["id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListBroadcastClickedLinksResponseSuccess"},{id:"broadcasts/duplicate",method:"post",path:"/broadcasts/{id}/duplicate",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:201,credentials:["bearerAuth"],class:"action",resource:"GetBroadcastResponseSuccess"},{id:"broadcasts/recipients",method:"get",path:"/broadcasts/{id}/recipients",pathParams:["id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"bounce_type",type:"string",required:!1},{name:"email",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100},{name:"type",type:"string",required:!0}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListBroadcastRecipientsResponseSuccess"},{id:"broadcasts/send",method:"post",path:"/broadcasts/{id}/send",pathParams:["id"],query:[],body:[{name:"scheduled_at",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"GetBroadcastResponseSuccess"},{id:"contact-properties/list",method:"get",path:"/contact-properties",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListContactPropertiesResponseSuccess"},{id:"contact-properties/create",method:"post",path:"/contact-properties",pathParams:[],query:[],body:[{name:"fallback_value",type:"union",required:!1},{name:"key",type:"string",required:!0},{name:"type",type:"string",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"contact-properties/get",method:"get",path:"/contact-properties/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetContactPropertyResponseSuccess",list:!1},class:"retrieve",resource:"GetContactPropertyResponseSuccess"},{id:"contact-properties/update",method:"patch",path:"/contact-properties/{id}",pathParams:["id"],query:[],body:[{name:"fallback_value",type:"union",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"contact-properties/remove",method:"delete",path:"/contact-properties/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetContactPropertyResponseSuccess"},{id:"contacts/list",method:"get",path:"/contacts",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListContactsResponseSuccess"},{id:"contacts/create",method:"post",path:"/contacts",pathParams:[],query:[],body:[{name:"audience_id",type:"string",required:!1},{name:"email",type:"string",required:!0},{name:"first_name",type:"string",required:!1},{name:"last_name",type:"string",required:!1},{name:"properties",type:"object",required:!1},{name:"segments",type:"array",required:!1},{name:"topics",type:"array",required:!1},{name:"unsubscribed",type:"boolean",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"contacts/list-segments",method:"get",path:"/contacts/{contact_id}/segments",pathParams:["contact_id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListContactSegmentsResponseSuccess"},{id:"contacts/add-segment",method:"post",path:"/contacts/{contact_id}/segments/{segment_id}",pathParams:["contact_id","segment_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"contacts/remove-segment",method:"delete",path:"/contacts/{contact_id}/segments/{segment_id}",pathParams:["contact_id","segment_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete"},{id:"contacts/list-topics",method:"get",path:"/contacts/{contact_id}/topics",pathParams:["contact_id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"GetContactTopicsResponseSuccess"},{id:"contacts/update-topics",method:"patch",path:"/contacts/{contact_id}/topics",pathParams:["contact_id"],query:[],body:[{name:"topics",type:"array",required:!0}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"update",resource:"GetContactTopicsResponseSuccess"},{id:"contacts/get",method:"get",path:"/contacts/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetContactResponseSuccess",list:!1},class:"retrieve",resource:"GetContactResponseSuccess"},{id:"contacts/update",method:"patch",path:"/contacts/{id}",pathParams:["id"],query:[],body:[{name:"email",type:"string",required:!1},{name:"first_name",type:"string",required:!1},{name:"last_name",type:"string",required:!1},{name:"properties",type:"object",required:!1},{name:"unsubscribed",type:"boolean",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"contacts/remove",method:"delete",path:"/contacts/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetContactResponseSuccess"},{id:"contacts/list-imports",method:"get",path:"/contacts/imports",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100},{name:"status",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"ContactImport",list:!0},class:"list",resource:"ContactImport"},{id:"contacts/create-import",method:"post",path:"/contacts/imports",pathParams:[],query:[],body:[{name:"column_map",type:"string",required:!1},{name:"file",type:"string",required:!0},{name:"on_conflict",type:"string",required:!1},{name:"segments",type:"string",required:!1},{name:"topics",type:"string",required:!1}],bodyEncoding:"multipart",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"contacts/get-import",method:"get",path:"/contacts/imports/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetContactImportResponseSuccess",list:!1},class:"retrieve",resource:"GetContactImportResponseSuccess"},{id:"domains/list",method:"get",path:"/domains",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"ListDomainsItem",list:!0},class:"list",resource:"ListDomainsItem"},{id:"domains/create",method:"post",path:"/domains",pathParams:[],query:[],body:[{name:"capabilities",type:"DomainCapabilities",required:!1},{name:"click_tracking",type:"boolean",required:!1},{name:"custom_return_path",type:"string",required:!1},{name:"name",type:"string",required:!0},{name:"open_tracking",type:"boolean",required:!1},{name:"region",type:"string",required:!1},{name:"tls",type:"string",required:!1},{name:"tracking_subdomain",type:"string",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"domains/get",method:"get",path:"/domains/{domain_id}",pathParams:["domain_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Domain",list:!1},class:"retrieve",resource:"Domain"},{id:"domains/update",method:"patch",path:"/domains/{domain_id}",pathParams:["domain_id"],query:[],body:[{name:"capabilities",type:"DomainCapabilities",required:!1},{name:"click_tracking",type:"boolean",required:!1},{name:"open_tracking",type:"boolean",required:!1},{name:"tls",type:"string",required:!1},{name:"tracking_subdomain",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"domains/remove",method:"delete",path:"/domains/{domain_id}",pathParams:["domain_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"Domain"},{id:"domains/get-claim",method:"get",path:"/domains/{domain_id}/claim",pathParams:["domain_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"DomainClaim",list:!1},class:"retrieve",resource:"DomainClaim"},{id:"domains/verify-claim",method:"post",path:"/domains/{domain_id}/claim/verify",pathParams:["domain_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"DomainClaim",list:!1},class:"action",resource:"DomainClaim"},{id:"domains/verify",method:"post",path:"/domains/{domain_id}/verify",pathParams:["domain_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"Domain"},{id:"domains/create-claim",method:"post",path:"/domains/claim",pathParams:[],query:[],body:[{name:"click_tracking",type:"boolean",required:!1},{name:"custom_return_path",type:"string",required:!1},{name:"name",type:"string",required:!0},{name:"open_tracking",type:"boolean",required:!1},{name:"region",type:"string",required:!1},{name:"tracking_subdomain",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],answers:{resource:"DomainClaim",list:!1},class:"action",resource:"DomainClaim"},{id:"emails/list",method:"get",path:"/emails",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Email",list:!0},class:"list",resource:"Email"},{id:"emails/send",method:"post",path:"/emails",pathParams:[],query:[],body:[{name:"attachments",type:"array",required:!1},{name:"bcc",type:"union",required:!1},{name:"cc",type:"union",required:!1},{name:"from",type:"string",required:!0},{name:"headers",type:"object",required:!1},{name:"html",type:"string",required:!1},{name:"reply_to",type:"union",required:!1},{name:"scheduled_at",type:"string",required:!1},{name:"subject",type:"string",required:!0},{name:"tags",type:"array",required:!1},{name:"template",type:"any",required:!1},{name:"text",type:"string",required:!1},{name:"to",type:"union",required:!0},{name:"topic_id",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"emails/get",method:"get",path:"/emails/{email_id}",pathParams:["email_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Email",list:!1},class:"retrieve",resource:"Email"},{id:"emails/update",method:"patch",path:"/emails/{email_id}",pathParams:["email_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"emails/list-attachments",method:"get",path:"/emails/{email_id}/attachments",pathParams:["email_id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListAttachmentsResponse"},{id:"emails/get-attachment",method:"get",path:"/emails/{email_id}/attachments/{attachment_id}",pathParams:["email_id","attachment_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"RetrievedAttachment",list:!1},class:"retrieve",resource:"RetrievedAttachment"},{id:"emails/cancel",method:"post",path:"/emails/{email_id}/cancel",pathParams:["email_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Email",list:!1},class:"action",resource:"Email"},{id:"emails/share",method:"post",path:"/emails/{email_id}/share",pathParams:["email_id"],query:[],body:[{name:"expires_in",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"Email"},{id:"emails/send-batch",method:"post",path:"/emails/batch",pathParams:[],query:[],body:[],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"emails/metrics",method:"get",path:"/emails/metrics",pathParams:[],query:[{name:"broadcast_id",type:"array",required:!1},{name:"dimensions",type:"array",required:!1},{name:"domain_id",type:"array",required:!1},{name:"email_id",type:"array",required:!1},{name:"end_date",type:"string",required:!1},{name:"granularity",type:"string",required:!1},{name:"metrics",type:"array",required:!1},{name:"start_date",type:"string",required:!1},{name:"timezone",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"EmailMetricsDataRow",list:!0},class:"list",resource:"EmailMetricsDataRow"},{id:"emails/list-receiving",method:"get",path:"/emails/receiving",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListReceivedEmailsResponse"},{id:"emails/get-receiving",method:"get",path:"/emails/receiving/{email_id}",pathParams:["email_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetReceivedEmailResponse",list:!1},class:"retrieve",resource:"GetReceivedEmailResponse"},{id:"emails/list-receiving-attachments",method:"get",path:"/emails/receiving/{email_id}/attachments",pathParams:["email_id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListAttachmentsResponse"},{id:"emails/get-receiving-attachment",method:"get",path:"/emails/receiving/{email_id}/attachments/{attachment_id}",pathParams:["email_id","attachment_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"RetrievedAttachment",list:!1},class:"retrieve",resource:"RetrievedAttachment"},{id:"events/list",method:"get",path:"/events",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"EventSummary",list:!0},class:"list",resource:"EventSummary"},{id:"events/create",method:"post",path:"/events",pathParams:[],query:[],body:[{name:"name",type:"string",required:!0},{name:"schema",type:"object|null",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"events/get",method:"get",path:"/events/{identifier}",pathParams:["identifier"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Event",list:!1},class:"retrieve",resource:"Event"},{id:"events/update",method:"patch",path:"/events/{identifier}",pathParams:["identifier"],query:[],body:[{name:"schema",type:"object|null",required:!0}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"events/remove",method:"delete",path:"/events/{identifier}",pathParams:["identifier"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"Event"},{id:"events/send",method:"post",path:"/events/send",pathParams:[],query:[],body:[{name:"contact_id",type:"string",required:!1},{name:"email",type:"string",required:!1},{name:"event",type:"string",required:!0},{name:"payload",type:"object",required:!1}],bodyEncoding:"json",successStatus:202,credentials:["bearerAuth"],class:"non-resource"},{id:"logs/list",method:"get",path:"/logs",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"LogSummary",list:!0},class:"list",resource:"LogSummary"},{id:"logs/get",method:"get",path:"/logs/{log_id}",pathParams:["log_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Log",list:!1},class:"retrieve",resource:"Log"},{id:"oauth/list-grants",method:"get",path:"/oauth/grants",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"OAuthGrant",list:!0},class:"list",resource:"OAuthGrant"},{id:"oauth/revoke-grant",method:"delete",path:"/oauth/grants/{oauth_grant_id}",pathParams:["oauth_grant_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete"},{id:"segments/list",method:"get",path:"/segments",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListSegmentsResponseSuccess"},{id:"segments/create",method:"post",path:"/segments",pathParams:[],query:[],body:[{name:"audience_id",type:"string",required:!1},{name:"filter",type:"object",required:!1},{name:"name",type:"string",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"segments/get",method:"get",path:"/segments/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetSegmentResponseSuccess",list:!1},class:"retrieve",resource:"GetSegmentResponseSuccess"},{id:"segments/update",method:"patch",path:"/segments/{id}",pathParams:["id"],query:[],body:[{name:"name",type:"string",required:!0}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"segments/remove",method:"delete",path:"/segments/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetSegmentResponseSuccess"},{id:"segments/list-contacts",method:"get",path:"/segments/{id}/contacts",pathParams:["id"],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListContactsResponseSuccess"},{id:"suppressions/list",method:"get",path:"/suppressions",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100},{name:"origin",type:"string",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListSuppressionsResponseSuccess"},{id:"suppressions/add",method:"post",path:"/suppressions",pathParams:[],query:[],body:[{name:"email",type:"string",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"suppressions/get",method:"get",path:"/suppressions/{suppression}",pathParams:["suppression"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetSuppressionResponseSuccess",list:!1},class:"retrieve",resource:"GetSuppressionResponseSuccess"},{id:"suppressions/remove",method:"delete",path:"/suppressions/{suppression}",pathParams:["suppression"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetSuppressionResponseSuccess"},{id:"suppressions/batch-add",method:"post",path:"/suppressions/batch/add",pathParams:[],query:[],body:[{name:"emails",type:"array",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"suppressions/batch-remove",method:"post",path:"/suppressions/batch/remove",pathParams:[],query:[],body:[{name:"emails",type:"array",required:!1},{name:"ids",type:"array",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"templates/list",method:"get",path:"/templates",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"TemplateListItem",list:!0},class:"list",resource:"TemplateListItem"},{id:"templates/create",method:"post",path:"/templates",pathParams:[],query:[],body:[{name:"alias",type:"string",required:!1},{name:"from",type:"string",required:!1},{name:"html",type:"string",required:!0},{name:"name",type:"string",required:!0},{name:"reply_to",type:"array",required:!1},{name:"subject",type:"string",required:!1},{name:"text",type:"string",required:!1},{name:"variables",type:"array",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"templates/get",method:"get",path:"/templates/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"Template",list:!1},class:"retrieve",resource:"Template"},{id:"templates/update",method:"patch",path:"/templates/{id}",pathParams:["id"],query:[],body:[{name:"alias",type:"string",required:!1},{name:"from",type:"string",required:!1},{name:"html",type:"string",required:!1},{name:"name",type:"string",required:!1},{name:"reply_to",type:"array",required:!1},{name:"subject",type:"string",required:!1},{name:"text",type:"string",required:!1},{name:"variables",type:"array",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"templates/remove",method:"delete",path:"/templates/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"Template"},{id:"templates/duplicate",method:"post",path:"/templates/{id}/duplicate",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"Template"},{id:"templates/publish",method:"post",path:"/templates/{id}/publish",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"Template"},{id:"topics/list",method:"get",path:"/topics",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListTopicsResponseSuccess"},{id:"topics/create",method:"post",path:"/topics",pathParams:[],query:[],body:[{name:"default_subscription",type:"string",required:!0},{name:"description",type:"string",required:!1},{name:"name",type:"string",required:!0},{name:"visibility",type:"string",required:!1}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"topics/get",method:"get",path:"/topics/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetTopicResponseSuccess",list:!1},class:"retrieve",resource:"GetTopicResponseSuccess"},{id:"topics/update",method:"patch",path:"/topics/{id}",pathParams:["id"],query:[],body:[{name:"description",type:"string",required:!1},{name:"name",type:"string",required:!1},{name:"visibility",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"topics/remove",method:"delete",path:"/topics/{id}",pathParams:["id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetTopicResponseSuccess"},{id:"usage/get",method:"get",path:"/usage",pathParams:[],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"GetUsageResponseSuccess"},{id:"webhooks/list",method:"get",path:"/webhooks",pathParams:[],query:[{name:"after",type:"string",required:!1},{name:"before",type:"string",required:!1},{name:"limit",type:"integer",required:!1}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListWebhooksResponse"},{id:"webhooks/create",method:"post",path:"/webhooks",pathParams:[],query:[],body:[{name:"endpoint",type:"string",required:!0},{name:"events",type:"array",required:!0}],bodyEncoding:"json",successStatus:201,credentials:["bearerAuth"],class:"non-resource"},{id:"webhooks/get",method:"get",path:"/webhooks/{webhook_id}",pathParams:["webhook_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetWebhookResponse",list:!1},class:"retrieve",resource:"GetWebhookResponse"},{id:"webhooks/update",method:"patch",path:"/webhooks/{webhook_id}",pathParams:["webhook_id"],query:[],body:[{name:"endpoint",type:"string",required:!1},{name:"events",type:"array",required:!1},{name:"status",type:"string",required:!1}],bodyEncoding:"json",successStatus:200,credentials:["bearerAuth"],class:"non-resource"},{id:"webhooks/remove",method:"delete",path:"/webhooks/{webhook_id}",pathParams:["webhook_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"delete",resource:"GetWebhookResponse"},{id:"webhooks/list-events",method:"get",path:"/webhooks/{webhook_id}/events",pathParams:["webhook_id"],query:[{name:"after",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListWebhookEventsResponse"},{id:"webhooks/get-event",method:"get",path:"/webhooks/{webhook_id}/events/{event_id}",pathParams:["webhook_id","event_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],answers:{resource:"GetWebhookEventResponse",list:!1},class:"retrieve",resource:"GetWebhookEventResponse"},{id:"webhooks/list-event-attempts",method:"get",path:"/webhooks/{webhook_id}/events/{event_id}/attempts",pathParams:["webhook_id","event_id"],query:[{name:"after",type:"string",required:!1},{name:"limit",type:"integer",required:!1,minimum:1,maximum:100}],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"retrieve",resource:"ListWebhookEventAttemptsResponse"},{id:"webhooks/replay-event",method:"post",path:"/webhooks/{webhook_id}/events/{event_id}/replay",pathParams:["webhook_id","event_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"action",resource:"GetWebhookEventResponse"},{id:"webhooks/rotate-signing-secret",method:"post",path:"/webhooks/{webhook_id}/signing-secret/rotate",pathParams:["webhook_id"],query:[],body:[],bodyEncoding:"none",successStatus:200,credentials:["bearerAuth"],class:"non-resource"}]};import{createPackFetch as ut}from"../../engine/v3/volter_world-core.mjs";var f="email",g="domain",_="_api_key",R="GetReceivedEmailResponse",H="x-volter-resend-team",T=e=>Response.json({statusCode:e.status,name:e.code??"validation_error",message:e.message},{status:e.status}),b=(e,t=422,a="validation_error")=>T({status:t,code:a,message:e}),x=e=>T({status:404,code:"not_found",message:`${e} not found`}),w=e=>e.call.request.headers.get(H)??"";function A(e){let t=String(e??"").trim();return(/<([^<>]+)>\s*$/.exec(t)?.[1]??t).trim().toLowerCase()}var q=e=>A(e).split("@")[1]??"",v=e=>Array.isArray(e)?e.map(String):typeof e=="string"&&e?[e]:[],$=e=>`${e.slice(0,10)} ${e.slice(11,23)}000+00`;function Y(e,t,a,s,r=!1){return[{record:"DKIM",name:"resend._domainkey",value:`p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ${a}IDAQAB`,type:"TXT",status:"not_started",ttl:"Auto"},{record:"SPF",name:"send",type:"MX",ttl:"Auto",status:"not_started",value:`feedback-smtp.${t}.amazonses.com`,priority:10},{record:"SPF",name:"send",value:'"v=spf1 include:amazonses.com ~all"',type:"TXT",ttl:"Auto",status:"not_started"},...r?[{record:"Receiving",name:e,type:"MX",value:`inbound-smtp.${t}.amazonaws.com`,ttl:"Auto",status:"not_started",priority:10}]:[],...s?[{record:"Tracking",name:`${s}.${e}`,type:"CNAME",value:"links1.resend-dns.com",ttl:"Auto",status:"not_started"}]:[]]}var Oe=(e,t,a)=>e.rowsRaw(g).find(s=>s._team===t&&s.name===q(a)&&s.status==="verified"&&s.deleted!==!0);function ne(e,t,a,s){let r=q(a);if(r==="resend.dev"){let n=e.rowsRaw(_).find(o=>o._team===t)?._owner;return s.every(o=>A(o)===n)?void 0:b(`You can only send testing emails to your own email address (${String(n)}). To send emails to other recipients, please verify a domain at resend.com/domains, and change the \`from\` address to an email using this domain.`,403)}let i=Oe(e,t,a);if(i&&i.capabilities?.sending==="disabled")return b(`Sending is disabled for the ${r} domain.`,403);if(!i)return b(`The ${r} domain is not verified. Please, add and verify your domain.`,403)}var W=e=>({object:"email",id:e.id,to:e.to,from:e.from,created_at:e.created_at,subject:e.subject,html:e.html??null,text:e.text??null,bcc:e.bcc??[],cc:e.cc??[],reply_to:e.reply_to??[],last_event:e.last_event,scheduled_at:e.scheduled_at??null,tags:e.tags??[],message_id:e.message_id});function I(e,t,a){let s=new URL(e.call.request.url).searchParams,r=s.get("limit"),i=r===null?20:Number(r);if(!Number.isInteger(i)||i<1||i>100)return b("The `limit` parameter must be an integer between 1 and 100.");let n=s.get("after"),o=s.get("before");if(n&&o)return b("You can only use either `after` or `before`, not both.");let c=0,m=t.length;n&&(c=t.findIndex(p=>p.id===n)+1),o&&(m=Math.max(0,t.findIndex(p=>p.id===o)),c=Math.max(0,m-i));let l=o?t.slice(c,m):t.slice(c,c+i),u=o?c>0:c+i<t.length;return Response.json({object:"list",has_more:u,data:l.map(a)})}async function K(e,t,a){let s=[];for(let r of a){let i=e.mint("_attachment_id"),n=new Uint8Array(Buffer.from(String(r.content),"base64")),o={id:i,filename:r.filename,content_type:r.content_type??{pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",txt:"text/plain",csv:"text/csv"}[String(r.filename).split(".").pop()?.toLowerCase()??""]??"application/octet-stream",content_disposition:r.content_disposition??"attachment",content_id:r.content_id??null,size:n.length},c=`attachments/${t}/${i}`;await e.record("_attachment_id",{_email:t},i),await e.blobs.put(c,n),s.push({metadata:o,bytes:n,blob:c})}return s}async function ie(e,t){let a=e.call.request;if(new URL(a.url).pathname==="/twin")return t();let s=/^Bearer\s+(\S+)/i.exec(a.headers.get("authorization")??"")?.[1];if(!s)return T({status:401,code:"missing_api_key",message:"Missing API key in the authorization header."});let r=e.rowsRaw(_).find(n=>n._sha256===e.crypto.sha256(s));if(!r)return T({status:400,code:"validation_error",message:"API key is invalid"});if(r.status!=="active")return T({status:403,code:"restricted_api_key",message:"API key is not active"});let i=new Headers(a.headers);return i.set(H,String(r._team)),t(new Request(a,{headers:i}))}var Q=(e,t)=>Date.parse(String(e))+t;function ze(e,t,a){let s=String(a.name),r=s===t||s.endsWith(`.${t}`)?s:`${s}.${t}`,i=n=>String(n??"").replace(/^"|"$/g,"").replace(/\.$/,"");return e.rowsRaw("_dns").find(n=>n.name===r&&e.own(n).type===a.type&&i(n.value)===i(a.value)&&n.deleted!==!0)}async function Me(e,t,a,s){await(await e.at(new Date(Q(t._verify_at,2592e5)).toISOString())).write(g,String(t.id),{status:"failed",records:a.map((i,n)=>({...i,status:s[n]?"verified":"failed"}))},"domain.failed")}async function Ue(e,t){let a=await e.at(String(t._scheduled_at));await a.write(f,String(t.id),{last_event:"queued"},"email.release"),await a.write(f,String(t.id),{last_event:"sent",_sent_at:a.occurredAt},"email.send")}async function oe(e){let t=Date.parse(e.occurredAt);for(let a of e.rowsRaw(f).filter(s=>s.last_event==="scheduled"&&Date.parse(String(s._scheduled_at))<=t))await Ue(e,a);for(let a of e.rowsRaw(f).filter(s=>s.last_event==="sent"&&s.deleted!==!0)){let s=Q(a._sent_at,5e3);if(s>t)continue;let r=await e.at(new Date(s).toISOString()),n=[...a.to,...a.cc??[],...a.bcc??[]].filter(o=>q(o)==="resend.dev"?o.startsWith("bounced@"):r.rowsRaw("_recipient_domain").some(c=>c.id===q(o)&&c.rejects===!0));n.length?await r.write(f,String(a.id),{last_event:"bounced",_bounced_to:n},"email.bounce"):await r.write(f,String(a.id),{last_event:"delivered",_delivered_at:r.occurredAt},"email.deliver")}for(let a of e.rowsRaw(g).filter(s=>s.status==="pending"&&s.deleted!==!0)){let s=a.records,r=s.map(n=>ze(e,String(a.name),n)),i=s.map(n=>n.record!=="Tracking"||a.click_tracking===!0);if(r.every((n,o)=>n||!i[o])){let o=Math.max(Date.parse(String(a._verify_at)),...r.filter(m=>m!==void 0).map(m=>Date.parse(String(m._set_at))))+6e5;if(o>t)continue;await(await e.at(new Date(o).toISOString())).write(g,String(a.id),{status:"verified",records:s.map((m,l)=>r[l]?{...m,status:"verified"}:m)},"domain.verified")}else Q(a._verify_at,72*36e5)<=t&&await Me(e,a,s,r)}}var X={};De(X,{appCredentials:()=>We,complain:()=>Qe,deliveries:()=>Ze,dns:()=>Ve,inbound:()=>Xe,keys:()=>Be,mail:()=>Je,open:()=>Ye,recipients:()=>He,removeKey:()=>Ke,webhooks:()=>Fe});function le(e,t,a,s,r){let i=(m,l)=>`content-type: ${m}; charset=utf-8\r
|
|
3
|
+
\r
|
|
4
|
+
${l}`,n=`${r}-alternative`,o=t!==null&&a!==null?`content-type: multipart/alternative; boundary="${n}"\r
|
|
5
|
+
\r
|
|
6
|
+
--${n}\r
|
|
7
|
+
${i("text/plain",t)}\r
|
|
8
|
+
--${n}\r
|
|
9
|
+
${i("text/html",a)}\r
|
|
10
|
+
--${n}--`:i(a!==null?"text/html":"text/plain",a??t??""),c=s.length?`content-type: multipart/mixed; boundary="${r}"\r
|
|
11
|
+
\r
|
|
12
|
+
--${r}\r
|
|
13
|
+
${o}\r
|
|
14
|
+
${s.map(({metadata:m,bytes:l})=>`--${r}\r
|
|
15
|
+
content-type: ${String(m.content_type)}\r
|
|
16
|
+
content-disposition: ${String(m.content_disposition)}; filename="${String(m.filename).replace(/["\r\n]/g,"")}"\r
|
|
17
|
+
${m.content_id?`content-id: <${String(m.content_id)}>\r
|
|
18
|
+
`:""}content-transfer-encoding: base64\r
|
|
19
|
+
\r
|
|
20
|
+
${Buffer.from(l).toString("base64")}`).join(`\r
|
|
21
|
+
`)}\r
|
|
22
|
+
--${r}--`:o;return`${Object.entries(e).map(([m,l])=>`${m}: ${String(l)}`).join(`\r
|
|
23
|
+
`)}\r
|
|
24
|
+
${c}`}var j=e=>e.body&&typeof e.body=="object"&&!Array.isArray(e.body)?e.body:{},E=(e,t=400)=>Response.json({error:e},{status:t}),de=async(e,t)=>`re_${(await e.secret(`resend-key:${t}`)).replace(/[-_]/g,"").slice(0,8)}_${(await e.secret(`resend-key-2:${t}`)).replace(/[-_]/g,"").slice(0,24)}`;async function ce(e,t,a,s){let r=e.mint(_),i=await de(e,r);return await e.write(_,r,{name:t,_team:a,_owner:A(s),_sha256:e.crypto.sha256(i),created_at:$(e.occurredAt),status:"active",deleted:!1},"api_key.create"),{id:r,token:i}}async function Be(e){let t=j(e);return typeof t.name!="string"||typeof t.team!="string"||typeof t.owner!="string"?E("a name, a team and its owner's email are required"):Response.json(await ce(e,t.name,t.team,t.owner),{status:201})}async function We(e){let t=e.rowsRaw(_).find(s=>s.name==="world"&&s._team==="World"&&s.status==="active"&&s.deleted!==!0),a=t?await de(e,String(t.id)):void 0;return Response.json(t&&a&&t._sha256===e.crypto.sha256(a)?{id:t.id,token:a}:await ce(e,"world","World","owner@world.test"),{status:201})}async function Ke(e){let t=e.rowsRaw(_).find(s=>s.id===e.call.params.id&&s.status==="active");if(!t)return E("no such key",404);let a=e.legal(_,"status","api_key.delete","active","deleted",String(t.id),"external");return a?E(a.message,422):(await e.write(_,String(t.id),{status:"deleted"},"api_key.delete"),new Response(null,{status:204}))}async function Fe(e){let t=j(e);if(typeof t.endpoint!="string"||!/^https?:\/\//.test(t.endpoint)||typeof t.team!="string")return E("a team and an endpoint URL are required");let a=e.mint("_webhook"),s=`whsec_${Buffer.from((await e.secret(`resend-webhook:${a}`)).slice(0,32)).toString("base64")}`;return await e.record("_webhook",{endpoint:t.endpoint,events:v(t.events),_team:t.team,signing_secret:s,status:"enabled",created_at:e.occurredAt},a),Response.json({id:a,signing_secret:s},{status:201})}async function Ve(e){let t=j(e);if(typeof t.name!="string"||typeof t.type!="string"||typeof t.value!="string")return E("a name, a type and a value are required");let a=t.name.toLowerCase().replace(/\.$/,"");return await e.record("_dns",{name:a,type:t.type.toUpperCase(),value:t.value,_set_at:e.occurredAt,deleted:!1},`${a}:${t.type.toUpperCase()}:${e.crypto.sha256(t.value).slice(0,12)}`),Response.json({name:a,type:t.type.toUpperCase()},{status:201})}async function He(e){let t=String(e.call.params.domain).toLowerCase();return await e.record("_recipient_domain",{rejects:j(e).rejects===!0},t),Response.json({domain:t,rejects:j(e).rejects===!0})}async function ue(e,t,a){let s=e.rowsRaw(f).find(n=>n.id===e.call.params.email_id&&n.deleted!==!0),r=A(j(e).to);if(!s||!s.to.map(A).includes(r))return E("no such email to that recipient",404);if(t==="opened"&&e.rowsRaw(g).find(o=>o._team===s._team&&o.name===q(s.from)&&o.deleted!==!0)?.open_tracking!==!0)return Response.json({tracked:!1});let i=e.legal(f,"last_event",a,s.last_event,t,String(s.id),"external");return i?E(i.message,422):(await e.write(f,String(s.id),{last_event:t,...t==="opened"?{_opened_by:r}:{_complained_by:r}},a),Response.json({tracked:!0,last_event:t}))}async function Ye(e){return ue(e,"opened","email.open")}async function Qe(e){return ue(e,"complained","email.complain")}async function Xe(e){let t=j(e),a=v(t.to).map(A),s=e.rowsRaw(g).find(p=>p.name===q(a[0])&&p.status==="verified"&&p.capabilities?.receiving==="enabled"&&p.deleted!==!0);if(!s||typeof t.from!="string"||typeof t.subject!="string")return E("mail to an address at a verified receiving domain, with a sender and a subject, is required",422);let r=e.mint(R),i=`<${e.crypto.uuidFrom(`inbound:${r}`)}@${q(t.from)}>`,n={...t.headers&&typeof t.headers=="object"?t.headers:{},from:t.from,to:a.join(", "),subject:t.subject,"message-id":i,"mime-version":"1.0",received:t.headers?.received??`from ${q(t.from)} by inbound.resend.com for <${a[0]}>`,...typeof t.inReplyTo=="string"?{"in-reply-to":t.inReplyTo,references:t.inReplyTo}:{}},o=Array.isArray(t.attachments)?t.attachments:[];if(o.some(p=>typeof p.filename!="string"||typeof p.content!="string"))return E("each incoming attachment needs a filename and base64 content",422);let c=await K(e,r,o),m=c.map(p=>p.metadata),l=le(n,typeof t.text=="string"?t.text:null,typeof t.html=="string"?t.html:null,c,(await e.secret(`resend-mime:${r}`)).slice(0,24));await e.blobs.put(`raw/${r}`,new TextEncoder().encode(l));let u=t.received_for===void 0?[/for\s+<?([^<>;\s]+@[^<>;\s]+)>?/i.exec(String(n.received??""))?.[1]??a[0]]:v(t.received_for);return await e.write(R,r,{id:r,attachments:m,received_for:u,object:"email",html_format:"data_uri",authentication:t.authentication??{spf:"none",dkim:"none",dmarc:"none"},from:t.from,to:a,subject:t.subject,text:t.text??null,html:t.html??null,headers:n,message_id:i,created_at:e.occurredAt,_raw_blob:`raw/${r}`,_team:s._team},"email.receive"),Response.json({id:r},{status:201})}async function Je(e){let t=A(new URL(e.call.request.url).searchParams.get("to")),a=e.rowsRaw(f).filter(s=>["delivered","opened","clicked","complained"].includes(String(s.last_event))&&[...s.to,...s.cc??[],...s.bcc??[]].map(A).includes(t)).sort((s,r)=>String(r._created_iso).localeCompare(String(s._created_iso)));return Response.json({mail:a.map(s=>({id:s.id,from:s.from,subject:s.subject,html:s.html,text:s.text,received_at:s._delivered_at,attachments:(s._attachments??[]).map(({_blob:r,...i})=>i)}))})}async function Ze(e){let t=new URL(e.call.request.url).searchParams,a=t.get("to")??"",s=t.get("type"),r=t.get("email"),i=e.rowsRaw("_webhook_delivery").filter(n=>String(n.url??"").startsWith(a)).map(n=>{let o=n.body;try{o=JSON.parse(String(n.body))}catch{}return{url:n.url,headers:n.headers,body:o,status:n.status}}).filter(n=>(!s||n.body?.type===s)&&(!r||n.body?.data?.email_id===r));return Response.json({deliveries:i})}var me=["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"],pe=e=>e.body&&typeof e.body=="object"&&!Array.isArray(e.body)?e.body:{},J=e=>({object:"domain",id:e.id,name:e.name,status:e.status,created_at:e.created_at,region:e.region,open_tracking:e.open_tracking,click_tracking:e.click_tracking,...e.tracking_subdomain?{tracking_subdomain:e.tracking_subdomain}:{},capabilities:e.capabilities,records:e.records}),F=e=>e.rowsRaw(g).find(t=>t.id===e.call.params.domain_id&&t._team===w(e)&&t.deleted!==!0);async function fe(e){let t=pe(e),a=typeof t.name=="string"?t.name.trim().toLowerCase():"";if(!a)return b("Missing `name` field.",422,"missing_required_field");let s=typeof t.region=="string"?t.region:"us-east-1";if(!me.includes(s))return b(`Invalid \`region\`. Possible values are ${me.join(" | ")}.`);if(e.rowsRaw(g).some(p=>p.name===a&&p.deleted!==!0))return b(`The ${a} domain has been registered already.`,403);let r=t.capabilities??{},i=r.receiving==="enabled",n=typeof t.tracking_subdomain=="string"&&t.tracking_subdomain?t.tracking_subdomain:"links",o=e.mint(g),c=(await e.secret(`resend-dkim:${o}`)).replace(/[-_]/g,"A").slice(0,172),m={id:o,object:"domain",name:a,status:"not_started",created_at:$(e.occurredAt),region:s,open_tracking:t.open_tracking===!0,click_tracking:t.click_tracking===!0,...n?{tracking_subdomain:n}:{},capabilities:{sending:r.sending==="disabled"?"disabled":"enabled",receiving:i?"enabled":"disabled"},records:Y(a,s,c,n,i),_team:w(e)};await e.write(g,o,m,"domain.create");let{object:l,...u}=J({...m,id:o});return Response.json(u,{status:201})}async function ye(e){let t=F(e);return t?Response.json(J(e.own(t))):x("Domain")}async function be(e){let t=e.rowsRaw(g).filter(a=>a._team===w(e)&&a.deleted!==!0).reverse();return I(e,t,a=>{let{records:s,object:r,tracking_subdomain:i,...n}=J(e.own(a));return n})}async function ge(e){let t=F(e);if(!t)return x("Domain");let a=pe(e);if(a.tls!==void 0&&a.tls!=="enforced"&&a.tls!=="opportunistic")return b("Invalid `tls`. Possible values are enforced | opportunistic.");for(let o of["open_tracking","click_tracking"])if(a[o]!==void 0&&typeof a[o]!="boolean")return b(`Invalid \`${o}\`: expected a boolean.`);let s={...t.capabilities,...a.capabilities??{}},r=typeof a.tracking_subdomain=="string"&&a.tracking_subdomain?a.tracking_subdomain:t.tracking_subdomain,i=t.records.filter(o=>o.record!=="Tracking"&&o.record!=="Receiving"),n=Y(String(t.name),String(t.region),"",r,s.receiving==="enabled").filter(o=>o.record==="Tracking"||o.record==="Receiving").map(o=>t.records.find(c=>c.record===o.record&&c.name===o.name)??o);return await e.write(g,String(t.id),{...typeof a.open_tracking=="boolean"?{open_tracking:a.open_tracking}:{},...typeof a.click_tracking=="boolean"?{click_tracking:a.click_tracking}:{},...a.tls!==void 0?{tls:a.tls}:{},...r?{tracking_subdomain:r}:{},capabilities:s,records:[...i,...n]},"domain.update"),Response.json({object:"domain",id:t.id})}async function he(e){let t=F(e);if(!t)return x("Domain");if(t.status!=="verified"){let a=e.legal(g,"status","domains/verify",t.status,"pending");if(a)return b(a.message,a.status);await e.write(g,String(t.id),{status:"pending",records:t.records.map(s=>({...s,status:"pending"})),_verify_at:e.occurredAt},"domain.verify")}return Response.json({object:"domain",id:t.id})}async function ve(e){let t=F(e);return t?(await e.remove(g,String(t.id),"domain.delete"),Response.json({object:"domain",id:t.id,deleted:!0})):x("Domain")}var _e=e=>e.body;function we(e,t,a){if(a.template!==void 0)return e.refuse({status:404,code:"not_found",message:"The requested endpoint does not exist."});let s=["from","to","subject"].filter(r=>a[r]===void 0||a[r]===""||Array.isArray(a[r])&&!a[r].length);return s.length?b(`Missing \`${s[0]}\` field.`,422,"missing_required_field"):a.html===void 0&&a.text===void 0?b("Missing `html` or `text` field.",422,"missing_required_field"):v(a.to).length>50?b("Too many recipients: `to` accepts at most 50 addresses."):a.scheduled_at!==void 0&&(typeof a.scheduled_at!="string"||!Number.isFinite(Date.parse(a.scheduled_at)))?b("Invalid `scheduled_at`: expected an ISO 8601 date."):a.attachments!==void 0&&(!Array.isArray(a.attachments)||a.attachments.some(r=>!r||typeof r.filename!="string"||typeof r.content!="string"))?b("Each attachment requires a filename and base64 content."):ne(e,t,a.from,v(a.to))}async function qe(e,t,a){let s=e.mint(f),r=e.occurredAt,i=await K(e,s,a.attachments??[]);return await e.write(f,s,{id:s,object:"email",from:a.from,to:v(a.to),cc:v(a.cc),bcc:v(a.bcc),reply_to:v(a.reply_to),subject:a.subject,html:typeof a.html=="string"?a.html:null,text:typeof a.text=="string"?a.text:null,tags:Array.isArray(a.tags)?a.tags:[],scheduled_at:a.scheduled_at??null,_attachments:i.map(({metadata:o,blob:c})=>({...o,_blob:c})),created_at:$(r),message_id:`<${s}@email.amazonses.com>`,last_event:"queued",_team:t,_created_iso:r},"email.create"),a.scheduled_at!==void 0&&Date.parse(String(a.scheduled_at))>Date.parse(r)?tt(e,s,String(a.scheduled_at)):(e.legal(f,"last_event","email.send","queued","sent",s,"vendor")||await e.write(f,s,{last_event:"sent",_sent_at:r},"email.send"),s)}async function tt(e,t,a){return e.legal(f,"last_event","email.schedule","queued","scheduled",t,"vendor")||await e.write(f,t,{last_event:"scheduled",_scheduled_at:new Date(a).toISOString()},"email.schedule"),t}async function Se(e){let t=_e(e)??{},a=w(e),s=we(e,a,t);return s||Response.json({id:await qe(e,a,t)})}async function ke(e){let t=_e(e);if(!Array.isArray(t))return b("The request body must be an array of emails.");if(t.length>100)return b("Too many emails: a batch sends at most 100.");let a=w(e);for(let r of t){let i=we(e,a,r??{});if(i)return i}let s=[];for(let r of t)s.push({id:await qe(e,a,r)});return Response.json({data:s})}async function Ae(e){let t=e.rowsRaw(f).filter(s=>s._team===w(e)&&s.deleted!==!0).reverse().sort((s,r)=>String(r._created_iso).localeCompare(String(s._created_iso))),a=s=>Array.isArray(s)&&s.length?s:null;return I(e,t.map(s=>e.own(s)),s=>({id:s.id,message_id:s.message_id,to:s.to,from:s.from,created_at:s.created_at,subject:s.subject,bcc:a(s.bcc),cc:a(s.cc),reply_to:a(s.reply_to),last_event:s.last_event,scheduled_at:s.scheduled_at??null}))}async function Ee(e){let t=e.rowsRaw(f).find(a=>a.id===e.call.params.email_id&&a._team===w(e)&&a.deleted!==!0);return t?Response.json(W(e.own(t))):x("Email")}async function Re(e){let t=e.rowsRaw(R).find(i=>i.id===e.call.params.email_id&&i._team===w(e)&&i.deleted!==!0);if(!t)return x("Email");let a=e.own(t),s=new Date(Date.parse(e.occurredAt)+36e5).toISOString(),r=(await e.secret(`resend-raw:${String(a.id)}:${s}`)).slice(0,32);return Response.json({object:"email",id:a.id,to:a.to,from:a.from,created_at:a.created_at,subject:a.subject,html:a.html??null,text:a.text??null,headers:a.headers,html_format:a.html_format,authentication:a.authentication,bcc:[],cc:[],reply_to:[],received_for:a.received_for,message_id:a.message_id,raw:{download_url:`https://inbound-cdn.resend.com/receiving/raw/${String(a.id)}?Expires=${encodeURIComponent(s)}&Signature=${r}`,expires_at:s},attachments:a.attachments??[]})}async function xe(e){let t=e.rowsRaw(R).filter(a=>a._team===w(e)&&a.deleted!==!0).reverse();return I(e,t,a=>{let s=e.own(a);return{id:s.id,to:s.to,from:s.from,created_at:s.created_at,subject:s.subject,bcc:[],cc:[],reply_to:[],message_id:s.message_id,attachments:s.attachments??[]}})}var Pe={"domains/create":fe,"domains/get":ye,"domains/list":be,"domains/remove":ve,"domains/update":ge,"domains/verify":he,"emails/get":Ee,"emails/get-receiving":Re,"emails/list":Ae,"emails/list-receiving":xe,"emails/send":Se,"emails/send-batch":ke};import{jsx as d,Fragment as ee,jsxs as y}from"../../engine/v3/react_jsx-runtime.mjs";import{jsx as h,jsxs as P}from"../../engine/v3/react_jsx-runtime.mjs";import{flowPage as st}from"../../engine/v3/volter_world-ui.mjs";var S=(e,t)=>`${e.publicBase}${t}`,V=(e,t,a="preview")=>`/emails/${encodeURIComponent(String(e))}?${new URLSearchParams({team:t,view:a})}`,k=e=>v(e).join(", "),Z=e=>String(e??"").replace(/_/g," ").replace(/^./,t=>t.toUpperCase()),rt=e=>["delivered","opened","clicked"].includes(String(e))?"healthy":["bounced","complained","failed","suppressed"].includes(String(e))?"danger":"neutral",G=e=>{if(typeof e!="string"||!e)return"\u2014";let t=new Date(e.replace(" ","T").replace(/\+00$/,"Z"));return Number.isNaN(t.getTime())?e:t.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:"UTC"})},L=({value:e})=>h("span",{className:`re-badge re-${rt(e)}`,children:Z(e)||"\u2014"}),D=({name:e,size:t=18})=>h("img",{className:"re-icon",src:`https://brand.volter.ai/icon/${encodeURIComponent(e)}/svg?size=${t}&color=%23969aa0`,width:t,height:t,alt:""});function N(e,t,a,s,r,i=200,n){return st({title:`${t} | Resend`,css:[ot,nt,it],status:i,headers:{"content-security-policy":"default-src 'none'; img-src https://brand.volter.ai; style-src 'unsafe-inline'; frame-src 'self'; base-uri 'none'; form-action 'self'"},body:P("div",{className:"re-shell",children:[P("aside",{className:"re-sidebar",children:[h("a",{className:"re-wordmark",href:S(e,`/emails?${new URLSearchParams({team:s})}`),children:"Resend"}),a.length>1?P("form",{className:"re-team",method:"get",action:S(e,"/emails"),children:[h("label",{htmlFor:"team",children:"Team"}),h("select",{id:"team",name:"team",defaultValue:s,children:a.map(o=>h("option",{children:o},o))}),h("button",{children:"Switch"})]}):s?h("span",{className:"re-team-name",children:s}):null,P("nav",{"aria-label":"Resend",children:[P("a",{href:S(e,`/emails?${new URLSearchParams({team:s})}`),"aria-current":"page",children:[h(D,{name:"mail"}),"Emails"]}),[["Broadcasts","inbox"],["Audiences","users"],["Metrics","chart-no-axes-column"],["Domains","globe"],["Logs","logs"],["API Keys","key-round"],["Webhooks","arrow-down-up"],["Settings","sliders-horizontal"]].map(([o,c])=>P("span",{role:"link","aria-disabled":"true",title:`${o} UI is unavailable in this mirror`,children:[h(D,{name:c}),o]},o))]})]}),P("div",{className:"re-workspace",children:[h("div",{className:"re-topbar",children:h("span",{children:"Emails"})}),P("main",{children:[h("header",{className:"re-heading",children:n??h("h1",{children:t})}),r]})]})]})})}var nt=`
|
|
25
|
+
:root {
|
|
26
|
+
--resend-surface-page: #05050a;
|
|
27
|
+
--resend-text-primary: #eaebed;
|
|
28
|
+
--resend-text-muted: #969aa0;
|
|
29
|
+
--resend-surface-raised: #16171c;
|
|
30
|
+
--resend-surface-selected: #23252c;
|
|
31
|
+
--resend-surface-tab-selected: #2d3037;
|
|
32
|
+
--resend-border-default: #23252c;
|
|
33
|
+
--resend-border-subtle: var(--resend-border-default);
|
|
34
|
+
}
|
|
35
|
+
`,it=`
|
|
36
|
+
.re-sidebar nav a,.re-sidebar nav span{display:flex!important;align-items:center;gap:10px}.re-sidebar nav span{padding:var(--volter-space-2) var(--volter-space-3);color:var(--resend-text-muted);margin-top:var(--volter-space-2);cursor:default}.re-icon{flex:none}@media(max-width:700px){.re-sidebar nav span{display:none!important}}
|
|
37
|
+
* { box-sizing: border-box; }
|
|
38
|
+
:root { color-scheme: dark; }
|
|
39
|
+
body { margin: 0; background: var(--resend-surface-page); color: var(--resend-text-primary); font: var(--volter-font-size-md)/1.5 var(--volter-font-ui); }
|
|
40
|
+
a { color: inherit; text-decoration: none; }
|
|
41
|
+
a:hover { text-decoration: underline; }
|
|
42
|
+
button, input, select { font: inherit; }
|
|
43
|
+
button, input, select, a { outline-offset: 4px; }
|
|
44
|
+
button, input, select { background: var(--resend-surface-raised); color: var(--resend-text-primary); border: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-control); padding: var(--volter-space-2) var(--volter-space-3); }
|
|
45
|
+
button { cursor: pointer; }
|
|
46
|
+
.re-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
|
|
47
|
+
.re-sidebar { border-right: 1px solid var(--resend-border-default); padding: var(--volter-space-6) var(--volter-space-4); }
|
|
48
|
+
.re-wordmark { display: block; font-size: var(--volter-font-size-xl); font-weight: 650; margin: 0 var(--volter-space-2) var(--volter-space-6); }
|
|
49
|
+
.re-team-name { display: block; color: var(--resend-text-muted); padding: 0 var(--volter-space-2); margin-bottom: var(--volter-space-6); }
|
|
50
|
+
.re-team { display: grid; gap: var(--volter-space-2); margin-bottom: var(--volter-space-6); }
|
|
51
|
+
.re-team label { color: var(--resend-text-muted); font-size: var(--volter-font-size-sm); }
|
|
52
|
+
.re-team select { width: 100%; }
|
|
53
|
+
.re-sidebar nav a { display: block; background: var(--resend-surface-selected); border: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-control); padding: var(--volter-space-2) var(--volter-space-3); }
|
|
54
|
+
.re-topbar { height: 60px; border-bottom: 1px solid var(--resend-border-default); display: flex; align-items: center; padding: 0 var(--volter-space-6); color: var(--resend-text-muted); font-size: var(--volter-font-size-sm); }
|
|
55
|
+
main { padding: var(--volter-space-8) var(--volter-space-8) var(--volter-space-16); max-width: 1440px; }
|
|
56
|
+
.re-heading { margin-bottom: var(--volter-space-8); }
|
|
57
|
+
h1 { margin: 0; font-size: var(--volter-font-size-3xl); font-weight: 600; letter-spacing: -.03em; }
|
|
58
|
+
h2 { margin: 0 0 var(--volter-space-4); font-size: var(--volter-font-size-sm); font-weight: 500; text-transform: uppercase; color: var(--resend-text-muted); }
|
|
59
|
+
.re-filters { display: flex; gap: var(--volter-space-2); flex-wrap: wrap; margin-bottom: var(--volter-space-5); }
|
|
60
|
+
.re-search { flex: 1; min-width: 180px; }
|
|
61
|
+
.re-table-scroll { overflow-x: auto; }
|
|
62
|
+
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
|
|
63
|
+
thead { color: var(--resend-text-muted); }
|
|
64
|
+
th { background: var(--resend-surface-raised); border-top: 1px solid var(--resend-border-default); border-bottom: 1px solid var(--resend-border-default); font-weight: 500; padding: var(--volter-space-3); font-size: var(--volter-font-size-sm); }
|
|
65
|
+
th:first-child { border-left: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-panel) 0 0 var(--volter-radius-panel); }
|
|
66
|
+
th:last-child { border-right: 1px solid var(--resend-border-default); border-radius: 0 var(--volter-radius-panel) var(--volter-radius-panel) 0; }
|
|
67
|
+
td { border-bottom: 1px solid var(--resend-border-subtle); padding: var(--volter-space-4) var(--volter-space-3); }
|
|
68
|
+
tbody tr:hover { background: var(--resend-surface-raised); }
|
|
69
|
+
td a { display: block; }
|
|
70
|
+
.re-recipient { min-width: 190px; overflow-wrap: anywhere; }
|
|
71
|
+
.re-recipient a { display: flex; align-items: center; gap: var(--volter-space-3); }
|
|
72
|
+
.re-envelope { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--volter-space-8); height: var(--volter-space-8); border: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-panel); background: var(--resend-surface-raised); }
|
|
73
|
+
.re-email-heading { display: flex; align-items: center; gap: var(--volter-space-4); }
|
|
74
|
+
.re-email-heading .re-envelope { width: var(--volter-space-12); height: var(--volter-space-12); }
|
|
75
|
+
.re-email-heading > div { min-width: 0; }
|
|
76
|
+
.re-email-heading h1 { font-size: var(--volter-font-size-2xl); overflow-wrap: anywhere; }
|
|
77
|
+
.re-eyebrow { margin: 0 0 var(--volter-space-1); color: var(--resend-text-muted); font-size: var(--volter-font-size-sm); }
|
|
78
|
+
.re-subject { min-width: 240px; }
|
|
79
|
+
.re-date { color: var(--resend-text-muted); white-space: nowrap; font-size: var(--volter-font-size-sm); }
|
|
80
|
+
.re-badge { display: inline-block; border-radius: var(--volter-radius-control); padding: var(--volter-space-1) var(--volter-space-2); font-size: var(--volter-font-size-sm); background: var(--resend-surface-raised); color: var(--resend-text-muted); white-space: nowrap; }
|
|
81
|
+
.re-healthy { background: var(--volter-status-healthy-soft); color: var(--volter-status-healthy-text); }
|
|
82
|
+
.re-danger { background: var(--volter-status-danger-soft); color: var(--volter-status-danger-text); }
|
|
83
|
+
.re-muted { color: var(--resend-text-muted); font-size: var(--volter-font-size-sm); }
|
|
84
|
+
.re-empty { padding: var(--volter-space-12) var(--volter-space-4); text-align: center; color: var(--resend-text-muted); }
|
|
85
|
+
.re-back { display: inline-block; margin-bottom: var(--volter-space-4); color: var(--resend-text-muted); }
|
|
86
|
+
.re-details { display: grid; grid-template-columns: 1fr 1fr; gap: var(--volter-space-6) var(--volter-space-8); margin: 0 0 var(--volter-space-8); }
|
|
87
|
+
.re-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--volter-space-5); }
|
|
88
|
+
.re-details div { min-width: 0; }
|
|
89
|
+
.re-details dt { margin-bottom: var(--volter-space-1); color: var(--resend-text-muted); font-size: var(--volter-font-size-sm); text-transform: uppercase; }
|
|
90
|
+
.re-details dd { margin: 0; overflow-wrap: anywhere; }
|
|
91
|
+
.re-details code { font: var(--volter-font-size-sm)/1.5 var(--volter-font-data); }
|
|
92
|
+
.re-metadata { border-bottom: 1px solid var(--resend-border-default); padding-bottom: var(--volter-space-4); margin-bottom: var(--volter-space-5); }
|
|
93
|
+
.re-metadata summary { cursor: pointer; font-size: var(--volter-font-size-sm); color: var(--resend-text-muted); }
|
|
94
|
+
.re-metadata summary .re-badge { margin-left: var(--volter-space-2); }
|
|
95
|
+
.re-metadata .re-details { padding-top: var(--volter-space-4); margin-bottom: 0; }
|
|
96
|
+
.re-events { display: flex; list-style: none; padding: var(--volter-space-2) 0 var(--volter-space-4); margin: 0 0 var(--volter-space-5); overflow-x: auto; }
|
|
97
|
+
.re-events li { position: relative; display: flex; flex-direction: column; gap: var(--volter-space-2); align-items: center; flex: 0 0 calc(var(--volter-space-12) * 4); text-align: center; }
|
|
98
|
+
.re-events li:not(:last-child)::after { content: ''; position: absolute; top: var(--volter-space-6); left: calc(50% + var(--volter-space-6)); width: calc(100% - var(--volter-space-12)); height: 1px; background: var(--resend-border-default); }
|
|
99
|
+
.re-event-node { display: flex; align-items: center; justify-content: center; width: var(--volter-space-12); height: var(--volter-space-12); border: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-panel); background: var(--resend-surface-raised); }
|
|
100
|
+
.re-events .re-date { max-width: calc(var(--volter-space-12) * 3); white-space: normal; }
|
|
101
|
+
.re-content { border: 1px solid var(--resend-border-default); border-radius: var(--volter-radius-panel); overflow: hidden; }
|
|
102
|
+
.re-tabs { display: flex; gap: var(--volter-space-2); padding: var(--volter-space-3); border-bottom: 1px solid var(--resend-border-default); }
|
|
103
|
+
.re-tabs a { padding: var(--volter-space-1) var(--volter-space-2); border-radius: var(--volter-radius-control); color: var(--resend-text-muted); }
|
|
104
|
+
.re-tabs [aria-current=page] { background: var(--resend-surface-tab-selected); color: var(--resend-text-primary); }
|
|
105
|
+
.re-preview { display: block; border: 0; width: 100%; height: 560px; background: var(--resend-surface-raised); }
|
|
106
|
+
.re-code { padding: var(--volter-space-6); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--volter-font-size-sm)/1.6 var(--volter-font-data); }
|
|
107
|
+
@media (max-width: 800px) { .re-shell { grid-template-columns: 160px minmax(0, 1fr); } main { padding: var(--volter-space-6) var(--volter-space-4); } .re-details { grid-template-columns: 1fr; } h1 { font-size: var(--volter-font-size-2xl); } }
|
|
108
|
+
@media (max-width: 560px) { .re-shell { display: block; } .re-sidebar { display: flex; align-items: center; gap: var(--volter-space-4); padding: var(--volter-space-4); border-right: 0; border-bottom: 1px solid var(--resend-border-default); } .re-wordmark, .re-team-name { margin: 0; padding: 0; } .re-team-name, .re-topbar { display: none; } .re-team { margin: 0; } .re-team label { display: none; } .re-sidebar nav { margin-left: auto; } }
|
|
109
|
+
`,ot=`:root {
|
|
110
|
+
--volter-surface-page: light-dark(#f7f6f1, #0f1a1f);
|
|
111
|
+
--volter-text-primary: light-dark(#16252c, #f3f2ec);
|
|
112
|
+
--volter-font-size-md: 14px;
|
|
113
|
+
--volter-font-ui: "Geist", "Segoe UI", system-ui, sans-serif;
|
|
114
|
+
--volter-surface-raised: light-dark(#fbfaf7, #16252c);
|
|
115
|
+
--volter-border-default: light-dark(#d9dad3, #2c3d45);
|
|
116
|
+
--volter-radius-control: 3px;
|
|
117
|
+
--volter-space-2: 8px;
|
|
118
|
+
--volter-space-3: 12px;
|
|
119
|
+
--volter-space-6: 24px;
|
|
120
|
+
--volter-space-4: 16px;
|
|
121
|
+
--volter-font-size-xl: 20px;
|
|
122
|
+
--volter-text-muted: light-dark(#5d6970, #a9b0ad);
|
|
123
|
+
--volter-font-size-sm: 12.5px;
|
|
124
|
+
--volter-space-8: 32px;
|
|
125
|
+
--volter-space-16: 64px;
|
|
126
|
+
--volter-font-size-3xl: 32px;
|
|
127
|
+
--volter-space-5: 20px;
|
|
128
|
+
--volter-border-subtle: light-dark(#e9e8e1, #223239);
|
|
129
|
+
--volter-space-1: 4px;
|
|
130
|
+
--volter-status-healthy-soft: light-dark(#e8f0e6, rgba(111, 191, 142, 0.14));
|
|
131
|
+
--volter-status-healthy-text: light-dark(#2f5f40, #93d3aa);
|
|
132
|
+
--volter-status-danger-soft: light-dark(#fbebe4, rgba(240, 118, 80, 0.14));
|
|
133
|
+
--volter-status-danger-text: light-dark(#9c3310, #f59a7d);
|
|
134
|
+
--volter-space-12: 48px;
|
|
135
|
+
--volter-font-data: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
|
136
|
+
--volter-radius-panel: 4px;
|
|
137
|
+
--volter-font-size-2xl: 24px;
|
|
138
|
+
}
|
|
139
|
+
`;async function je(e){let t=e.call.request;if(!["GET","HEAD"].includes(t.method))return new Response("Method Not Allowed",{status:405,headers:{allow:"GET, HEAD"}});let a=new URL(t.url),s=a.pathname.replace(/\/+$/,""),r=e.rowsRaw(f).filter(u=>u.deleted!==!0),i=[...new Set([...e.rowsRaw(_),...r].map(u=>String(u._team??"")).filter(Boolean))].sort(),n=a.searchParams.get("team")||(i.includes("World")?"World":i[0]??"");if(n&&!i.includes(n))return N(e,"Emails",i,n,d("p",{role:"alert",children:"Team not found"}),404);let o=r.filter(u=>u._team===n).reverse().sort((u,p)=>String(p._created_iso??p.created_at).localeCompare(String(u._created_iso??u.created_at))).map(u=>W(e.own(u)));if(s==="/emails")return lt(e,a,i,n,o);let c=/^\/emails\/([^/]+)$/.exec(s),m="";try{m=c?decodeURIComponent(c[1]):""}catch{}let l=o.find(u=>u.id===m);return l?dt(e,a,i,n,l):N(e,"Email details",i,n,y(ee,{children:[d("a",{className:"re-back",href:S(e,`/emails?${new URLSearchParams({team:n})}`),children:"Back to Emails"}),d("p",{role:"alert",children:"Email not found"})]}),404)}function lt(e,t,a,s,r){let i=t.searchParams.get("query")??"",n=t.searchParams.get("status")??"",o=i.toLowerCase(),c=r.filter(l=>(!n||l.last_event===n)&&(!o||[l.id,l.subject,l.from,k(l.to)].some(u=>String(u??"").toLowerCase().includes(o)))),m=[...new Set(r.map(l=>String(l.last_event??"")).filter(Boolean))].sort();return N(e,"Emails",a,s,y(ee,{children:[y("form",{className:"re-filters",method:"get",action:S(e,"/emails"),children:[d("input",{type:"hidden",name:"team",value:s}),d("input",{className:"re-search",type:"search",name:"query","aria-label":"Search emails",placeholder:"Search...",defaultValue:i}),y("select",{name:"status","aria-label":"Email status",defaultValue:n,children:[d("option",{value:"",children:"All Statuses"}),m.map(l=>d("option",{value:l,children:Z(l)},l))]}),d("button",{type:"submit",children:"Search"})]}),d("div",{className:"re-table-scroll",children:y("table",{children:[d("thead",{children:y("tr",{children:[d("th",{children:"To"}),d("th",{children:"Status"}),d("th",{children:"Subject"}),d("th",{children:"Created"})]})}),y("tbody",{children:[c.map(l=>y("tr",{children:[d("td",{className:"re-recipient",children:y("a",{href:S(e,V(l.id,s)),children:[d("span",{className:"re-envelope",children:d(D,{name:"mail",size:16})}),d("span",{children:k(l.to)})]})}),d("td",{children:d(L,{value:l.last_event})}),d("td",{className:"re-subject",children:d("a",{href:S(e,V(l.id,s)),children:String(l.subject??"")||"(No subject)"})}),y("td",{className:"re-date",children:[G(l.created_at)," UTC"]})]},String(l.id))),c.length?null:d("tr",{children:d("td",{colSpan:4,className:"re-empty",children:r.length?"No emails match your search.":"No emails yet."})})]})]})}),y("p",{className:"re-muted",children:[c.length," ",c.length===1?"email":"emails"]})]}))}function dt(e,t,a,s,r){let i=["preview","text","html"].includes(t.searchParams.get("view")??"")?t.searchParams.get("view"):"preview",n=e.history(f,String(r.id)).filter(u=>typeof u.operation=="string"&&typeof u.fields?.last_event=="string"),o=typeof r.text=="string"?r.text:"",c=typeof r.html=="string"?r.html:"",m=`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; base-uri 'none'; form-action 'none'"><meta name="referrer" content="no-referrer"></head><body>${c}</body></html>`,l=(u,p,Te=!1)=>y("div",{children:[d("dt",{children:u}),d("dd",{children:Te?d("code",{children:String(p??"")||"\u2014"}):String(p??"")||"\u2014"})]});return N(e,"Email details",a,s,y(ee,{children:[d("a",{className:"re-back",href:S(e,`/emails?${new URLSearchParams({team:s})}`),children:"Back to Emails"}),y("dl",{className:"re-details re-overview",children:[l("From",r.from),l("Subject",r.subject),l("To",k(r.to))]}),y("details",{className:"re-metadata",children:[y("summary",{children:["Email details ",d(L,{value:r.last_event})]}),y("dl",{className:"re-details",children:[l("Reply-to",k(r.reply_to)),k(r.cc)?l("Cc",k(r.cc)):null,k(r.bcc)?l("Bcc",k(r.bcc)):null,y("div",{children:[d("dt",{children:"Status"}),d("dd",{children:d(L,{value:r.last_event})})]}),l("Created",`${G(r.created_at)} UTC`),l("Email ID",r.id,!0),l("Message-ID",r.message_id,!0),r.scheduled_at?l("Scheduled",`${G(r.scheduled_at)} UTC`):null,Array.isArray(r.tags)&&r.tags.length?l("Tags",r.tags.map(u=>`${String(u.name)}: ${String(u.value)}`).join(", ")):null]})]}),n.length?y("section",{"aria-label":"Email events",children:[d("h2",{children:"Email events"}),d("ol",{className:"re-events",children:n.map((u,p)=>y("li",{children:[d("span",{className:"re-event-node","aria-hidden":"true",children:d(D,{name:ct(u.fields.last_event),size:20})}),d(L,{value:u.fields.last_event}),y("time",{className:"re-date",dateTime:typeof u.occurredAt=="string"?u.occurredAt:void 0,title:String(u.occurredAt??""),children:[G(u.occurredAt)," UTC"]})]},p))})]}):null,y("section",{className:"re-content","aria-label":"Email content",children:[d("nav",{className:"re-tabs","aria-label":"Email formats",children:[["preview","Preview"],["text","Plain Text"],["html","HTML"]].map(([u,p])=>d("a",{href:S(e,V(r.id,s,u)),"aria-current":i===u?"page":void 0,children:p},u))}),i==="preview"?c?d("iframe",{className:"re-preview",title:"Email preview",sandbox:"",srcDoc:m}):d("pre",{className:"re-code",children:o||"No content available."}):d("pre",{className:"re-code",children:(i==="html"?c:o)||(i==="html"?"No HTML content.":"No plain text content.")})]})]}),200,y("div",{className:"re-email-heading",children:[d("span",{className:"re-envelope",children:d(D,{name:"mail",size:24})}),y("div",{children:[d("p",{className:"re-eyebrow",children:"Email"}),d("h1",{children:k(r.to)||"Email details"})]})]}))}function ct(e){switch(e){case"queued":case"scheduled":return"clock";case"sent":return"send";case"delivered":return"circle-check";case"opened":return"mail-open";case"clicked":return"mouse-pointer-2";case"bounced":case"complained":case"failed":case"suppressed":return"circle-alert";default:return"mail"}}async function Ce(e){let t=new URL(e.call.request.url),a=/^\/receiving\/raw\/([^/]+)$/.exec(t.pathname),s=a?e.rowsRaw(R).find(o=>o.id===a[1]&&o.deleted!==!0):void 0,r=t.searchParams.get("Expires")??"";if(!s||!r)return new Response("Not Found",{status:404});let i=(await e.secret(`resend-raw:${String(s.id)}:${r}`)).slice(0,32);if(t.searchParams.get("Signature")!==i||Date.parse(r)<=Date.parse(e.occurredAt))return new Response("Access Denied",{status:403});let n=await e.blobs.get(String(s._raw_blob));return new Response(n?new Uint8Array(n):null,{headers:{"content-type":"message/rfc822"}})}function te(e={}){return ut({manifest:U,surface:B,handlers:Pe,doors:X,around:ie,clock:oe,screens:{emails:je,"inbound-cdn":Ce}},e)}import{serveHttp as Jt}from"../../engine/v3/volter_world-core.mjs";var na=pt(mt(U,B));export{te as createTwinFetch};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|