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
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
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.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-limits.d.ts","sourceRoot":"","sources":["../src/resources/spend-limits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlE;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAI9F;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAKjC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAIlC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;OAGG;IACH,KAAK,EAAE,UAAU,CAAC,KAAK,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OA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,sBAAsB,GAC9B,sBAAsB,CAAC,0BAA0B,GACjD,sBAAsB,CAAC,yBAAyB,CAAC;AAErD,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,UAAiB,0BAA0B;QACzC;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;QAE1B;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,CAAC,EAAE,KAAK,CAAC;KACnB;IAED,UAAiB,yBAAyB;QACxC;;WAEG;QACH,SAAS,EAAE,IAAI,CAAC;QAEhB;;WAEG;QACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;QAE1B;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SpendLimits = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
*
|
|
10
|
+
* - **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.
|
|
11
|
+
* - **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.
|
|
12
|
+
* - **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.
|
|
13
|
+
* - **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.
|
|
14
|
+
* - **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.
|
|
15
|
+
*/
|
|
16
|
+
class SpendLimits extends resource_1.APIResource {
|
|
17
|
+
/**
|
|
18
|
+
* Returns one entry per product and period you can set a limit on, with the limit,
|
|
19
|
+
* the spend so far in the period and whether the product is blocked. An entry
|
|
20
|
+
* without a limit is still listed (`limit: null`). When the spend cannot be read,
|
|
21
|
+
* the entry is returned with `spend_usd: null` and `spend_error` set. The list is
|
|
22
|
+
* not paginated.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const spendLimits = await client.spendLimits.list();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(options) {
|
|
30
|
+
return this._client.get('/spend_limits', options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sets a limit for a product and period that has none. Send exactly one of
|
|
34
|
+
* `amount` and `unlimited: true`. The period's spend is checked at once: if it is
|
|
35
|
+
* already above the new limit, the product is blocked immediately
|
|
36
|
+
* (`evaluation.blocked_now`). Returns 409 when a limit already exists for the
|
|
37
|
+
* product and period; update it instead.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const spendLimitResponse = await client.spendLimits.create({
|
|
42
|
+
* amount: 100,
|
|
43
|
+
* product: 'inference',
|
|
44
|
+
* period: 'daily',
|
|
45
|
+
* reason: 'Team budget',
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
create(body, options) {
|
|
50
|
+
return this._client.post('/spend_limits', { body, ...options });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Removes the limit for the product and period. For `inference`, which has no
|
|
54
|
+
* default limit, the product becomes unlimited for the period and the period's
|
|
55
|
+
* block is lifted (`evaluation.released`). The response carries `limit: null` and
|
|
56
|
+
* the `effective_limit_usd` that applies after the removal. Returns 404 when no
|
|
57
|
+
* limit is set.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const spendLimitResponse = await client.spendLimits.delete(
|
|
62
|
+
* 'inference',
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
delete(product, params = {}, options) {
|
|
67
|
+
const { period, reason } = params ?? {};
|
|
68
|
+
return this._client.delete((0, path_1.path) `/spend_limits/${product}`, { query: { period, reason }, ...options });
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Replaces the value of the existing limit for the product and period. Send
|
|
72
|
+
* exactly one of `amount` and `unlimited: true`. The period's spend is checked at
|
|
73
|
+
* once: raising the limit above the spend lifts the period's block
|
|
74
|
+
* (`evaluation.released`), and lowering it below the spend blocks the product
|
|
75
|
+
* (`evaluation.blocked_now`). Returns 404 when no limit is set; create it instead.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const spendLimitResponse = await client.spendLimits.update(
|
|
80
|
+
* 'inference',
|
|
81
|
+
* { amount: 250 },
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
update(product, params, options) {
|
|
86
|
+
const { period, ...body } = params;
|
|
87
|
+
return this._client.patch((0, path_1.path) `/spend_limits/${product}`, { query: { period }, body, ...options });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.SpendLimits = SpendLimits;
|
|
91
|
+
//# sourceMappingURL=spend-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-limits.js","sourceRoot":"","sources":["../src/resources/spend-limits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C;;;;;;;;GAQG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,OAAe,EACf,SAAoD,EAAE,EACtD,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,iBAAiB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAe,EACf,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,iBAAiB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;CACF;AApFD,kCAoFC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.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 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) {
|
|
27
|
+
return this._client.get('/spend_limits', options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Sets a limit for a product and period that has none. Send exactly one of
|
|
31
|
+
* `amount` and `unlimited: true`. The period's spend is checked at once: if it is
|
|
32
|
+
* already above the new limit, the product is blocked immediately
|
|
33
|
+
* (`evaluation.blocked_now`). Returns 409 when a limit already exists for the
|
|
34
|
+
* product and period; update it instead.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const spendLimitResponse = await client.spendLimits.create({
|
|
39
|
+
* amount: 100,
|
|
40
|
+
* product: 'inference',
|
|
41
|
+
* period: 'daily',
|
|
42
|
+
* reason: 'Team budget',
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
create(body, options) {
|
|
47
|
+
return this._client.post('/spend_limits', { body, ...options });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Removes the limit for the product and period. For `inference`, which has no
|
|
51
|
+
* default limit, the product becomes unlimited for the period and the period's
|
|
52
|
+
* block is lifted (`evaluation.released`). The response carries `limit: null` and
|
|
53
|
+
* the `effective_limit_usd` that applies after the removal. Returns 404 when no
|
|
54
|
+
* limit is set.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const spendLimitResponse = await client.spendLimits.delete(
|
|
59
|
+
* 'inference',
|
|
60
|
+
* );
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
delete(product, params = {}, options) {
|
|
64
|
+
const { period, reason } = params ?? {};
|
|
65
|
+
return this._client.delete(path `/spend_limits/${product}`, { query: { period, reason }, ...options });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Replaces the value of the existing limit for the product and period. Send
|
|
69
|
+
* exactly one of `amount` and `unlimited: true`. The period's spend is checked at
|
|
70
|
+
* once: raising the limit above the spend lifts the period's block
|
|
71
|
+
* (`evaluation.released`), and lowering it below the spend blocks the product
|
|
72
|
+
* (`evaluation.blocked_now`). Returns 404 when no limit is set; create it instead.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const spendLimitResponse = await client.spendLimits.update(
|
|
77
|
+
* 'inference',
|
|
78
|
+
* { amount: 250 },
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
update(product, params, options) {
|
|
83
|
+
const { period, ...body } = params;
|
|
84
|
+
return this._client.patch(path `/spend_limits/${product}`, { query: { period }, body, ...options });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=spend-limits.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-limits.mjs","sourceRoot":"","sources":["../src/resources/spend-limits.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,OAAe,EACf,SAAoD,EAAE,EACtD,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,iBAAiB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAe,EACf,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,iBAAiB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;CACF"}
|
|
@@ -32,13 +32,25 @@ export type TosAgreementsDefaultFlatPagination = DefaultFlatPagination<TosAgreem
|
|
|
32
32
|
* their own identity.
|
|
33
33
|
*/
|
|
34
34
|
export interface TosAgreement {
|
|
35
|
+
/**
|
|
36
|
+
* The unique identifier of this recorded agreement.
|
|
37
|
+
*/
|
|
35
38
|
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* When you accepted this version of the terms.
|
|
41
|
+
*/
|
|
36
42
|
agreed_at?: string;
|
|
43
|
+
/**
|
|
44
|
+
* When this agreement record was created.
|
|
45
|
+
*/
|
|
37
46
|
created_at?: string;
|
|
38
47
|
/**
|
|
39
48
|
* Telnyx product the Terms of Service apply to.
|
|
40
49
|
*/
|
|
41
50
|
product_type?: TosProductType;
|
|
51
|
+
/**
|
|
52
|
+
* The version of the terms you accepted.
|
|
53
|
+
*/
|
|
42
54
|
terms_version?: string;
|
|
43
55
|
/**
|
|
44
56
|
* Convenience alias of `terms_version`. Both keys are present on every response.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreements.d.mts","sourceRoot":"","sources":["../../src/resources/terms-of-service/agreements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,kCAA8B;AAC7G,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kCAAkC,EAAE,YAAY,CAAC;IAOhE;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGzF;AAED,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;IAE9B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,2BAA2B;IACtE;;;;OAIG;IACH,YAAY,CAAC,EA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ACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,2BAA2B;IACtE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -32,13 +32,25 @@ export type TosAgreementsDefaultFlatPagination = DefaultFlatPagination<TosAgreem
|
|
|
32
32
|
* their own identity.
|
|
33
33
|
*/
|
|
34
34
|
export interface TosAgreement {
|
|
35
|
+
/**
|
|
36
|
+
* The unique identifier of this recorded agreement.
|
|
37
|
+
*/
|
|
35
38
|
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* When you accepted this version of the terms.
|
|
41
|
+
*/
|
|
36
42
|
agreed_at?: string;
|
|
43
|
+
/**
|
|
44
|
+
* When this agreement record was created.
|
|
45
|
+
*/
|
|
37
46
|
created_at?: string;
|
|
38
47
|
/**
|
|
39
48
|
* Telnyx product the Terms of Service apply to.
|
|
40
49
|
*/
|
|
41
50
|
product_type?: TosProductType;
|
|
51
|
+
/**
|
|
52
|
+
* The version of the terms you accepted.
|
|
53
|
+
*/
|
|
42
54
|
terms_version?: string;
|
|
43
55
|
/**
|
|
44
56
|
* Convenience alias of `terms_version`. Both keys are present on every response.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreements.d.ts","sourceRoot":"","sources":["../../src/resources/terms-of-service/agreements.ts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GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,2BAA2B;IACtE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -35,13 +35,25 @@ export interface TermsOfServiceRetrieveInfoResponse {
|
|
|
35
35
|
}
|
|
36
36
|
export declare namespace TermsOfServiceRetrieveInfoResponse {
|
|
37
37
|
interface Agreement {
|
|
38
|
+
/**
|
|
39
|
+
* The latest published version of these terms.
|
|
40
|
+
*/
|
|
38
41
|
current_version?: string;
|
|
42
|
+
/**
|
|
43
|
+
* A short summary of the product these terms cover.
|
|
44
|
+
*/
|
|
39
45
|
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The date this version took effect.
|
|
48
|
+
*/
|
|
40
49
|
effective_date?: string;
|
|
41
50
|
/**
|
|
42
51
|
* Telnyx product the Terms of Service apply to.
|
|
43
52
|
*/
|
|
44
53
|
product_type?: AgreementsAPI.TosProductType;
|
|
54
|
+
/**
|
|
55
|
+
* A link to the full terms text.
|
|
56
|
+
*/
|
|
45
57
|
terms_url?: string;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
@@ -75,6 +87,9 @@ export declare namespace TermsOfServiceRetrieveStatusResponse {
|
|
|
75
87
|
* Telnyx product the Terms of Service apply to.
|
|
76
88
|
*/
|
|
77
89
|
product_type: AgreementsAPI.TosProductType;
|
|
90
|
+
/**
|
|
91
|
+
* When you accepted the terms, or null if you have not.
|
|
92
|
+
*/
|
|
78
93
|
agreed_at?: string | null;
|
|
79
94
|
/**
|
|
80
95
|
* Version the user previously agreed to (may be older than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terms-of-service.d.mts","sourceRoot":"","sources":["../../src/resources/terms-of-service/terms-of-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,kCAAkC,EAClC,cAAc,EACf,yBAAqB;AACtB,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,cAAc,EAAE,8BAA0B;AACnD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AACvD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IACF,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IAEtG;;;;;;;OAOG;IACH,cAAc,CACZ,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAInD;;;;OAIG;IACH,YAAY,CACV,KAAK,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAC/D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kCAAkC,CAAC;CAGlD;AAED,MAAM,WAAW,kCAAkC;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC,kCAAkC,CAAC,SAAS,CAAC,CAAC;CAClE;AAED,yBAAiB,kCAAkC,CAAC;IAClD,UAAiB,SAAS;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,WAA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,IAAI,kCAAkC,EAC7E,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,CAAC;CAC7C"}
|
|
1
|
+
{"version":3,"file":"terms-of-service.d.mts","sourceRoot":"","sources":["../../src/resources/terms-of-service/terms-of-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,kCAAkC,EAClC,cAAc,EACf,yBAAqB;AACtB,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAAE,cAAc,EAAE,8BAA0B;AACnD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AACvD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IACF,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IAEtG;;;;;;;OAOG;IACH,cAAc,CACZ,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAInD;;;;OAIG;IACH,YAAY,CACV,KAAK,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAC/D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kCAAkC,CAAC;CAGlD;AAED,MAAM,WAAW,kCAAkC;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC,kCAAkC,CAAC,SAAS,CAAC,CAAC;CAClE;AAED,yBAAiB,kCAAkC,CAAC;IAClD,U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