telnyx 7.25.0 → 7.26.0
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/CHANGELOG.md +7 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +14 -5
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +14 -5
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +232 -6
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +232 -6
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/index.d.mts +1 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +12 -0
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +12 -0
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/avatars.d.mts +187 -0
- package/resources/ai/avatars.d.mts.map +1 -0
- package/resources/ai/avatars.d.ts +187 -0
- package/resources/ai/avatars.d.ts.map +1 -0
- package/resources/ai/avatars.js +93 -0
- package/resources/ai/avatars.js.map +1 -0
- package/resources/ai/avatars.mjs +89 -0
- package/resources/ai/avatars.mjs.map +1 -0
- package/resources/ai/chat.d.mts +20 -6
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +20 -6
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.d.mts +8 -0
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +8 -0
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +3 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/index.js.map +1 -1
- package/resources/ai/memory/namespaces/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.mts +2 -2
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +2 -2
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/profiles/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts +54 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts +54 -1
- package/resources/ai/memory/namespaces/profiles/profiles.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.js +31 -0
- package/resources/ai/memory/namespaces/profiles/profiles.js.map +1 -1
- package/resources/ai/memory/namespaces/profiles/profiles.mjs +31 -0
- package/resources/ai/memory/namespaces/profiles/profiles.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +20 -6
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +20 -6
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +17 -1
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +17 -1
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +59 -13
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +59 -13
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +24 -14
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +24 -14
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +8 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +8 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/dir/dir.d.mts +10 -7
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +10 -7
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +1 -1
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +1 -1
- package/resources/dir/dir.mjs.map +1 -1
- package/resources/dir/phone-numbers.d.mts +0 -4
- package/resources/dir/phone-numbers.d.mts.map +1 -1
- package/resources/dir/phone-numbers.d.ts +0 -4
- package/resources/dir/phone-numbers.d.ts.map +1 -1
- package/resources/email-templates.d.mts +109 -18
- package/resources/email-templates.d.mts.map +1 -1
- package/resources/email-templates.d.ts +109 -18
- package/resources/email-templates.d.ts.map +1 -1
- package/resources/email-templates.js +5 -1
- package/resources/email-templates.js.map +1 -1
- package/resources/email-templates.mjs +5 -1
- package/resources/email-templates.mjs.map +1 -1
- package/resources/enterprises/dir.d.mts +8 -2
- package/resources/enterprises/dir.d.mts.map +1 -1
- package/resources/enterprises/dir.d.ts +8 -2
- package/resources/enterprises/dir.d.ts.map +1 -1
- package/resources/enterprises/dir.js +8 -2
- package/resources/enterprises/dir.js.map +1 -1
- package/resources/enterprises/dir.mjs +8 -2
- package/resources/enterprises/dir.mjs.map +1 -1
- package/resources/enterprises/enterprises.d.mts +7 -5
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +7 -5
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js +5 -3
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs +5 -3
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -1
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -1
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/external-verification.d.mts +94 -0
- package/resources/enterprises/reputation/external-verification.d.mts.map +1 -0
- package/resources/enterprises/reputation/external-verification.d.ts +94 -0
- package/resources/enterprises/reputation/external-verification.d.ts.map +1 -0
- package/resources/enterprises/reputation/external-verification.js +54 -0
- package/resources/enterprises/reputation/external-verification.js.map +1 -0
- package/resources/enterprises/reputation/external-verification.mjs +50 -0
- package/resources/enterprises/reputation/external-verification.mjs.map +1 -0
- package/resources/enterprises/reputation/index.d.mts +3 -2
- package/resources/enterprises/reputation/index.d.mts.map +1 -1
- package/resources/enterprises/reputation/index.d.ts +3 -2
- package/resources/enterprises/reputation/index.d.ts.map +1 -1
- package/resources/enterprises/reputation/index.js +3 -1
- package/resources/enterprises/reputation/index.js.map +1 -1
- package/resources/enterprises/reputation/index.mjs +1 -0
- package/resources/enterprises/reputation/index.mjs.map +1 -1
- package/resources/enterprises/reputation/loa.d.mts +3 -2
- package/resources/enterprises/reputation/loa.d.mts.map +1 -1
- package/resources/enterprises/reputation/loa.d.ts +3 -2
- package/resources/enterprises/reputation/loa.d.ts.map +1 -1
- package/resources/enterprises/reputation/numbers.d.mts +197 -4
- package/resources/enterprises/reputation/numbers.d.mts.map +1 -1
- package/resources/enterprises/reputation/numbers.d.ts +197 -4
- package/resources/enterprises/reputation/numbers.d.ts.map +1 -1
- package/resources/enterprises/reputation/numbers.js +58 -2
- package/resources/enterprises/reputation/numbers.js.map +1 -1
- package/resources/enterprises/reputation/numbers.mjs +58 -2
- package/resources/enterprises/reputation/numbers.mjs.map +1 -1
- package/resources/enterprises/reputation/remediation.d.mts +3 -2
- package/resources/enterprises/reputation/remediation.d.mts.map +1 -1
- package/resources/enterprises/reputation/remediation.d.ts +3 -2
- package/resources/enterprises/reputation/remediation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.mts +39 -3
- package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
- package/resources/enterprises/reputation/reputation.d.ts +39 -3
- package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
- package/resources/enterprises/reputation/reputation.js +22 -0
- package/resources/enterprises/reputation/reputation.js.map +1 -1
- package/resources/enterprises/reputation/reputation.mjs +22 -0
- package/resources/enterprises/reputation/reputation.mjs.map +1 -1
- package/resources/global-ip-assignment-health.d.mts +4 -4
- package/resources/global-ip-assignment-health.d.mts.map +1 -1
- package/resources/global-ip-assignment-health.d.ts +4 -4
- package/resources/global-ip-assignment-health.d.ts.map +1 -1
- package/resources/global-ip-assignments-usage.d.mts +4 -4
- package/resources/global-ip-assignments-usage.d.mts.map +1 -1
- package/resources/global-ip-assignments-usage.d.ts +4 -4
- package/resources/global-ip-assignments-usage.d.ts.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/llm-token-gateway/index.d.mts +4 -1
- package/resources/llm-token-gateway/index.d.mts.map +1 -1
- package/resources/llm-token-gateway/index.d.ts +4 -1
- package/resources/llm-token-gateway/index.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.js +7 -1
- package/resources/llm-token-gateway/index.js.map +1 -1
- package/resources/llm-token-gateway/index.mjs +4 -1
- package/resources/llm-token-gateway/index.mjs.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.d.mts +14 -2
- package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.d.ts +14 -2
- package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.js +12 -0
- package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -1
- package/resources/llm-token-gateway/llm-token-gateway.mjs +13 -1
- package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -1
- package/resources/llm-token-gateway/spend.d.mts +223 -0
- package/resources/llm-token-gateway/spend.d.mts.map +1 -0
- package/resources/llm-token-gateway/spend.d.ts +223 -0
- package/resources/llm-token-gateway/spend.d.ts.map +1 -0
- package/resources/llm-token-gateway/spend.js +56 -0
- package/resources/llm-token-gateway/spend.js.map +1 -0
- package/resources/llm-token-gateway/spend.mjs +52 -0
- package/resources/llm-token-gateway/spend.mjs.map +1 -0
- package/resources/llm-token-gateway/token-groups.d.mts +577 -0
- package/resources/llm-token-gateway/token-groups.d.mts.map +1 -0
- package/resources/llm-token-gateway/token-groups.d.ts +577 -0
- package/resources/llm-token-gateway/token-groups.d.ts.map +1 -0
- package/resources/llm-token-gateway/token-groups.js +139 -0
- package/resources/llm-token-gateway/token-groups.js.map +1 -0
- package/resources/llm-token-gateway/token-groups.mjs +135 -0
- package/resources/llm-token-gateway/token-groups.mjs.map +1 -0
- package/resources/llm-token-gateway/token-keys.d.mts +318 -0
- package/resources/llm-token-gateway/token-keys.d.mts.map +1 -0
- package/resources/llm-token-gateway/token-keys.d.ts +318 -0
- package/resources/llm-token-gateway/token-keys.d.ts.map +1 -0
- package/resources/llm-token-gateway/token-keys.js +127 -0
- package/resources/llm-token-gateway/token-keys.js.map +1 -0
- package/resources/llm-token-gateway/token-keys.mjs +123 -0
- package/resources/llm-token-gateway/token-keys.mjs.map +1 -0
- package/resources/llm-token-gateway/usage.d.mts +205 -146
- package/resources/llm-token-gateway/usage.d.mts.map +1 -1
- package/resources/llm-token-gateway/usage.d.ts +205 -146
- package/resources/llm-token-gateway/usage.d.ts.map +1 -1
- package/resources/llm-token-gateway/usage.js +47 -15
- package/resources/llm-token-gateway/usage.js.map +1 -1
- package/resources/llm-token-gateway/usage.mjs +47 -15
- package/resources/llm-token-gateway/usage.mjs.map +1 -1
- package/resources/phone-numbers/jobs.d.mts +17 -5
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +17 -5
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/jobs.js +4 -3
- package/resources/phone-numbers/jobs.js.map +1 -1
- package/resources/phone-numbers/jobs.mjs +4 -3
- package/resources/phone-numbers/jobs.mjs.map +1 -1
- package/resources/reputation/numbers.d.mts +10 -0
- package/resources/reputation/numbers.d.mts.map +1 -1
- package/resources/reputation/numbers.d.ts +10 -0
- package/resources/reputation/numbers.d.ts.map +1 -1
- package/resources/sip-registration-status.d.mts +149 -0
- package/resources/sip-registration-status.d.mts.map +1 -0
- package/resources/sip-registration-status.d.ts +149 -0
- package/resources/sip-registration-status.d.ts.map +1 -0
- package/resources/sip-registration-status.js +32 -0
- package/resources/sip-registration-status.js.map +1 -0
- package/resources/sip-registration-status.mjs +28 -0
- package/resources/sip-registration-status.mjs.map +1 -0
- package/resources/texml/texml.d.mts +7 -3
- package/resources/texml/texml.d.mts.map +1 -1
- package/resources/texml/texml.d.ts +7 -3
- package/resources/texml/texml.d.ts.map +1 -1
- package/resources/texml/texml.js +4 -2
- package/resources/texml/texml.js.map +1 -1
- package/resources/texml/texml.mjs +4 -2
- package/resources/texml/texml.mjs.map +1 -1
- package/resources/webhooks.d.mts +566 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +566 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/whatsapp/index.d.mts +1 -0
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +1 -0
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/index.js +3 -1
- package/resources/whatsapp/index.js.map +1 -1
- package/resources/whatsapp/index.mjs +1 -0
- package/resources/whatsapp/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.js +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.mjs +6 -5
- package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -1
- package/resources/whatsapp/signup.d.mts +128 -0
- package/resources/whatsapp/signup.d.mts.map +1 -0
- package/resources/whatsapp/signup.d.ts +128 -0
- package/resources/whatsapp/signup.d.ts.map +1 -0
- package/resources/whatsapp/signup.js +42 -0
- package/resources/whatsapp/signup.js.map +1 -0
- package/resources/whatsapp/signup.mjs +38 -0
- package/resources/whatsapp/signup.mjs.map +1 -0
- package/resources/whatsapp/whatsapp.d.mts +4 -0
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +4 -0
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.js +4 -0
- package/resources/whatsapp/whatsapp.js.map +1 -1
- package/resources/whatsapp/whatsapp.mjs +4 -0
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +28 -0
- package/src/resources/ai/ai.ts +38 -3
- package/src/resources/ai/assistants/assistants.ts +292 -5
- package/src/resources/ai/assistants/index.ts +2 -0
- package/src/resources/ai/assistants/versions.ts +14 -0
- package/src/resources/ai/avatars.ts +238 -0
- package/src/resources/ai/chat.ts +20 -6
- package/src/resources/ai/conversations/conversations.ts +9 -0
- package/src/resources/ai/index.ts +13 -0
- package/src/resources/ai/memory/namespaces/index.ts +2 -0
- package/src/resources/ai/memory/namespaces/namespaces.ts +4 -0
- package/src/resources/ai/memory/namespaces/profiles/index.ts +2 -0
- package/src/resources/ai/memory/namespaces/profiles/profiles.ts +71 -0
- package/src/resources/ai/openai/chat.ts +20 -6
- package/src/resources/ai/tools.ts +19 -1
- package/src/resources/calls/actions.ts +65 -10
- package/src/resources/calls/calls.ts +24 -8
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/dir/dir.ts +10 -7
- package/src/resources/dir/phone-numbers.ts +1 -6
- package/src/resources/email-templates.ts +121 -19
- package/src/resources/enterprises/dir.ts +8 -2
- package/src/resources/enterprises/enterprises.ts +7 -3
- package/src/resources/enterprises/index.ts +1 -0
- package/src/resources/enterprises/reputation/external-verification.ts +125 -0
- package/src/resources/enterprises/reputation/index.ts +12 -0
- package/src/resources/enterprises/reputation/loa.ts +3 -2
- package/src/resources/enterprises/reputation/numbers.ts +256 -3
- package/src/resources/enterprises/reputation/remediation.ts +3 -2
- package/src/resources/enterprises/reputation/reputation.ts +70 -0
- package/src/resources/global-ip-assignment-health.ts +4 -4
- package/src/resources/global-ip-assignments-usage.ts +4 -4
- package/src/resources/index.ts +11 -0
- package/src/resources/llm-token-gateway/index.ts +38 -1
- package/src/resources/llm-token-gateway/llm-token-gateway.ts +83 -1
- package/src/resources/llm-token-gateway/spend.ts +309 -0
- package/src/resources/llm-token-gateway/token-groups.ts +724 -0
- package/src/resources/llm-token-gateway/token-keys.ts +422 -0
- package/src/resources/llm-token-gateway/usage.ts +273 -149
- package/src/resources/phone-numbers/jobs.ts +18 -5
- package/src/resources/reputation/numbers.ts +12 -0
- package/src/resources/sip-registration-status.ts +188 -0
- package/src/resources/texml/texml.ts +7 -3
- package/src/resources/webhooks.ts +754 -15
- package/src/resources/whatsapp/index.ts +7 -0
- package/src/resources/whatsapp/phone-numbers/calling-routing.ts +6 -5
- package/src/resources/whatsapp/signup.ts +188 -0
- package/src/resources/whatsapp/whatsapp.ts +18 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -8,7 +8,11 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class EmailTemplates extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Lists templates sorted newest first by `created_at desc, id desc`.
|
|
11
|
+
* Lists templates sorted newest first by `created_at desc, id desc`. Optional
|
|
12
|
+
* filters match a case-insensitive literal name/subject query, stored body
|
|
13
|
+
* presence, and the `strict_variables` and `autoescape` settings. Filters
|
|
14
|
+
* intersect, remain scoped to the authenticated account, and apply before cursor
|
|
15
|
+
* pagination. Invalid filter names or values return 400.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
@@ -108,7 +112,10 @@ export declare class EmailTemplates extends APIResource {
|
|
|
108
112
|
render(id: string, body?: EmailTemplateRenderParams | null | undefined, options?: RequestOptions): APIPromise<EmailTemplateRenderResponse>;
|
|
109
113
|
}
|
|
110
114
|
export type EmailTemplatesEmailCursorPagination = EmailCursorPagination<EmailTemplate>;
|
|
111
|
-
export interface EmailTemplate {
|
|
115
|
+
export interface EmailTemplate extends EmailTemplateCommon {
|
|
116
|
+
subject: string | null;
|
|
117
|
+
}
|
|
118
|
+
export interface EmailTemplateCommon {
|
|
112
119
|
id: string;
|
|
113
120
|
/**
|
|
114
121
|
* Whether HTML autoescaping is enabled for this template. When `true`, only
|
|
@@ -126,7 +133,6 @@ export interface EmailTemplate {
|
|
|
126
133
|
* `variable_schema` fail with 422 naming the variable.
|
|
127
134
|
*/
|
|
128
135
|
strict_variables: boolean;
|
|
129
|
-
subject: string | null;
|
|
130
136
|
text_body: string | null;
|
|
131
137
|
updated_at: string;
|
|
132
138
|
/**
|
|
@@ -134,14 +140,21 @@ export interface EmailTemplate {
|
|
|
134
140
|
* legacy `variables` array.
|
|
135
141
|
*/
|
|
136
142
|
variable_schema: {
|
|
137
|
-
[key: string]:
|
|
143
|
+
[key: string]: EmailTemplateCommon.VariableSchema;
|
|
138
144
|
} | null;
|
|
139
145
|
/**
|
|
140
|
-
*
|
|
146
|
+
* Persisted variable names. In `explicit` mode this array preserves the exact
|
|
147
|
+
* provided order, duplicates, and string contents; in `automatic` mode it is
|
|
148
|
+
* derived from the stored subject and bodies.
|
|
141
149
|
*/
|
|
142
150
|
variables: Array<string>;
|
|
151
|
+
/**
|
|
152
|
+
* `automatic` when variable names are derived from template content; `explicit`
|
|
153
|
+
* when `variables` is the exact manually managed array.
|
|
154
|
+
*/
|
|
155
|
+
variables_mode: 'automatic' | 'explicit';
|
|
143
156
|
}
|
|
144
|
-
export declare namespace
|
|
157
|
+
export declare namespace EmailTemplateCommon {
|
|
145
158
|
interface VariableSchema {
|
|
146
159
|
/**
|
|
147
160
|
* Whether the variable must be supplied when strict variable validation is
|
|
@@ -186,7 +199,21 @@ export interface UpdateEmailTemplateRequest {
|
|
|
186
199
|
variable_schema?: {
|
|
187
200
|
[key: string]: UpdateEmailTemplateRequest.VariableSchema;
|
|
188
201
|
} | null;
|
|
189
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
204
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
205
|
+
* Unicode code points.
|
|
206
|
+
*/
|
|
207
|
+
variables?: Array<string> | null;
|
|
208
|
+
/**
|
|
209
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
210
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
211
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
212
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
213
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
214
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
215
|
+
*/
|
|
216
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
190
217
|
}
|
|
191
218
|
export declare namespace UpdateEmailTemplateRequest {
|
|
192
219
|
interface VariableSchema {
|
|
@@ -204,21 +231,47 @@ export declare namespace UpdateEmailTemplateRequest {
|
|
|
204
231
|
export interface EmailTemplateRenderResponse {
|
|
205
232
|
/**
|
|
206
233
|
* Template object with `subject`, `html_body`, and `text_body` replaced by their
|
|
207
|
-
* Liquid-rendered values.
|
|
208
|
-
* remain unchanged.
|
|
234
|
+
* Liquid-rendered values. Rendered content is not limited by the stored
|
|
235
|
+
* template-field lengths. All other template fields remain unchanged.
|
|
209
236
|
*/
|
|
210
237
|
data: EmailTemplateRenderResponse.Data;
|
|
211
238
|
}
|
|
212
239
|
export declare namespace EmailTemplateRenderResponse {
|
|
213
240
|
/**
|
|
214
241
|
* Template object with `subject`, `html_body`, and `text_body` replaced by their
|
|
215
|
-
* Liquid-rendered values.
|
|
216
|
-
* remain unchanged.
|
|
242
|
+
* Liquid-rendered values. Rendered content is not limited by the stored
|
|
243
|
+
* template-field lengths. All other template fields remain unchanged.
|
|
217
244
|
*/
|
|
218
|
-
interface Data extends EmailTemplatesAPI.
|
|
245
|
+
interface Data extends EmailTemplatesAPI.EmailTemplateCommon {
|
|
246
|
+
subject: string | null;
|
|
219
247
|
}
|
|
220
248
|
}
|
|
221
249
|
export interface EmailTemplateListParams extends EmailCursorPaginationParams {
|
|
250
|
+
/**
|
|
251
|
+
* Exact match on the template's `autoescape` option. Only the exact query strings
|
|
252
|
+
* `true` and `false` are accepted; other values, including blank, return 400.
|
|
253
|
+
*/
|
|
254
|
+
'filter[autoescape]'?: 'true' | 'false';
|
|
255
|
+
/**
|
|
256
|
+
* Matches templates by stored body presence. `html_and_text` requires both an HTML
|
|
257
|
+
* and text body; `html_only` requires HTML and no text body; `text_only` requires
|
|
258
|
+
* text and no HTML body; `no_body` requires neither. `null` and exactly `""` count
|
|
259
|
+
* as absent; whitespace-only strings count as content. An empty or unsupported
|
|
260
|
+
* value returns a 400 response.
|
|
261
|
+
*/
|
|
262
|
+
'filter[content_type]'?: 'html_and_text' | 'html_only' | 'text_only' | 'no_body';
|
|
263
|
+
/**
|
|
264
|
+
* Case-insensitive literal substring match over the template `name` or stored
|
|
265
|
+
* `subject` only; bodies are never searched. `%`, `_`, and `\` are literal
|
|
266
|
+
* characters with no wildcard meaning. A blank value is treated as omitted.
|
|
267
|
+
*/
|
|
268
|
+
'filter[query]'?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Exact match on the template's `strict_variables` option. Only the exact query
|
|
271
|
+
* strings `true` and `false` are accepted; other values, including blank,
|
|
272
|
+
* return 400.
|
|
273
|
+
*/
|
|
274
|
+
'filter[strict_variables]'?: 'true' | 'false';
|
|
222
275
|
}
|
|
223
276
|
export interface EmailTemplateCreateParams {
|
|
224
277
|
/**
|
|
@@ -270,10 +323,20 @@ export interface EmailTemplateCreateParams {
|
|
|
270
323
|
[key: string]: EmailTemplateCreateParams.VariableSchema;
|
|
271
324
|
} | null;
|
|
272
325
|
/**
|
|
273
|
-
* Body param:
|
|
274
|
-
*
|
|
326
|
+
* Body param: Persisted variable names. In `automatic` mode a non-null array is
|
|
327
|
+
* rejected; in `explicit` mode this is the exact manual array and each item is
|
|
328
|
+
* limited to 255 Unicode code points.
|
|
275
329
|
*/
|
|
276
|
-
variables?: Array<string
|
|
330
|
+
variables?: Array<string> | null;
|
|
331
|
+
/**
|
|
332
|
+
* Body param: Controls how `variables` is maintained. If both fields are omitted
|
|
333
|
+
* (or `variables` is null), the template uses `automatic` mode and extracts
|
|
334
|
+
* variable names from the effective subject, HTML body, and text body. A non-null
|
|
335
|
+
* `variables` array with no mode selects `explicit`. `automatic` rejects a
|
|
336
|
+
* simultaneous non-null array; `explicit` requires a non-null array, including
|
|
337
|
+
* valid `[]`, and preserves its exact order, duplicates, and string contents.
|
|
338
|
+
*/
|
|
339
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
277
340
|
/**
|
|
278
341
|
* Header param: Optional opaque, unquoted key for safely retrying the same logical
|
|
279
342
|
* request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
|
|
@@ -328,7 +391,21 @@ export interface EmailTemplateReplaceParams {
|
|
|
328
391
|
variable_schema?: {
|
|
329
392
|
[key: string]: EmailTemplateReplaceParams.VariableSchema;
|
|
330
393
|
} | null;
|
|
331
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
396
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
397
|
+
* Unicode code points.
|
|
398
|
+
*/
|
|
399
|
+
variables?: Array<string> | null;
|
|
400
|
+
/**
|
|
401
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
402
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
403
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
404
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
405
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
406
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
407
|
+
*/
|
|
408
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
332
409
|
}
|
|
333
410
|
export declare namespace EmailTemplateReplaceParams {
|
|
334
411
|
interface VariableSchema {
|
|
@@ -372,7 +449,21 @@ export interface EmailTemplateUpdateParams {
|
|
|
372
449
|
variable_schema?: {
|
|
373
450
|
[key: string]: EmailTemplateUpdateParams.VariableSchema;
|
|
374
451
|
} | null;
|
|
375
|
-
|
|
452
|
+
/**
|
|
453
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
454
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
455
|
+
* Unicode code points.
|
|
456
|
+
*/
|
|
457
|
+
variables?: Array<string> | null;
|
|
458
|
+
/**
|
|
459
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
460
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
461
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
462
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
463
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
464
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
465
|
+
*/
|
|
466
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
376
467
|
}
|
|
377
468
|
export declare namespace EmailTemplateUpdateParams {
|
|
378
469
|
interface VariableSchema {
|
|
@@ -397,6 +488,6 @@ export interface EmailTemplateRenderParams {
|
|
|
397
488
|
};
|
|
398
489
|
}
|
|
399
490
|
export declare namespace EmailTemplates {
|
|
400
|
-
export { type EmailTemplate as EmailTemplate, type EmailTemplateResponse as EmailTemplateResponse, type UpdateEmailTemplateRequest as UpdateEmailTemplateRequest, type EmailTemplateRenderResponse as EmailTemplateRenderResponse, type EmailTemplatesEmailCursorPagination as EmailTemplatesEmailCursorPagination, type EmailTemplateListParams as EmailTemplateListParams, type EmailTemplateCreateParams as EmailTemplateCreateParams, type EmailTemplateReplaceParams as EmailTemplateReplaceParams, type EmailTemplateUpdateParams as EmailTemplateUpdateParams, type EmailTemplateRenderParams as EmailTemplateRenderParams, };
|
|
491
|
+
export { type EmailTemplate as EmailTemplate, type EmailTemplateCommon as EmailTemplateCommon, type EmailTemplateResponse as EmailTemplateResponse, type UpdateEmailTemplateRequest as UpdateEmailTemplateRequest, type EmailTemplateRenderResponse as EmailTemplateRenderResponse, type EmailTemplatesEmailCursorPagination as EmailTemplatesEmailCursorPagination, type EmailTemplateListParams as EmailTemplateListParams, type EmailTemplateCreateParams as EmailTemplateCreateParams, type EmailTemplateReplaceParams as EmailTemplateReplaceParams, type EmailTemplateUpdateParams as EmailTemplateUpdateParams, type EmailTemplateRenderParams as EmailTemplateRenderParams, };
|
|
401
492
|
}
|
|
402
493
|
//# sourceMappingURL=email-templates.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-templates.d.mts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"email-templates.d.mts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAA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C7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -8,7 +8,11 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class EmailTemplates extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Lists templates sorted newest first by `created_at desc, id desc`.
|
|
11
|
+
* Lists templates sorted newest first by `created_at desc, id desc`. Optional
|
|
12
|
+
* filters match a case-insensitive literal name/subject query, stored body
|
|
13
|
+
* presence, and the `strict_variables` and `autoescape` settings. Filters
|
|
14
|
+
* intersect, remain scoped to the authenticated account, and apply before cursor
|
|
15
|
+
* pagination. Invalid filter names or values return 400.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
@@ -108,7 +112,10 @@ export declare class EmailTemplates extends APIResource {
|
|
|
108
112
|
render(id: string, body?: EmailTemplateRenderParams | null | undefined, options?: RequestOptions): APIPromise<EmailTemplateRenderResponse>;
|
|
109
113
|
}
|
|
110
114
|
export type EmailTemplatesEmailCursorPagination = EmailCursorPagination<EmailTemplate>;
|
|
111
|
-
export interface EmailTemplate {
|
|
115
|
+
export interface EmailTemplate extends EmailTemplateCommon {
|
|
116
|
+
subject: string | null;
|
|
117
|
+
}
|
|
118
|
+
export interface EmailTemplateCommon {
|
|
112
119
|
id: string;
|
|
113
120
|
/**
|
|
114
121
|
* Whether HTML autoescaping is enabled for this template. When `true`, only
|
|
@@ -126,7 +133,6 @@ export interface EmailTemplate {
|
|
|
126
133
|
* `variable_schema` fail with 422 naming the variable.
|
|
127
134
|
*/
|
|
128
135
|
strict_variables: boolean;
|
|
129
|
-
subject: string | null;
|
|
130
136
|
text_body: string | null;
|
|
131
137
|
updated_at: string;
|
|
132
138
|
/**
|
|
@@ -134,14 +140,21 @@ export interface EmailTemplate {
|
|
|
134
140
|
* legacy `variables` array.
|
|
135
141
|
*/
|
|
136
142
|
variable_schema: {
|
|
137
|
-
[key: string]:
|
|
143
|
+
[key: string]: EmailTemplateCommon.VariableSchema;
|
|
138
144
|
} | null;
|
|
139
145
|
/**
|
|
140
|
-
*
|
|
146
|
+
* Persisted variable names. In `explicit` mode this array preserves the exact
|
|
147
|
+
* provided order, duplicates, and string contents; in `automatic` mode it is
|
|
148
|
+
* derived from the stored subject and bodies.
|
|
141
149
|
*/
|
|
142
150
|
variables: Array<string>;
|
|
151
|
+
/**
|
|
152
|
+
* `automatic` when variable names are derived from template content; `explicit`
|
|
153
|
+
* when `variables` is the exact manually managed array.
|
|
154
|
+
*/
|
|
155
|
+
variables_mode: 'automatic' | 'explicit';
|
|
143
156
|
}
|
|
144
|
-
export declare namespace
|
|
157
|
+
export declare namespace EmailTemplateCommon {
|
|
145
158
|
interface VariableSchema {
|
|
146
159
|
/**
|
|
147
160
|
* Whether the variable must be supplied when strict variable validation is
|
|
@@ -186,7 +199,21 @@ export interface UpdateEmailTemplateRequest {
|
|
|
186
199
|
variable_schema?: {
|
|
187
200
|
[key: string]: UpdateEmailTemplateRequest.VariableSchema;
|
|
188
201
|
} | null;
|
|
189
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
204
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
205
|
+
* Unicode code points.
|
|
206
|
+
*/
|
|
207
|
+
variables?: Array<string> | null;
|
|
208
|
+
/**
|
|
209
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
210
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
211
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
212
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
213
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
214
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
215
|
+
*/
|
|
216
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
190
217
|
}
|
|
191
218
|
export declare namespace UpdateEmailTemplateRequest {
|
|
192
219
|
interface VariableSchema {
|
|
@@ -204,21 +231,47 @@ export declare namespace UpdateEmailTemplateRequest {
|
|
|
204
231
|
export interface EmailTemplateRenderResponse {
|
|
205
232
|
/**
|
|
206
233
|
* Template object with `subject`, `html_body`, and `text_body` replaced by their
|
|
207
|
-
* Liquid-rendered values.
|
|
208
|
-
* remain unchanged.
|
|
234
|
+
* Liquid-rendered values. Rendered content is not limited by the stored
|
|
235
|
+
* template-field lengths. All other template fields remain unchanged.
|
|
209
236
|
*/
|
|
210
237
|
data: EmailTemplateRenderResponse.Data;
|
|
211
238
|
}
|
|
212
239
|
export declare namespace EmailTemplateRenderResponse {
|
|
213
240
|
/**
|
|
214
241
|
* Template object with `subject`, `html_body`, and `text_body` replaced by their
|
|
215
|
-
* Liquid-rendered values.
|
|
216
|
-
* remain unchanged.
|
|
242
|
+
* Liquid-rendered values. Rendered content is not limited by the stored
|
|
243
|
+
* template-field lengths. All other template fields remain unchanged.
|
|
217
244
|
*/
|
|
218
|
-
interface Data extends EmailTemplatesAPI.
|
|
245
|
+
interface Data extends EmailTemplatesAPI.EmailTemplateCommon {
|
|
246
|
+
subject: string | null;
|
|
219
247
|
}
|
|
220
248
|
}
|
|
221
249
|
export interface EmailTemplateListParams extends EmailCursorPaginationParams {
|
|
250
|
+
/**
|
|
251
|
+
* Exact match on the template's `autoescape` option. Only the exact query strings
|
|
252
|
+
* `true` and `false` are accepted; other values, including blank, return 400.
|
|
253
|
+
*/
|
|
254
|
+
'filter[autoescape]'?: 'true' | 'false';
|
|
255
|
+
/**
|
|
256
|
+
* Matches templates by stored body presence. `html_and_text` requires both an HTML
|
|
257
|
+
* and text body; `html_only` requires HTML and no text body; `text_only` requires
|
|
258
|
+
* text and no HTML body; `no_body` requires neither. `null` and exactly `""` count
|
|
259
|
+
* as absent; whitespace-only strings count as content. An empty or unsupported
|
|
260
|
+
* value returns a 400 response.
|
|
261
|
+
*/
|
|
262
|
+
'filter[content_type]'?: 'html_and_text' | 'html_only' | 'text_only' | 'no_body';
|
|
263
|
+
/**
|
|
264
|
+
* Case-insensitive literal substring match over the template `name` or stored
|
|
265
|
+
* `subject` only; bodies are never searched. `%`, `_`, and `\` are literal
|
|
266
|
+
* characters with no wildcard meaning. A blank value is treated as omitted.
|
|
267
|
+
*/
|
|
268
|
+
'filter[query]'?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Exact match on the template's `strict_variables` option. Only the exact query
|
|
271
|
+
* strings `true` and `false` are accepted; other values, including blank,
|
|
272
|
+
* return 400.
|
|
273
|
+
*/
|
|
274
|
+
'filter[strict_variables]'?: 'true' | 'false';
|
|
222
275
|
}
|
|
223
276
|
export interface EmailTemplateCreateParams {
|
|
224
277
|
/**
|
|
@@ -270,10 +323,20 @@ export interface EmailTemplateCreateParams {
|
|
|
270
323
|
[key: string]: EmailTemplateCreateParams.VariableSchema;
|
|
271
324
|
} | null;
|
|
272
325
|
/**
|
|
273
|
-
* Body param:
|
|
274
|
-
*
|
|
326
|
+
* Body param: Persisted variable names. In `automatic` mode a non-null array is
|
|
327
|
+
* rejected; in `explicit` mode this is the exact manual array and each item is
|
|
328
|
+
* limited to 255 Unicode code points.
|
|
275
329
|
*/
|
|
276
|
-
variables?: Array<string
|
|
330
|
+
variables?: Array<string> | null;
|
|
331
|
+
/**
|
|
332
|
+
* Body param: Controls how `variables` is maintained. If both fields are omitted
|
|
333
|
+
* (or `variables` is null), the template uses `automatic` mode and extracts
|
|
334
|
+
* variable names from the effective subject, HTML body, and text body. A non-null
|
|
335
|
+
* `variables` array with no mode selects `explicit`. `automatic` rejects a
|
|
336
|
+
* simultaneous non-null array; `explicit` requires a non-null array, including
|
|
337
|
+
* valid `[]`, and preserves its exact order, duplicates, and string contents.
|
|
338
|
+
*/
|
|
339
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
277
340
|
/**
|
|
278
341
|
* Header param: Optional opaque, unquoted key for safely retrying the same logical
|
|
279
342
|
* request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores.
|
|
@@ -328,7 +391,21 @@ export interface EmailTemplateReplaceParams {
|
|
|
328
391
|
variable_schema?: {
|
|
329
392
|
[key: string]: EmailTemplateReplaceParams.VariableSchema;
|
|
330
393
|
} | null;
|
|
331
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
396
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
397
|
+
* Unicode code points.
|
|
398
|
+
*/
|
|
399
|
+
variables?: Array<string> | null;
|
|
400
|
+
/**
|
|
401
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
402
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
403
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
404
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
405
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
406
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
407
|
+
*/
|
|
408
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
332
409
|
}
|
|
333
410
|
export declare namespace EmailTemplateReplaceParams {
|
|
334
411
|
interface VariableSchema {
|
|
@@ -372,7 +449,21 @@ export interface EmailTemplateUpdateParams {
|
|
|
372
449
|
variable_schema?: {
|
|
373
450
|
[key: string]: EmailTemplateUpdateParams.VariableSchema;
|
|
374
451
|
} | null;
|
|
375
|
-
|
|
452
|
+
/**
|
|
453
|
+
* Persisted variable names. In `automatic` mode a non-null array is rejected; in
|
|
454
|
+
* `explicit` mode this is the exact manual array and each item is limited to 255
|
|
455
|
+
* Unicode code points.
|
|
456
|
+
*/
|
|
457
|
+
variables?: Array<string> | null;
|
|
458
|
+
/**
|
|
459
|
+
* Controls how `variables` is maintained. Setting `automatic` re-extracts
|
|
460
|
+
* immediately from the effective subject, HTML body, and text body and rejects a
|
|
461
|
+
* simultaneous non-null array. Setting `explicit` requires the exact non-null
|
|
462
|
+
* array, including valid `[]`. With the mode omitted, a non-null array selects
|
|
463
|
+
* explicit mode, null selects automatic mode, and omitting both fields preserves
|
|
464
|
+
* the current mode. Source-content changes re-extract only in automatic mode.
|
|
465
|
+
*/
|
|
466
|
+
variables_mode?: 'automatic' | 'explicit';
|
|
376
467
|
}
|
|
377
468
|
export declare namespace EmailTemplateUpdateParams {
|
|
378
469
|
interface VariableSchema {
|
|
@@ -397,6 +488,6 @@ export interface EmailTemplateRenderParams {
|
|
|
397
488
|
};
|
|
398
489
|
}
|
|
399
490
|
export declare namespace EmailTemplates {
|
|
400
|
-
export { type EmailTemplate as EmailTemplate, type EmailTemplateResponse as EmailTemplateResponse, type UpdateEmailTemplateRequest as UpdateEmailTemplateRequest, type EmailTemplateRenderResponse as EmailTemplateRenderResponse, type EmailTemplatesEmailCursorPagination as EmailTemplatesEmailCursorPagination, type EmailTemplateListParams as EmailTemplateListParams, type EmailTemplateCreateParams as EmailTemplateCreateParams, type EmailTemplateReplaceParams as EmailTemplateReplaceParams, type EmailTemplateUpdateParams as EmailTemplateUpdateParams, type EmailTemplateRenderParams as EmailTemplateRenderParams, };
|
|
491
|
+
export { type EmailTemplate as EmailTemplate, type EmailTemplateCommon as EmailTemplateCommon, type EmailTemplateResponse as EmailTemplateResponse, type UpdateEmailTemplateRequest as UpdateEmailTemplateRequest, type EmailTemplateRenderResponse as EmailTemplateRenderResponse, type EmailTemplatesEmailCursorPagination as EmailTemplatesEmailCursorPagination, type EmailTemplateListParams as EmailTemplateListParams, type EmailTemplateCreateParams as EmailTemplateCreateParams, type EmailTemplateReplaceParams as EmailTemplateReplaceParams, type EmailTemplateUpdateParams as EmailTemplateUpdateParams, type EmailTemplateRenderParams as EmailTemplateRenderParams, };
|
|
401
492
|
}
|
|
402
493
|
//# sourceMappingURL=email-templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-templates.d.ts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,iBAAiB,6BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"email-templates.d.ts","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,iBAAiB,6BAA0B;AACvD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;AAE1G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,aAAa,CAAC;IAOlE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAYtG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO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,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,cAAc,CAAA;KAAE,GAAG,IAAI,CAAC;IAErF;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEjC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CAC3C;AAED,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,cAAc;QAC7B;;;WAGG;QACH,QAAQ,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -11,7 +11,11 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
11
11
|
*/
|
|
12
12
|
class EmailTemplates extends resource_1.APIResource {
|
|
13
13
|
/**
|
|
14
|
-
* Lists templates sorted newest first by `created_at desc, id desc`.
|
|
14
|
+
* Lists templates sorted newest first by `created_at desc, id desc`. Optional
|
|
15
|
+
* filters match a case-insensitive literal name/subject query, stored body
|
|
16
|
+
* presence, and the `strict_variables` and `autoescape` settings. Filters
|
|
17
|
+
* intersect, remain scoped to the authenticated account, and apply before cursor
|
|
18
|
+
* pagination. Invalid filter names or values return 400.
|
|
15
19
|
*
|
|
16
20
|
* @example
|
|
17
21
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-templates.js","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAA0G;AAC1G,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"email-templates.js","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAA0G;AAC1G,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,kCAAoC,CAAA,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAA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AC,CAAC;IACtF,CAAC;CACF;AAzJD,wCAyJC"}
|
|
@@ -8,7 +8,11 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
8
8
|
*/
|
|
9
9
|
export class EmailTemplates extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Lists templates sorted newest first by `created_at desc, id desc`.
|
|
11
|
+
* Lists templates sorted newest first by `created_at desc, id desc`. Optional
|
|
12
|
+
* filters match a case-insensitive literal name/subject query, stored body
|
|
13
|
+
* presence, and the `strict_variables` and `autoescape` settings. Filters
|
|
14
|
+
* intersect, remain scoped to the authenticated account, and apply before cursor
|
|
15
|
+
* pagination. Invalid filter names or values return 400.
|
|
12
16
|
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-templates.mjs","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,qBAAqB,EAAiD,+BAA2B;AAC1G,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"email-templates.mjs","sourceRoot":"","sources":["../src/resources/email-templates.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,qBAAqB,EAAiD,+BAA2B;AAC1G,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBA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;IAC9E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,EAAU,EACV,OAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oBAAoB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
|
|
@@ -52,10 +52,16 @@ export declare class Dir extends APIResource {
|
|
|
52
52
|
*
|
|
53
53
|
* **Failure modes**
|
|
54
54
|
*
|
|
55
|
-
* - `
|
|
56
|
-
* - `
|
|
55
|
+
* - `400` - validation error; `errors[].source.pointer` names the offending field.
|
|
56
|
+
* - `400` - a certification field is not `true`.
|
|
57
|
+
* - `400` - Branded Calling not activated on this enterprise (see
|
|
57
58
|
* `POST /enterprises/{id}/branded_calling`).
|
|
59
|
+
* - `400` - the enterprise is a BPO enterprise (`role_type` `bpo`), which cannot
|
|
60
|
+
* own a DIR.
|
|
61
|
+
* - `400` - a `bpo_authorizations` entry is not an approved BPO enterprise in your
|
|
62
|
+
* account, or its `loa_document_id` could not be validated.
|
|
58
63
|
* - `404` - enterprise does not exist or does not belong to your account.
|
|
64
|
+
* - `503` - the document check is temporarily unavailable; retry.
|
|
59
65
|
*
|
|
60
66
|
* @example
|
|
61
67
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.d.mts","sourceRoot":"","sources":["../../src/resources/enterprises/dir.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,uB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AAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACzF;AAED,OAAO,EAAE,KAAK,yBAAyB,EAAE,CAAC"}
|
|
@@ -52,10 +52,16 @@ export declare class Dir extends APIResource {
|
|
|
52
52
|
*
|
|
53
53
|
* **Failure modes**
|
|
54
54
|
*
|
|
55
|
-
* - `
|
|
56
|
-
* - `
|
|
55
|
+
* - `400` - validation error; `errors[].source.pointer` names the offending field.
|
|
56
|
+
* - `400` - a certification field is not `true`.
|
|
57
|
+
* - `400` - Branded Calling not activated on this enterprise (see
|
|
57
58
|
* `POST /enterprises/{id}/branded_calling`).
|
|
59
|
+
* - `400` - the enterprise is a BPO enterprise (`role_type` `bpo`), which cannot
|
|
60
|
+
* own a DIR.
|
|
61
|
+
* - `400` - a `bpo_authorizations` entry is not an approved BPO enterprise in your
|
|
62
|
+
* account, or its `loa_document_id` could not be validated.
|
|
58
63
|
* - `404` - enterprise does not exist or does not belong to your account.
|
|
64
|
+
* - `503` - the document check is temporarily unavailable; retry.
|
|
59
65
|
*
|
|
60
66
|
* @example
|
|
61
67
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/resources/enterprises/dir.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,sBAAmB;AACrC,OAAO,EAAE,yBAAyB,EAAE,sBAAmB;AACvD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAyB,KAAK,2BAA2B,EAAE,WAAW,EAAE,iCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;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_1.APIResource {
|
|
|
55
55
|
*
|
|
56
56
|
* **Failure modes**
|
|
57
57
|
*
|
|
58
|
-
* - `
|
|
59
|
-
* - `
|
|
58
|
+
* - `400` - validation error; `errors[].source.pointer` names the offending field.
|
|
59
|
+
* - `400` - a certification field is not `true`.
|
|
60
|
+
* - `400` - Branded Calling not activated on this enterprise (see
|
|
60
61
|
* `POST /enterprises/{id}/branded_calling`).
|
|
62
|
+
* - `400` - the enterprise is a BPO enterprise (`role_type` `bpo`), which cannot
|
|
63
|
+
* own a DIR.
|
|
64
|
+
* - `400` - a `bpo_authorizations` entry is not an approved BPO enterprise in your
|
|
65
|
+
* account, or its `loa_document_id` could not be validated.
|
|
61
66
|
* - `404` - enterprise does not exist or does not belong to your account.
|
|
67
|
+
* - `503` - the document check is temporarily unavailable; retry.
|
|
62
68
|
*
|
|
63
69
|
* @example
|
|
64
70
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.js","sourceRoot":"","sources":["../../src/resources/enterprises/dir.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAA6G;AAE7G,uDAAiD;AAEjD;;GAEG;AACH,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,YAAoB,EACpB,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,gBAAgB,YAAY,MAAM,EACtC,CAAA,kCAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"dir.js","sourceRoot":"","sources":["../../src/resources/enterprises/dir.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAA6G;AAE7G,uDAAiD;AAEjD;;GAEG;AACH,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,YAAoB,EACpB,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,gBAAgB,YAAY,MAAM,EACtC,CAAA,kCAAiC,CAAA,EACjC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,MAAM,CACJ,YAAoB,EACpB,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,YAAY,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CACF;AA7FD,kBA6FC"}
|