telnyx 7.24.0 → 7.25.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 +19 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +7 -6
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +7 -6
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +320 -28
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +320 -28
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +79 -2
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +79 -2
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/deleted.d.mts +60 -0
- package/resources/ai/assistants/deleted.d.mts.map +1 -0
- package/resources/ai/assistants/deleted.d.ts +60 -0
- package/resources/ai/assistants/deleted.d.ts.map +1 -0
- package/resources/ai/assistants/deleted.js +49 -0
- package/resources/ai/assistants/deleted.js.map +1 -0
- package/resources/ai/assistants/deleted.mjs +45 -0
- package/resources/ai/assistants/deleted.mjs.map +1 -0
- package/resources/ai/assistants/index.d.mts +2 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +2 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js +3 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs +1 -0
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +36 -0
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +36 -0
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/chat.d.mts +7 -2
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +7 -2
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/embeddings/embeddings.d.mts +1 -1
- package/resources/ai/embeddings/embeddings.d.ts +1 -1
- package/resources/ai/embeddings/embeddings.js +1 -1
- package/resources/ai/embeddings/embeddings.mjs +1 -1
- package/resources/ai/index.d.mts +2 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/memory/index.d.mts +1 -1
- package/resources/ai/memory/index.d.mts.map +1 -1
- package/resources/ai/memory/index.d.ts +1 -1
- package/resources/ai/memory/index.d.ts.map +1 -1
- package/resources/ai/memory/index.js.map +1 -1
- package/resources/ai/memory/index.mjs +1 -1
- package/resources/ai/memory/index.mjs.map +1 -1
- package/resources/ai/memory/memory.d.mts +2 -2
- package/resources/ai/memory/memory.d.mts.map +1 -1
- package/resources/ai/memory/memory.d.ts +2 -2
- package/resources/ai/memory/memory.d.ts.map +1 -1
- package/resources/ai/memory/memory.js.map +1 -1
- package/resources/ai/memory/memory.mjs +1 -1
- package/resources/ai/memory/memory.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 +1 -1
- package/resources/ai/memory/namespaces/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.mts +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js +41 -3
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs +41 -3
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +7 -2
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +7 -2
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +3 -4
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +3 -4
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/ai/tools.js +5 -2
- package/resources/ai/tools.js.map +1 -1
- package/resources/ai/tools.mjs +5 -2
- package/resources/ai/tools.mjs.map +1 -1
- package/resources/calls/actions.d.mts +76 -17
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +76 -17
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js +31 -0
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs +31 -0
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +48 -11
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +48 -11
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +3 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +3 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/dir/dir.d.mts +220 -28
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +220 -28
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +77 -13
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +77 -13
- package/resources/dir/dir.mjs.map +1 -1
- package/resources/dir/index.d.mts +1 -1
- package/resources/dir/index.d.mts.map +1 -1
- package/resources/dir/index.d.ts +1 -1
- package/resources/dir/index.d.ts.map +1 -1
- package/resources/dir/index.js.map +1 -1
- package/resources/dir/index.mjs.map +1 -1
- package/resources/dir/phone-numbers.d.mts +8 -4
- package/resources/dir/phone-numbers.d.mts.map +1 -1
- package/resources/dir/phone-numbers.d.ts +8 -4
- package/resources/dir/phone-numbers.d.ts.map +1 -1
- package/resources/dir/phone-numbers.js +4 -4
- package/resources/dir/phone-numbers.mjs +4 -4
- package/resources/dir/references.d.mts +9 -6
- package/resources/dir/references.d.mts.map +1 -1
- package/resources/dir/references.d.ts +9 -6
- package/resources/dir/references.d.ts.map +1 -1
- package/resources/enterprises/dir.d.mts +17 -1
- package/resources/enterprises/dir.d.mts.map +1 -1
- package/resources/enterprises/dir.d.ts +17 -1
- package/resources/enterprises/dir.d.ts.map +1 -1
- package/resources/enterprises/enterprises.d.mts +237 -23
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +237 -23
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js +26 -4
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs +26 -4
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -0
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -0
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js +3 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs +1 -0
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/loa.d.mts +61 -1
- package/resources/enterprises/reputation/loa.d.mts.map +1 -1
- package/resources/enterprises/reputation/loa.d.ts +61 -1
- package/resources/enterprises/reputation/loa.d.ts.map +1 -1
- package/resources/enterprises/verify-email.d.mts +91 -0
- package/resources/enterprises/verify-email.d.mts.map +1 -0
- package/resources/enterprises/verify-email.d.ts +91 -0
- package/resources/enterprises/verify-email.d.ts.map +1 -0
- package/resources/enterprises/verify-email.js +55 -0
- package/resources/enterprises/verify-email.js.map +1 -0
- package/resources/enterprises/verify-email.mjs +51 -0
- package/resources/enterprises/verify-email.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/infringement-claims.d.mts +4 -0
- package/resources/infringement-claims.d.mts.map +1 -1
- package/resources/infringement-claims.d.ts +4 -0
- package/resources/infringement-claims.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.d.mts +3 -0
- package/resources/llm-token-gateway/index.d.mts.map +1 -0
- package/resources/llm-token-gateway/index.d.ts +3 -0
- package/resources/llm-token-gateway/index.d.ts.map +1 -0
- package/resources/llm-token-gateway/index.js +9 -0
- package/resources/llm-token-gateway/index.js.map +1 -0
- package/resources/llm-token-gateway/index.mjs +4 -0
- package/resources/llm-token-gateway/index.mjs.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.js +17 -0
- package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs +12 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -0
- package/resources/llm-token-gateway/usage.d.mts +260 -0
- package/resources/llm-token-gateway/usage.d.mts.map +1 -0
- package/resources/llm-token-gateway/usage.d.ts +260 -0
- package/resources/llm-token-gateway/usage.d.ts.map +1 -0
- package/resources/llm-token-gateway/usage.js +31 -0
- package/resources/llm-token-gateway/usage.js.map +1 -0
- package/resources/llm-token-gateway/usage.mjs +27 -0
- package/resources/llm-token-gateway/usage.mjs.map +1 -0
- package/resources/llm-token-gateway.d.mts +2 -0
- package/resources/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway.d.ts +2 -0
- package/resources/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway.js +6 -0
- package/resources/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway.mjs +3 -0
- package/resources/llm-token-gateway.mjs.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.d.mts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +6 -6
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +6 -6
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.d.mts +1 -1
- package/resources/porting-orders/porting-orders.d.mts.map +1 -1
- package/resources/porting-orders/porting-orders.d.ts +1 -1
- package/resources/porting-orders/porting-orders.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.js.map +1 -1
- package/resources/porting-orders/porting-orders.mjs.map +1 -1
- package/resources/porting-phone-numbers.d.mts +1 -1
- package/resources/porting-phone-numbers.d.mts.map +1 -1
- package/resources/porting-phone-numbers.d.ts +1 -1
- package/resources/porting-phone-numbers.d.ts.map +1 -1
- package/resources/requirements.d.mts +2 -2
- package/resources/requirements.d.mts.map +1 -1
- package/resources/requirements.d.ts +2 -2
- package/resources/requirements.d.ts.map +1 -1
- package/resources/spend-limits.d.mts +335 -0
- package/resources/spend-limits.d.mts.map +1 -0
- package/resources/spend-limits.d.ts +335 -0
- package/resources/spend-limits.d.ts.map +1 -0
- package/resources/spend-limits.js +91 -0
- package/resources/spend-limits.js.map +1 -0
- package/resources/spend-limits.mjs +87 -0
- package/resources/spend-limits.mjs.map +1 -0
- package/resources/terms-of-service/agreements.d.mts +12 -0
- package/resources/terms-of-service/agreements.d.mts.map +1 -1
- package/resources/terms-of-service/agreements.d.ts +12 -0
- package/resources/terms-of-service/agreements.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.mts +15 -0
- package/resources/terms-of-service/terms-of-service.d.mts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.ts +15 -0
- package/resources/terms-of-service/terms-of-service.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.js.map +1 -1
- package/resources/terms-of-service/terms-of-service.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +4 -2
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +4 -2
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/webhooks.d.mts +403 -5
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +403 -5
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js +65 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs +61 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.js +3 -1
- package/resources/whatsapp/phone-numbers/index.js.map +1 -1
- package/resources/whatsapp/phone-numbers/index.mjs +1 -0
- package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/src/client.ts +55 -0
- package/src/resources/ai/ai.ts +13 -4
- package/src/resources/ai/assistants/assistants.ts +384 -28
- package/src/resources/ai/assistants/deleted.ts +86 -0
- package/src/resources/ai/assistants/index.ts +11 -0
- package/src/resources/ai/assistants/versions.ts +40 -0
- package/src/resources/ai/chat.ts +7 -2
- package/src/resources/ai/embeddings/embeddings.ts +1 -1
- package/src/resources/ai/index.ts +5 -1
- package/src/resources/ai/memory/index.ts +9 -1
- package/src/resources/ai/memory/memory.ts +13 -1
- package/src/resources/ai/memory/namespaces/index.ts +9 -1
- package/src/resources/ai/memory/namespaces/namespaces.ts +81 -3
- package/src/resources/ai/openai/chat.ts +7 -2
- package/src/resources/ai/tools.ts +6 -6
- package/src/resources/calls/actions.ts +76 -15
- package/src/resources/calls/calls.ts +49 -9
- package/src/resources/dir/dir.ts +263 -32
- package/src/resources/dir/index.ts +6 -0
- package/src/resources/dir/phone-numbers.ts +8 -4
- package/src/resources/dir/references.ts +9 -6
- package/src/resources/enterprises/dir.ts +19 -1
- package/src/resources/enterprises/enterprises.ts +250 -23
- package/src/resources/enterprises/index.ts +5 -0
- package/src/resources/enterprises/reputation/loa.ts +73 -1
- package/src/resources/enterprises/verify-email.ts +117 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/infringement-claims.ts +4 -0
- package/src/resources/llm-token-gateway/index.ts +4 -0
- package/src/resources/llm-token-gateway/llm-token-gateway.ts +19 -0
- package/src/resources/llm-token-gateway/usage.ts +336 -0
- package/src/resources/llm-token-gateway.ts +3 -0
- package/src/resources/meeting-sessions/meeting-sessions.ts +8 -9
- package/src/resources/porting-orders/phone-number-blocks.ts +9 -1
- package/src/resources/porting-orders/porting-orders.ts +9 -1
- package/src/resources/porting-phone-numbers.ts +9 -1
- package/src/resources/requirements.ts +2 -2
- package/src/resources/spend-limits.ts +428 -0
- package/src/resources/terms-of-service/agreements.ts +12 -0
- package/src/resources/terms-of-service/terms-of-service.ts +15 -0
- package/src/resources/text-to-speech/text-to-speech.ts +4 -2
- package/src/resources/webhooks.ts +495 -2
- package/src/resources/whatsapp/phone-numbers/calling-routing.ts +113 -0
- package/src/resources/whatsapp/phone-numbers/index.ts +7 -0
- package/src/resources/whatsapp/phone-numbers/phone-numbers.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.d.mts","sourceRoot":"","sources":["../src/resources/requirements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;AAC1G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,I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BAA2B;IAC1C,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACxE;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAEtC;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CACR,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,mBAAmB,GACnB,aAAa,GACb,aAAa,GACb,eAAe,GACf,oBAAoB,CACvB,CAAC;IAEF;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;;OAGG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,MAAM,CAAC,EAAE,iBAAiB,GAAG,UAAU,GAAG,SAAS,CAAC;QAEpD;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;KACpG;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -69,7 +69,7 @@ export interface DocReqsRequirement {
|
|
|
69
69
|
* Indicates the phone_number_type this requirement applies to. Leave blank if this
|
|
70
70
|
* requirement applies to all number_types.
|
|
71
71
|
*/
|
|
72
|
-
phone_number_type?: 'local' | 'national' | 'toll_free';
|
|
72
|
+
phone_number_type?: 'local' | 'mobile' | 'multipurpose' | 'national' | 'shared_cost' | 'toll_free';
|
|
73
73
|
/**
|
|
74
74
|
* Identifies the type of the resource.
|
|
75
75
|
*/
|
|
@@ -125,7 +125,7 @@ export declare namespace RequirementListParams {
|
|
|
125
125
|
/**
|
|
126
126
|
* Filters results to those applying to a specific phone_number_type
|
|
127
127
|
*/
|
|
128
|
-
phone_number_type?: 'local' | 'national' | 'toll_free';
|
|
128
|
+
phone_number_type?: 'local' | 'mobile' | 'multipurpose' | 'national' | 'shared_cost' | 'toll_free';
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
export interface RequirementRetrieveParams {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../src/resources/requirements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;AAC1G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wCAAwC,EAAE,kBAAkB,CAAC;IAO5E;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,MAAM,wCAAwC,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;AAEjG,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;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,iBAAiB,GAAG,UAAU,GAAG,SAAS,CAAC;QAEpD;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;KACpG;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Daily and monthly spend limits per product. A limit applies to the organization of the authenticated user, or to the user's own account when they belong to no organization; every user of the organization sees and changes the same limits.
|
|
6
|
+
*
|
|
7
|
+
* - **Periods.** `daily` covers the current UTC day and `monthly` the current UTC calendar month. The two limits are independent: you can set either, both or neither.
|
|
8
|
+
* - **Blocking.** When spend in a period goes above the limit (strictly greater), the product is blocked until the period ends: 00:00 UTC the next day for `daily`, 00:00 UTC on the 1st of the next month for `monthly`. A block appears within about 2 minutes (daily) or 10 minutes (monthly) of the spend being recorded.
|
|
9
|
+
* - **Changes apply immediately.** Creating, updating or deleting a limit checks the period's spend in the same request: raising the limit above the spend, or removing it, lifts that period's block, and lowering it below the spend blocks the product at once. The `evaluation` object in the response says what happened.
|
|
10
|
+
* - **Supported products.** Today only `inference` supports spend limits. A blocked account gets HTTP 403 with the error title `Inference spend limit reached` (code `10039`) on new billable chat completions, Responses, Anthropic Messages and classification requests; requests already running finish normally. Take the list of products from the list operation.
|
|
11
|
+
* - **Limits set by Telnyx.** Telnyx support can also set a limit on your account. It is listed with `origin: operator` and you can update or delete it like your own.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SpendLimits extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Returns one entry per product and period you can set a limit on, with the limit,
|
|
16
|
+
* the spend so far in the period and whether the product is blocked. An entry
|
|
17
|
+
* without a limit is still listed (`limit: null`). When the spend cannot be read,
|
|
18
|
+
* the entry is returned with `spend_usd: null` and `spend_error` set. The list is
|
|
19
|
+
* not paginated.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const spendLimits = await client.spendLimits.list();
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(options?: RequestOptions): APIPromise<SpendLimitListResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Sets a limit for a product and period that has none. Send exactly one of
|
|
29
|
+
* `amount` and `unlimited: true`. The period's spend is checked at once: if it is
|
|
30
|
+
* already above the new limit, the product is blocked immediately
|
|
31
|
+
* (`evaluation.blocked_now`). Returns 409 when a limit already exists for the
|
|
32
|
+
* product and period; update it instead.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const spendLimitResponse = await client.spendLimits.create({
|
|
37
|
+
* amount: 100,
|
|
38
|
+
* product: 'inference',
|
|
39
|
+
* period: 'daily',
|
|
40
|
+
* reason: 'Team budget',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
create(body: SpendLimitCreateParams, options?: RequestOptions): APIPromise<SpendLimitResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Removes the limit for the product and period. For `inference`, which has no
|
|
47
|
+
* default limit, the product becomes unlimited for the period and the period's
|
|
48
|
+
* block is lifted (`evaluation.released`). The response carries `limit: null` and
|
|
49
|
+
* the `effective_limit_usd` that applies after the removal. Returns 404 when no
|
|
50
|
+
* limit is set.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const spendLimitResponse = await client.spendLimits.delete(
|
|
55
|
+
* 'inference',
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
delete(product: string, params?: SpendLimitDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SpendLimitResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Replaces the value of the existing limit for the product and period. Send
|
|
62
|
+
* exactly one of `amount` and `unlimited: true`. The period's spend is checked at
|
|
63
|
+
* once: raising the limit above the spend lifts the period's block
|
|
64
|
+
* (`evaluation.released`), and lowering it below the spend blocks the product
|
|
65
|
+
* (`evaluation.blocked_now`). Returns 404 when no limit is set; create it instead.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const spendLimitResponse = await client.spendLimits.update(
|
|
70
|
+
* 'inference',
|
|
71
|
+
* { amount: 250 },
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
update(product: string, params: SpendLimitUpdateParams, options?: RequestOptions): APIPromise<SpendLimitResponse>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The spend limit, spend and block state of one product and period.
|
|
79
|
+
*/
|
|
80
|
+
export interface SpendLimit {
|
|
81
|
+
/**
|
|
82
|
+
* The active block of the period. `null` when the period is not blocked.
|
|
83
|
+
*/
|
|
84
|
+
block: SpendLimit.Block | null;
|
|
85
|
+
/**
|
|
86
|
+
* The product is blocked for this period. Always `false` in write responses; list
|
|
87
|
+
* the limits to read the block state.
|
|
88
|
+
*/
|
|
89
|
+
blocked: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The limit in USD that is enforced, as a decimal string. `null` means unlimited.
|
|
92
|
+
*/
|
|
93
|
+
effective_limit_usd: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* The limit set on the account for the product and period, whoever set it. `null`
|
|
96
|
+
* when none is set.
|
|
97
|
+
*/
|
|
98
|
+
limit: SpendLimit.Limit | null;
|
|
99
|
+
/**
|
|
100
|
+
* `daily` is the current UTC day; `monthly` is the current UTC calendar month.
|
|
101
|
+
*/
|
|
102
|
+
period: SpendLimitPeriod;
|
|
103
|
+
/**
|
|
104
|
+
* Exclusive end of the current period, a UTC date.
|
|
105
|
+
*/
|
|
106
|
+
period_end: string;
|
|
107
|
+
/**
|
|
108
|
+
* First UTC day of the current period.
|
|
109
|
+
*/
|
|
110
|
+
period_start: string;
|
|
111
|
+
/**
|
|
112
|
+
* Product the entry applies to.
|
|
113
|
+
*/
|
|
114
|
+
product: string;
|
|
115
|
+
/**
|
|
116
|
+
* Display name of the product.
|
|
117
|
+
*/
|
|
118
|
+
product_name: string;
|
|
119
|
+
/**
|
|
120
|
+
* Identifies the type of the resource.
|
|
121
|
+
*/
|
|
122
|
+
record_type: string;
|
|
123
|
+
/**
|
|
124
|
+
* Set when `spend_usd` is `null`.
|
|
125
|
+
*/
|
|
126
|
+
spend_error: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* Spend in USD so far in the period, as a decimal string. It can lag actual usage
|
|
129
|
+
* by about a minute. `null` when it could not be read.
|
|
130
|
+
*/
|
|
131
|
+
spend_usd: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* What a create, update or delete did to the period at once. Only present in write
|
|
134
|
+
* responses.
|
|
135
|
+
*/
|
|
136
|
+
evaluation?: SpendLimit.Evaluation;
|
|
137
|
+
}
|
|
138
|
+
export declare namespace SpendLimit {
|
|
139
|
+
/**
|
|
140
|
+
* The active block of the period. `null` when the period is not blocked.
|
|
141
|
+
*/
|
|
142
|
+
interface Block {
|
|
143
|
+
/**
|
|
144
|
+
* Exclusive end of the block: it is lifted at 00:00 UTC on this date at the
|
|
145
|
+
* latest.
|
|
146
|
+
*/
|
|
147
|
+
blocked_until: string;
|
|
148
|
+
/**
|
|
149
|
+
* When the block started.
|
|
150
|
+
*/
|
|
151
|
+
detected_at: string;
|
|
152
|
+
/**
|
|
153
|
+
* The limit in USD that the spend went above, as a decimal string.
|
|
154
|
+
*/
|
|
155
|
+
limit_usd: string;
|
|
156
|
+
/**
|
|
157
|
+
* Spend in USD when the block started, as a decimal string.
|
|
158
|
+
*/
|
|
159
|
+
spend_usd: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The limit set on the account for the product and period, whoever set it. `null`
|
|
163
|
+
* when none is set.
|
|
164
|
+
*/
|
|
165
|
+
interface Limit {
|
|
166
|
+
/**
|
|
167
|
+
* Limit in USD, as a decimal string. `null` when `unlimited` is true.
|
|
168
|
+
*/
|
|
169
|
+
amount: string | null;
|
|
170
|
+
/**
|
|
171
|
+
* `self_service` when a user of the account set it, `operator` when Telnyx support
|
|
172
|
+
* did.
|
|
173
|
+
*/
|
|
174
|
+
origin: 'self_service' | 'operator';
|
|
175
|
+
/**
|
|
176
|
+
* True when the limit was set to explicitly no cap.
|
|
177
|
+
*/
|
|
178
|
+
unlimited: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* When the limit was last set or changed.
|
|
181
|
+
*/
|
|
182
|
+
updated_at: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* What a create, update or delete did to the period at once. Only present in write
|
|
186
|
+
* responses.
|
|
187
|
+
*/
|
|
188
|
+
interface Evaluation {
|
|
189
|
+
/**
|
|
190
|
+
* The change blocked the product: the spend was already above the new limit.
|
|
191
|
+
*/
|
|
192
|
+
blocked_now: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* The spend could not be checked now. The change is saved and applied within a few
|
|
195
|
+
* minutes.
|
|
196
|
+
*/
|
|
197
|
+
evaluation_deferred: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* The change lifted a block of this period.
|
|
200
|
+
*/
|
|
201
|
+
released: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Spend in USD used for the check, as a decimal string. `null` when the spend was
|
|
204
|
+
* not checked.
|
|
205
|
+
*/
|
|
206
|
+
spend_usd: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* The other period has an active block, so the product stays blocked whatever this
|
|
209
|
+
* period's result.
|
|
210
|
+
*/
|
|
211
|
+
still_blocked_other_period: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* A block of this period remains because the spend is still above the new limit.
|
|
214
|
+
*/
|
|
215
|
+
still_over_limit: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Additional information about the result, when there is any.
|
|
218
|
+
*/
|
|
219
|
+
note?: string;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* `daily` is the current UTC day; `monthly` is the current UTC calendar month.
|
|
224
|
+
*/
|
|
225
|
+
export type SpendLimitPeriod = 'daily' | 'monthly';
|
|
226
|
+
export interface SpendLimitResponse {
|
|
227
|
+
/**
|
|
228
|
+
* The spend limit, spend and block state of one product and period.
|
|
229
|
+
*/
|
|
230
|
+
data: SpendLimit;
|
|
231
|
+
}
|
|
232
|
+
export interface SpendLimitListResponse {
|
|
233
|
+
data: Array<SpendLimit>;
|
|
234
|
+
meta?: SpendLimitListResponse.Meta;
|
|
235
|
+
}
|
|
236
|
+
export declare namespace SpendLimitListResponse {
|
|
237
|
+
interface Meta {
|
|
238
|
+
page_number?: number;
|
|
239
|
+
page_size?: number;
|
|
240
|
+
total_pages?: number;
|
|
241
|
+
total_results?: number;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
export type SpendLimitCreateParams = SpendLimitCreateParams.CreateSpendLimitWithAmount | SpendLimitCreateParams.CreateSpendLimitUnlimited;
|
|
245
|
+
export declare namespace SpendLimitCreateParams {
|
|
246
|
+
interface CreateSpendLimitWithAmount {
|
|
247
|
+
/**
|
|
248
|
+
* Limit in USD. `0` blocks at the first cent of spend.
|
|
249
|
+
*/
|
|
250
|
+
amount: number;
|
|
251
|
+
/**
|
|
252
|
+
* Product to limit, as returned in `product` by the list operation.
|
|
253
|
+
*/
|
|
254
|
+
product: string;
|
|
255
|
+
/**
|
|
256
|
+
* `daily` is the current UTC day; `monthly` is the current UTC calendar month.
|
|
257
|
+
*/
|
|
258
|
+
period?: SpendLimitPeriod;
|
|
259
|
+
/**
|
|
260
|
+
* Why the limit is set or changed, kept for audit.
|
|
261
|
+
*/
|
|
262
|
+
reason?: string;
|
|
263
|
+
/**
|
|
264
|
+
* Optional; only `false` is allowed together with `amount`.
|
|
265
|
+
*/
|
|
266
|
+
unlimited?: false;
|
|
267
|
+
}
|
|
268
|
+
interface CreateSpendLimitUnlimited {
|
|
269
|
+
/**
|
|
270
|
+
* Product to limit, as returned in `product` by the list operation.
|
|
271
|
+
*/
|
|
272
|
+
product: string;
|
|
273
|
+
/**
|
|
274
|
+
* `true`: explicitly no cap.
|
|
275
|
+
*/
|
|
276
|
+
unlimited: true;
|
|
277
|
+
/**
|
|
278
|
+
* `daily` is the current UTC day; `monthly` is the current UTC calendar month.
|
|
279
|
+
*/
|
|
280
|
+
period?: SpendLimitPeriod;
|
|
281
|
+
/**
|
|
282
|
+
* Why the limit is set or changed, kept for audit.
|
|
283
|
+
*/
|
|
284
|
+
reason?: string;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
export interface SpendLimitDeleteParams {
|
|
288
|
+
/**
|
|
289
|
+
* Limit period. Defaults to `daily`; send it explicitly.
|
|
290
|
+
*/
|
|
291
|
+
period?: SpendLimitPeriod;
|
|
292
|
+
/**
|
|
293
|
+
* Why the limit is removed, kept for audit. At most 500 characters.
|
|
294
|
+
*/
|
|
295
|
+
reason?: string;
|
|
296
|
+
}
|
|
297
|
+
export type SpendLimitUpdateParams = SpendLimitUpdateParams.UpdateSpendLimitWithAmount | SpendLimitUpdateParams.UpdateSpendLimitUnlimited;
|
|
298
|
+
export declare namespace SpendLimitUpdateParams {
|
|
299
|
+
interface UpdateSpendLimitWithAmount {
|
|
300
|
+
/**
|
|
301
|
+
* Body param: Limit in USD. `0` blocks at the first cent of spend.
|
|
302
|
+
*/
|
|
303
|
+
amount: number;
|
|
304
|
+
/**
|
|
305
|
+
* Query param: Limit period. Defaults to `daily`; send it explicitly.
|
|
306
|
+
*/
|
|
307
|
+
period?: SpendLimitPeriod;
|
|
308
|
+
/**
|
|
309
|
+
* Body param: Why the limit is set or changed, kept for audit.
|
|
310
|
+
*/
|
|
311
|
+
reason?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Body param: Optional; only `false` is allowed together with `amount`.
|
|
314
|
+
*/
|
|
315
|
+
unlimited?: false;
|
|
316
|
+
}
|
|
317
|
+
interface UpdateSpendLimitUnlimited {
|
|
318
|
+
/**
|
|
319
|
+
* Body param: `true`: explicitly no cap.
|
|
320
|
+
*/
|
|
321
|
+
unlimited: true;
|
|
322
|
+
/**
|
|
323
|
+
* Query param: Limit period. Defaults to `daily`; send it explicitly.
|
|
324
|
+
*/
|
|
325
|
+
period?: SpendLimitPeriod;
|
|
326
|
+
/**
|
|
327
|
+
* Body param: Why the limit is set or changed, kept for audit.
|
|
328
|
+
*/
|
|
329
|
+
reason?: string;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
export declare namespace SpendLimits {
|
|
333
|
+
export { type SpendLimit as SpendLimit, type SpendLimitPeriod as SpendLimitPeriod, type SpendLimitResponse as SpendLimitResponse, type SpendLimitListResponse as SpendLimitListResponse, type SpendLimitCreateParams as SpendLimitCreateParams, type SpendLimitDeleteParams as SpendLimitDeleteParams, type SpendLimitUpdateParams as SpendLimitUpdateParams, };
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=spend-limits.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-limits.d.mts","sourceRoot":"","sources":["../src/resources/spend-limits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wC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