@lumavox/server 0.66.0 → 0.67.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # @lumavox/server
2
2
 
3
3
  The Lumavox API from your server, with your organisation's API key: speech,
4
- images and video, voices, your asset library, agents, knowledge, tools, end users
5
- and the ephemeral keys their devices talk to agents with — every operation
6
- a key may call, typed from the published OpenAPI document. **Zero
4
+ text, images and video, voices, your asset library, agents, knowledge, tools,
5
+ end users and the ephemeral keys their devices talk to agents with — every
6
+ operation a key may call, typed from the published OpenAPI document. **Zero
7
7
  dependencies**: `fetch` and the web platform only — Node 20.3 or later,
8
8
  Cloudflare Workers, Deno, Bun.
9
9
 
@@ -57,8 +57,9 @@ Bodies and answers are the API's own JSON, field for field, as the API
57
57
  reference shows them; methods are camelCase, and the SDK's options go in a
58
58
  last argument on every call: `{ timeoutMs, signal, maxRetries, requestId }`.
59
59
  `stt.create`, a whole `tts.create` and `voices.design` wait at least 100,
60
- 70 and 90 seconds by themselves — the API holds them open that long — unless
61
- the call names its own `timeoutMs`. An id that is empty, `.` or `..` is a
60
+ 70 and 90 seconds by themselves, and `text.generate` and `text.stream` 130 —
61
+ the API holds them open that long — unless the call names its own
62
+ `timeoutMs`. An id that is empty, `.` or `..` is a
62
63
  `TypeError` before anything is sent.
63
64
  Credits are integers of micro-credits (`*_micros`; 1 credit is 1,000,000)
64
65
  and times ISO strings, as on the wire. Every schema is exported as a type:
@@ -73,6 +74,7 @@ list's page.
73
74
  | `generations` | `get`, `wait`, `list`, `page` |
74
75
  | `templates` | `list`, `page`, `get`, `create`, `generate`, `file` |
75
76
  | `tts`, `stt` | `create` |
77
+ | `text` | `generate`, `stream` |
76
78
  | `voices` | `list`, `page`, `get`, `create`, `uploadUrl`, `upload`, `update`, `delete`, `resample`, `design`, `saveDesign`, `wait` |
77
79
  | `assets` | `list`, `page`, `get`, `uploadUrl`, `confirm`, `upload`, `update`, `delete`, `deleteMany`, `move`, `wait`; `assets.folders.*` |
78
80
  | `agents` | `list`, `page`, `get`, `create`, `update`, `delete`; `agents.copy` — a new agent from one, or from its draft; `agents.prompt` — everything the agent is told and set to; `agents.testWebhook`; `agents.settings.get/update/rotateWebhookSecret`; `agents.knowledge.list/set`; `agents.tools.list/set`; `agents.versions.list/get/restore` — every change players see is a version, any kept one put back; `agents.draft.get/update/discard/publish` — changes players get only once published |
@@ -96,10 +98,47 @@ list's page.
96
98
  `audioSeconds`, `generationSeconds`, `totalSeconds`, `streamChunking`);
97
99
  **`stt.create(audio, { stream: true })`** an async iterator of the
98
100
  transcript's events.
101
+ - **`text.generate(body)`** asks a Gemini model and answers in the call —
102
+ nothing is queued; **`text.stream(body)`** is an async iterator of the
103
+ answer's lines as it is written ([Text](#text)).
99
104
  - **A `delete` of something already gone is done**: one thing's answers
100
105
  `true`, or `false` when there was none; one that reports counts (an end
101
106
  user's, a folder's) answers them, or `null` when there was none.
102
107
 
108
+ ## Text
109
+
110
+ A prompt, or a chat as messages, to a Gemini model — over plain HTTP, with
111
+ nothing remembered between calls and nothing of yours stored. Charged per
112
+ token; the answer says what it cost. The key needs the `text` scope.
113
+
114
+ ```ts
115
+ const answer = await lumavox.text.generate({
116
+ input: "Write a tagline for a bakery.",
117
+ instructions: "You write short, warm copy for small shops.",
118
+ });
119
+ console.log(answer.text, answer.finish_reason, answer.credits_micros);
120
+
121
+ // As it is written: pieces, then one `done` carrying the whole answer.
122
+ let whole = false;
123
+ for await (const line of lumavox.text.stream({ input: "Write a tagline for a bakery." })) {
124
+ if (line.type === "text.delta") process.stdout.write(line.text);
125
+ if (line.type === "done") whole = true;
126
+ if (line.type === "error") console.error(line.code, line.message);
127
+ }
128
+ if (!whole) console.error("The answer is not whole.");
129
+ ```
130
+
131
+ - **A stream with no `done` line is not whole** — an `error` line, or a
132
+ connection that dropped — and is charged for what was written. Leaving
133
+ the loop early hangs up.
134
+ - **`input`** is a string, or `[{ role: "user" | "assistant", content }]`
135
+ ending with a `user` message; send the whole chat each time.
136
+ **`response_schema`** (a JSON Schema) makes `text` JSON that fits it,
137
+ still a string: parse it.
138
+ - **`stream` is the method's, never the body's.** Neither call is sent
139
+ twice but after a 429; a 503 for the model provider's own rate limit is
140
+ a `ServerError` with its `retryAfter`, and nothing was charged.
141
+
103
142
  ## Errors
104
143
 
105
144
  Everything thrown is a `PlatformError`: `status`, `code` (the API's —
package/dist/client.d.ts CHANGED
@@ -21,6 +21,7 @@ import { Generations, Images, Jobs, Skybox } from "./resources/generations.js";
21
21
  import { Knowledge } from "./resources/knowledge.js";
22
22
  import { Stt, Tts } from "./resources/speech.js";
23
23
  import { Templates } from "./resources/templates.js";
24
+ import { Text } from "./resources/text.js";
24
25
  import { Tools } from "./resources/tools.js";
25
26
  import { Usage } from "./resources/usage.js";
26
27
  import { Voices } from "./resources/voices.js";
@@ -51,6 +52,7 @@ export interface Client {
51
52
  readonly templates: Templates;
52
53
  readonly tts: Tts;
53
54
  readonly stt: Stt;
55
+ readonly text: Text;
54
56
  readonly voices: Voices;
55
57
  readonly assets: Assets;
56
58
  readonly agents: Agents;
package/dist/client.js CHANGED
@@ -6,6 +6,7 @@ import { Generations, Images, Jobs, Skybox } from "./resources/generations.js";
6
6
  import { Knowledge } from "./resources/knowledge.js";
7
7
  import { Stt, Tts } from "./resources/speech.js";
8
8
  import { Templates } from "./resources/templates.js";
9
+ import { Text } from "./resources/text.js";
9
10
  import { Tools } from "./resources/tools.js";
10
11
  import { Usage } from "./resources/usage.js";
11
12
  import { Voices } from "./resources/voices.js";
@@ -42,6 +43,7 @@ export function createClient(options) {
42
43
  templates: new Templates(transport, "/v1/templates", generations),
43
44
  tts: new Tts(transport, "/v1/tts"),
44
45
  stt: new Stt(transport, "/v1/stt"),
46
+ text: new Text(transport, "/v1/text"),
45
47
  voices: new Voices(transport, "/v1/voices"),
46
48
  assets: new Assets(transport, "/v1/assets"),
47
49
  agents: new Agents(transport, "/v1/agents"),
@@ -1 +1 @@
1
- export type { AgentCopyRequest, AgentCreateRequest, AgentDefaults, AgentDefaultsUpdate, AgentDraft, AgentDraftPublish, AgentDraftUpdate, AgentHandoff, AgentHandoffInfo, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentPrompt, AgentPromptPart, AgentPromptVoice, AgentQuietHours, AgentRelationStart, AgentReportField, AgentReportFieldInfo, AgentRestored, AgentSettingInForce, AgentSettingsInfo, AgentSettingsUpdate, AgentsFollowing, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVersion, AgentVersionPage, AgentVersionRestore, AgentVersionSummary, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, CancelScheduledMessageData, CancelScheduledMessageError, CancelScheduledMessageErrors, CancelScheduledMessageResponse, CancelScheduledMessageResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, ConversationReport, ConversationReportPage, CopyAgentData, CopyAgentError, CopyAgentErrors, CopyAgentResponse, CopyAgentResponses, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserFactData, CreateEndUserFactError, CreateEndUserFactErrors, CreateEndUserFactResponse, CreateEndUserFactResponses, CreateEndUserMemoryData, CreateEndUserMemoryError, CreateEndUserMemoryErrors, CreateEndUserMemoryResponse, CreateEndUserMemoryResponses, CreateEndUserNoteData, CreateEndUserNoteError, CreateEndUserNoteErrors, CreateEndUserNoteResponse, CreateEndUserNoteResponses, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, CreateFactData, CreateFactError, CreateFactErrors, CreateFactResponse, CreateFactResponses, CreateImageData, CreateImageError, CreateImageErrors, CreateImageResponse, CreateImageResponses, CreateKnowledgeData, CreateKnowledgeError, CreateKnowledgeErrors, CreateKnowledgeFromFileData, CreateKnowledgeFromFileError, CreateKnowledgeFromFileErrors, CreateKnowledgeFromFileResponse, CreateKnowledgeFromFileResponses, CreateKnowledgeFromUrlData, CreateKnowledgeFromUrlError, CreateKnowledgeFromUrlErrors, CreateKnowledgeFromUrlResponse, CreateKnowledgeFromUrlResponses, CreateKnowledgeResponse, CreateKnowledgeResponses, CreateKnowledgeUploadUrlData, CreateKnowledgeUploadUrlError, CreateKnowledgeUploadUrlErrors, CreateKnowledgeUploadUrlResponse, CreateKnowledgeUploadUrlResponses, CreateScheduledMessageData, CreateScheduledMessageError, CreateScheduledMessageErrors, CreateScheduledMessageResponse, CreateScheduledMessageResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, CreateToolData, CreateToolError, CreateToolErrors, CreateToolResponse, CreateToolResponses, CreateTranscriptionData, CreateTranscriptionError, CreateTranscriptionErrors, CreateTranscriptionResponse, CreateTranscriptionResponses, CreateVideoData, CreateVideoError, CreateVideoErrors, CreateVideoResponse, CreateVideoResponses, CreateVoiceData, CreateVoiceError, CreateVoiceErrors, CreateVoiceResponse, CreateVoiceResponses, CreateVoiceUploadUrlData, CreateVoiceUploadUrlError, CreateVoiceUploadUrlErrors, CreateVoiceUploadUrlResponse, CreateVoiceUploadUrlResponses, DeleteAgentData, DeleteAgentError, DeleteAgentErrors, DeleteAgentResponse, DeleteAgentResponses, DeleteAllEndUserMemoriesData, DeleteAllEndUserMemoriesError, DeleteAllEndUserMemoriesErrors, DeleteAllEndUserMemoriesResponse, DeleteAllEndUserMemoriesResponses, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAllMemoriesData, DeleteAllMemoriesError, DeleteAllMemoriesErrors, DeleteAllMemoriesResponse, DeleteAllMemoriesResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserMemoryData, DeleteEndUserMemoryError, DeleteEndUserMemoryErrors, DeleteEndUserMemoryResponse, DeleteEndUserMemoryResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteEndUserStateData, DeleteEndUserStateError, DeleteEndUserStateErrors, DeleteEndUserStateResponse, DeleteEndUserStateResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteMemoryData, DeleteMemoryError, DeleteMemoryErrors, DeleteMemoryResponse, DeleteMemoryResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, DiscardAgentDraftData, DiscardAgentDraftError, DiscardAgentDraftErrors, DiscardAgentDraftResponse, DiscardAgentDraftResponses, DraftLayoutData, DraftLayoutError, DraftLayoutErrors, DraftLayoutResponse, DraftLayoutResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserPersonalization, EndUserPersonalizationUpdate, EndUserState, EndUserStatePage, EndUserStateUpdate, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyOverrides, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactsReadInfo, FactUpdateRequest, FindLayoutElementsData, FindLayoutElementsError, FindLayoutElementsErrors, FindLayoutElementsResponse, FindLayoutElementsResponses, FolderCreate, FolderDeleted, FolderDetail, FolderPage, FolderSummary, FolderUpdate, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentDraftData, GetAgentDraftError, GetAgentDraftErrors, GetAgentDraftResponse, GetAgentDraftResponses, GetAgentError, GetAgentErrors, GetAgentPromptData, GetAgentPromptError, GetAgentPromptErrors, GetAgentPromptResponse, GetAgentPromptResponses, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAgentVersionData, GetAgentVersionError, GetAgentVersionErrors, GetAgentVersionResponse, GetAgentVersionResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetFolderData, GetAssetFolderError, GetAssetFolderErrors, GetAssetFolderResponse, GetAssetFolderResponses, GetAssetResponse, GetAssetResponses, GetAudioData, GetAudioError, GetAudioErrors, GetAudioResponse, GetAudioResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserMemoryData, GetEndUserMemoryError, GetEndUserMemoryErrors, GetEndUserMemoryResponse, GetEndUserMemoryResponses, GetEndUserPersonalizationData, GetEndUserPersonalizationError, GetEndUserPersonalizationErrors, GetEndUserPersonalizationResponse, GetEndUserPersonalizationResponses, GetEndUserReportData, GetEndUserReportError, GetEndUserReportErrors, GetEndUserReportResponse, GetEndUserReportResponses, GetEndUserResponse, GetEndUserResponses, GetEndUserStateData, GetEndUserStateError, GetEndUserStateErrors, GetEndUserStateResponse, GetEndUserStateResponses, GetEphemeralKeyData, GetEphemeralKeyError, GetEphemeralKeyErrors, GetEphemeralKeyLimitsData, GetEphemeralKeyLimitsError, GetEphemeralKeyLimitsErrors, GetEphemeralKeyLimitsResponse, GetEphemeralKeyLimitsResponses, GetEphemeralKeyResponse, GetEphemeralKeyResponses, GetGenerationData, GetGenerationError, GetGenerationErrors, GetGenerationResponse, GetGenerationResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetImageData, GetImageError, GetImageErrors, GetImageResponse, GetImageResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeInsightsData, GetKnowledgeInsightsError, GetKnowledgeInsightsErrors, GetKnowledgeInsightsResponse, GetKnowledgeInsightsResponses, GetKnowledgeResponse, GetKnowledgeResponses, GetMemoryData, GetMemoryError, GetMemoryErrors, GetMemoryResponse, GetMemoryResponses, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetPlatformLimitsData, GetPlatformLimitsResponse, GetPlatformLimitsResponses, GetScheduledMessageData, GetScheduledMessageError, GetScheduledMessageErrors, GetScheduledMessageResponse, GetScheduledMessageResponses, GetSessionData, GetSessionError, GetSessionErrors, GetSessionResponse, GetSessionResponses, GetSkyboxData, GetSkyboxError, GetSkyboxErrors, GetSkyboxResponse, GetSkyboxResponses, GetTemplateData, GetTemplateError, GetTemplateErrors, GetTemplateFileData, GetTemplateFileErrors, GetTemplateFileResponses, GetTemplateResponse, GetTemplateResponses, GetTokenData, GetTokenError, GetTokenErrors, GetTokenResponse, GetTokenResponses, GetToolData, GetToolError, GetToolErrors, GetToolResponse, GetToolResponses, GetTranscriptionData, GetTranscriptionError, GetTranscriptionErrors, GetTranscriptionResponse, GetTranscriptionResponses, GetUsageData, GetUsageError, GetUsageErrors, GetUsageResponse, GetUsageResponses, GetVideoData, GetVideoError, GetVideoErrors, GetVideoResponse, GetVideoResponses, GetVoiceData, GetVoiceError, GetVoiceErrors, GetVoiceResponse, GetVoiceResponses, HealthResponse, ImageRequest, KnowledgeAgentsUpdate, KnowledgeAssigned, KnowledgeBulk, KnowledgeBulkResult, KnowledgeCategoryPage, KnowledgeCitation, KnowledgeCreate, KnowledgeEntryUsage, KnowledgeFileCreate, KnowledgeInfo, KnowledgeInsights, KnowledgeLookupInfo, KnowledgePage, KnowledgeSearchHit, KnowledgeSearchRequest, KnowledgeSearchResult, KnowledgeUpdate, KnowledgeUploadRequest, KnowledgeUploadTicket, KnowledgeUrlCreate, LayoutDraft, LayoutDraftRequest, LayoutElement, LayoutElementInfo, LayoutFindRequest, LayoutFound, LayoutSourceInfo, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsErrors, ListAgentVersionsResponse, ListAgentVersionsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUserFactsData, ListEndUserFactsError, ListEndUserFactsErrors, ListEndUserFactsResponse, ListEndUserFactsResponses, ListEndUserMemoriesData, ListEndUserMemoriesError, ListEndUserMemoriesErrors, ListEndUserMemoriesResponse, ListEndUserMemoriesResponses, ListEndUserRelationsData, ListEndUserRelationsError, ListEndUserRelationsErrors, ListEndUserRelationsResponse, ListEndUserRelationsResponses, ListEndUserReportsData, ListEndUserReportsError, ListEndUserReportsErrors, ListEndUserReportsResponse, ListEndUserReportsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, ListEndUserStatesData, ListEndUserStatesError, ListEndUserStatesErrors, ListEndUserStatesResponse, ListEndUserStatesResponses, ListEphemeralKeysData, ListEphemeralKeysError, ListEphemeralKeysErrors, ListEphemeralKeysResponse, ListEphemeralKeysResponses, ListFactsData, ListFactsError, ListFactsErrors, ListFactsResponse, ListFactsResponses, ListGenerationsData, ListGenerationsError, ListGenerationsErrors, ListGenerationsResponse, ListGenerationsResponses, ListKnowledgeCategoriesData, ListKnowledgeCategoriesError, ListKnowledgeCategoriesErrors, ListKnowledgeCategoriesResponse, ListKnowledgeCategoriesResponses, ListKnowledgeData, ListKnowledgeError, ListKnowledgeErrors, ListKnowledgeResponse, ListKnowledgeResponses, ListMemoriesData, ListMemoriesError, ListMemoriesErrors, ListMemoriesResponse, ListMemoriesResponses, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListScheduledMessagesData, ListScheduledMessagesError, ListScheduledMessagesErrors, ListScheduledMessagesResponse, ListScheduledMessagesResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListSkyboxStylesData, ListSkyboxStylesError, ListSkyboxStylesErrors, ListSkyboxStylesResponse, ListSkyboxStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MemoriesDeleted, MemoriesWrittenInfo, MemoryCitation, MemoryCreateRequest, MemoryInfo, MemoryPage, MemoryUpdateRequest, MessageContext, MessageInfo, MessageKnowledge, MessageMemories, MessageNote, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, NoteCreateRequest, NoteTaken, OrgPlan, PlatformLimit, PlatformLimitPage, PostSessionToolResultData, PostSessionToolResultError, PostSessionToolResultErrors, PostSessionToolResultResponse, PostSessionToolResultResponses, PostToolResultData, PostToolResultError, PostToolResultErrors, PostToolResultResponse, PostToolResultResponses, ProviderVoiceSettings, ProviderVoiceSettingsInfo, PublishAgentDraftData, PublishAgentDraftError, PublishAgentDraftErrors, PublishAgentDraftResponse, PublishAgentDraftResponses, Reference, ReferenceInfo, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ReportAgentVersion, ReportDelivery, ReportLine, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, ResetEndUserRelationData, ResetEndUserRelationError, ResetEndUserRelationErrors, ResetEndUserRelationResponse, ResetEndUserRelationResponses, ResetRelationData, ResetRelationError, ResetRelationErrors, ResetRelationResponse, ResetRelationResponses, RestoreAgentVersionData, RestoreAgentVersionError, RestoreAgentVersionErrors, RestoreAgentVersionResponse, RestoreAgentVersionResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SafetyInfo, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, ScheduledMessage, ScheduledMessageCreateRequest, ScheduledMessageDelivery, ScheduledMessagePage, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetEndUserStateData, SetEndUserStateError, SetEndUserStateErrors, SetEndUserStateResponse, SetEndUserStateResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestAgentWebhookData, TestAgentWebhookError, TestAgentWebhookErrors, TestAgentWebhookResponse, TestAgentWebhookResponses, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolResultRequest, ToolResultTaken, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponse, TranscribeResponses, Transcription, TranscriptionStreamLine, TranscriptWord, TtsOptions, TtsRequest, UnansweredQuestion, UpdateAgentData, UpdateAgentDraftData, UpdateAgentDraftError, UpdateAgentDraftErrors, UpdateAgentDraftResponse, UpdateAgentDraftResponses, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAgentSettingsData, UpdateAgentSettingsError, UpdateAgentSettingsErrors, UpdateAgentSettingsResponse, UpdateAgentSettingsResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetFolderData, UpdateAssetFolderError, UpdateAssetFolderErrors, UpdateAssetFolderResponse, UpdateAssetFolderResponses, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserFactData, UpdateEndUserFactError, UpdateEndUserFactErrors, UpdateEndUserFactResponse, UpdateEndUserFactResponses, UpdateEndUserMemoryData, UpdateEndUserMemoryError, UpdateEndUserMemoryErrors, UpdateEndUserMemoryResponse, UpdateEndUserMemoryResponses, UpdateEndUserPersonalizationData, UpdateEndUserPersonalizationError, UpdateEndUserPersonalizationErrors, UpdateEndUserPersonalizationResponse, UpdateEndUserPersonalizationResponses, UpdateEndUserResponse, UpdateEndUserResponses, UpdateFactData, UpdateFactError, UpdateFactErrors, UpdateFactResponse, UpdateFactResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, Variables, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket, WebhookSecret, WebhookTestResult, WriteSessionMemoriesData, WriteSessionMemoriesError, WriteSessionMemoriesErrors, WriteSessionMemoriesResponse, WriteSessionMemoriesResponses } from './types.gen.js';
1
+ export type { AgentCopyRequest, AgentCreateRequest, AgentDefaults, AgentDefaultsUpdate, AgentDraft, AgentDraftPublish, AgentDraftUpdate, AgentHandoff, AgentHandoffInfo, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentPrompt, AgentPromptPart, AgentPromptVoice, AgentQuietHours, AgentRelationStart, AgentReportField, AgentReportFieldInfo, AgentRestored, AgentSettingInForce, AgentSettingsInfo, AgentSettingsUpdate, AgentsFollowing, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, AgentUpdate, AgentVersion, AgentVersionPage, AgentVersionRestore, AgentVersionSummary, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, CancelScheduledMessageData, CancelScheduledMessageError, CancelScheduledMessageErrors, CancelScheduledMessageResponse, CancelScheduledMessageResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, ConversationReport, ConversationReportPage, CopyAgentData, CopyAgentError, CopyAgentErrors, CopyAgentResponse, CopyAgentResponses, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserFactData, CreateEndUserFactError, CreateEndUserFactErrors, CreateEndUserFactResponse, CreateEndUserFactResponses, CreateEndUserMemoryData, CreateEndUserMemoryError, CreateEndUserMemoryErrors, CreateEndUserMemoryResponse, CreateEndUserMemoryResponses, CreateEndUserNoteData, CreateEndUserNoteError, CreateEndUserNoteErrors, CreateEndUserNoteResponse, CreateEndUserNoteResponses, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, CreateFactData, CreateFactError, CreateFactErrors, CreateFactResponse, CreateFactResponses, CreateImageData, CreateImageError, CreateImageErrors, CreateImageResponse, CreateImageResponses, CreateKnowledgeData, CreateKnowledgeError, CreateKnowledgeErrors, CreateKnowledgeFromFileData, CreateKnowledgeFromFileError, CreateKnowledgeFromFileErrors, CreateKnowledgeFromFileResponse, CreateKnowledgeFromFileResponses, CreateKnowledgeFromUrlData, CreateKnowledgeFromUrlError, CreateKnowledgeFromUrlErrors, CreateKnowledgeFromUrlResponse, CreateKnowledgeFromUrlResponses, CreateKnowledgeResponse, CreateKnowledgeResponses, CreateKnowledgeUploadUrlData, CreateKnowledgeUploadUrlError, CreateKnowledgeUploadUrlErrors, CreateKnowledgeUploadUrlResponse, CreateKnowledgeUploadUrlResponses, CreateScheduledMessageData, CreateScheduledMessageError, CreateScheduledMessageErrors, CreateScheduledMessageResponse, CreateScheduledMessageResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, CreateToolData, CreateToolError, CreateToolErrors, CreateToolResponse, CreateToolResponses, CreateTranscriptionData, CreateTranscriptionError, CreateTranscriptionErrors, CreateTranscriptionResponse, CreateTranscriptionResponses, CreateVideoData, CreateVideoError, CreateVideoErrors, CreateVideoResponse, CreateVideoResponses, CreateVoiceData, CreateVoiceError, CreateVoiceErrors, CreateVoiceResponse, CreateVoiceResponses, CreateVoiceUploadUrlData, CreateVoiceUploadUrlError, CreateVoiceUploadUrlErrors, CreateVoiceUploadUrlResponse, CreateVoiceUploadUrlResponses, DeleteAgentData, DeleteAgentError, DeleteAgentErrors, DeleteAgentResponse, DeleteAgentResponses, DeleteAllEndUserMemoriesData, DeleteAllEndUserMemoriesError, DeleteAllEndUserMemoriesErrors, DeleteAllEndUserMemoriesResponse, DeleteAllEndUserMemoriesResponses, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAllMemoriesData, DeleteAllMemoriesError, DeleteAllMemoriesErrors, DeleteAllMemoriesResponse, DeleteAllMemoriesResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserMemoryData, DeleteEndUserMemoryError, DeleteEndUserMemoryErrors, DeleteEndUserMemoryResponse, DeleteEndUserMemoryResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteEndUserStateData, DeleteEndUserStateError, DeleteEndUserStateErrors, DeleteEndUserStateResponse, DeleteEndUserStateResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteMemoryData, DeleteMemoryError, DeleteMemoryErrors, DeleteMemoryResponse, DeleteMemoryResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, DiscardAgentDraftData, DiscardAgentDraftError, DiscardAgentDraftErrors, DiscardAgentDraftResponse, DiscardAgentDraftResponses, DraftLayoutData, DraftLayoutError, DraftLayoutErrors, DraftLayoutResponse, DraftLayoutResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserPersonalization, EndUserPersonalizationUpdate, EndUserState, EndUserStatePage, EndUserStateUpdate, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyOverrides, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactsReadInfo, FactUpdateRequest, FindLayoutElementsData, FindLayoutElementsError, FindLayoutElementsErrors, FindLayoutElementsResponse, FindLayoutElementsResponses, FolderCreate, FolderDeleted, FolderDetail, FolderPage, FolderSummary, FolderUpdate, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerateTextData, GenerateTextError, GenerateTextErrors, GenerateTextResponse, GenerateTextResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentDraftData, GetAgentDraftError, GetAgentDraftErrors, GetAgentDraftResponse, GetAgentDraftResponses, GetAgentError, GetAgentErrors, GetAgentPromptData, GetAgentPromptError, GetAgentPromptErrors, GetAgentPromptResponse, GetAgentPromptResponses, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAgentVersionData, GetAgentVersionError, GetAgentVersionErrors, GetAgentVersionResponse, GetAgentVersionResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetFolderData, GetAssetFolderError, GetAssetFolderErrors, GetAssetFolderResponse, GetAssetFolderResponses, GetAssetResponse, GetAssetResponses, GetAudioData, GetAudioError, GetAudioErrors, GetAudioResponse, GetAudioResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserMemoryData, GetEndUserMemoryError, GetEndUserMemoryErrors, GetEndUserMemoryResponse, GetEndUserMemoryResponses, GetEndUserPersonalizationData, GetEndUserPersonalizationError, GetEndUserPersonalizationErrors, GetEndUserPersonalizationResponse, GetEndUserPersonalizationResponses, GetEndUserReportData, GetEndUserReportError, GetEndUserReportErrors, GetEndUserReportResponse, GetEndUserReportResponses, GetEndUserResponse, GetEndUserResponses, GetEndUserStateData, GetEndUserStateError, GetEndUserStateErrors, GetEndUserStateResponse, GetEndUserStateResponses, GetEphemeralKeyData, GetEphemeralKeyError, GetEphemeralKeyErrors, GetEphemeralKeyLimitsData, GetEphemeralKeyLimitsError, GetEphemeralKeyLimitsErrors, GetEphemeralKeyLimitsResponse, GetEphemeralKeyLimitsResponses, GetEphemeralKeyResponse, GetEphemeralKeyResponses, GetGenerationData, GetGenerationError, GetGenerationErrors, GetGenerationResponse, GetGenerationResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetImageData, GetImageError, GetImageErrors, GetImageResponse, GetImageResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeInsightsData, GetKnowledgeInsightsError, GetKnowledgeInsightsErrors, GetKnowledgeInsightsResponse, GetKnowledgeInsightsResponses, GetKnowledgeResponse, GetKnowledgeResponses, GetMemoryData, GetMemoryError, GetMemoryErrors, GetMemoryResponse, GetMemoryResponses, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetPlatformLimitsData, GetPlatformLimitsResponse, GetPlatformLimitsResponses, GetScheduledMessageData, GetScheduledMessageError, GetScheduledMessageErrors, GetScheduledMessageResponse, GetScheduledMessageResponses, GetSessionData, GetSessionError, GetSessionErrors, GetSessionResponse, GetSessionResponses, GetSkyboxData, GetSkyboxError, GetSkyboxErrors, GetSkyboxResponse, GetSkyboxResponses, GetTemplateData, GetTemplateError, GetTemplateErrors, GetTemplateFileData, GetTemplateFileErrors, GetTemplateFileResponses, GetTemplateResponse, GetTemplateResponses, GetTokenData, GetTokenError, GetTokenErrors, GetTokenResponse, GetTokenResponses, GetToolData, GetToolError, GetToolErrors, GetToolResponse, GetToolResponses, GetTranscriptionData, GetTranscriptionError, GetTranscriptionErrors, GetTranscriptionResponse, GetTranscriptionResponses, GetUsageData, GetUsageError, GetUsageErrors, GetUsageResponse, GetUsageResponses, GetVideoData, GetVideoError, GetVideoErrors, GetVideoResponse, GetVideoResponses, GetVoiceData, GetVoiceError, GetVoiceErrors, GetVoiceResponse, GetVoiceResponses, HealthResponse, ImageRequest, KnowledgeAgentsUpdate, KnowledgeAssigned, KnowledgeBulk, KnowledgeBulkResult, KnowledgeCategoryPage, KnowledgeCitation, KnowledgeCreate, KnowledgeEntryUsage, KnowledgeFileCreate, KnowledgeInfo, KnowledgeInsights, KnowledgeLookupInfo, KnowledgePage, KnowledgeSearchHit, KnowledgeSearchRequest, KnowledgeSearchResult, KnowledgeUpdate, KnowledgeUploadRequest, KnowledgeUploadTicket, KnowledgeUrlCreate, LayoutDraft, LayoutDraftRequest, LayoutElement, LayoutElementInfo, LayoutFindRequest, LayoutFound, LayoutSourceInfo, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsErrors, ListAgentVersionsResponse, ListAgentVersionsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUserFactsData, ListEndUserFactsError, ListEndUserFactsErrors, ListEndUserFactsResponse, ListEndUserFactsResponses, ListEndUserMemoriesData, ListEndUserMemoriesError, ListEndUserMemoriesErrors, ListEndUserMemoriesResponse, ListEndUserMemoriesResponses, ListEndUserRelationsData, ListEndUserRelationsError, ListEndUserRelationsErrors, ListEndUserRelationsResponse, ListEndUserRelationsResponses, ListEndUserReportsData, ListEndUserReportsError, ListEndUserReportsErrors, ListEndUserReportsResponse, ListEndUserReportsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, ListEndUserStatesData, ListEndUserStatesError, ListEndUserStatesErrors, ListEndUserStatesResponse, ListEndUserStatesResponses, ListEphemeralKeysData, ListEphemeralKeysError, ListEphemeralKeysErrors, ListEphemeralKeysResponse, ListEphemeralKeysResponses, ListFactsData, ListFactsError, ListFactsErrors, ListFactsResponse, ListFactsResponses, ListGenerationsData, ListGenerationsError, ListGenerationsErrors, ListGenerationsResponse, ListGenerationsResponses, ListKnowledgeCategoriesData, ListKnowledgeCategoriesError, ListKnowledgeCategoriesErrors, ListKnowledgeCategoriesResponse, ListKnowledgeCategoriesResponses, ListKnowledgeData, ListKnowledgeError, ListKnowledgeErrors, ListKnowledgeResponse, ListKnowledgeResponses, ListMemoriesData, ListMemoriesError, ListMemoriesErrors, ListMemoriesResponse, ListMemoriesResponses, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListScheduledMessagesData, ListScheduledMessagesError, ListScheduledMessagesErrors, ListScheduledMessagesResponse, ListScheduledMessagesResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListSkyboxStylesData, ListSkyboxStylesError, ListSkyboxStylesErrors, ListSkyboxStylesResponse, ListSkyboxStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MemoriesDeleted, MemoriesWrittenInfo, MemoryCitation, MemoryCreateRequest, MemoryInfo, MemoryPage, MemoryUpdateRequest, MessageContext, MessageInfo, MessageKnowledge, MessageMemories, MessageNote, MessagePage, MessageSource, MessageToolCall, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, NoteCreateRequest, NoteTaken, OrgPlan, PlatformLimit, PlatformLimitPage, PostSessionToolResultData, PostSessionToolResultError, PostSessionToolResultErrors, PostSessionToolResultResponse, PostSessionToolResultResponses, PostToolResultData, PostToolResultError, PostToolResultErrors, PostToolResultResponse, PostToolResultResponses, ProviderVoiceSettings, ProviderVoiceSettingsInfo, PublishAgentDraftData, PublishAgentDraftError, PublishAgentDraftErrors, PublishAgentDraftResponse, PublishAgentDraftResponses, Reference, ReferenceInfo, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ReportAgentVersion, ReportDelivery, ReportLine, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, ResetEndUserRelationData, ResetEndUserRelationError, ResetEndUserRelationErrors, ResetEndUserRelationResponse, ResetEndUserRelationResponses, ResetRelationData, ResetRelationError, ResetRelationErrors, ResetRelationResponse, ResetRelationResponses, RestoreAgentVersionData, RestoreAgentVersionError, RestoreAgentVersionErrors, RestoreAgentVersionResponse, RestoreAgentVersionResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SafetyInfo, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, ScheduledMessage, ScheduledMessageCreateRequest, ScheduledMessageDelivery, ScheduledMessagePage, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetEndUserStateData, SetEndUserStateError, SetEndUserStateErrors, SetEndUserStateResponse, SetEndUserStateResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestAgentWebhookData, TestAgentWebhookError, TestAgentWebhookErrors, TestAgentWebhookResponse, TestAgentWebhookResponses, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TextMessage, TextRequest, TextResponse, TextStreamDelta, TextStreamDone, TextStreamError, TextStreamLine, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolResultRequest, ToolResultTaken, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponse, TranscribeResponses, Transcription, TranscriptionStreamLine, TranscriptWord, TtsOptions, TtsRequest, UnansweredQuestion, UpdateAgentData, UpdateAgentDraftData, UpdateAgentDraftError, UpdateAgentDraftErrors, UpdateAgentDraftResponse, UpdateAgentDraftResponses, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAgentSettingsData, UpdateAgentSettingsError, UpdateAgentSettingsErrors, UpdateAgentSettingsResponse, UpdateAgentSettingsResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetFolderData, UpdateAssetFolderError, UpdateAssetFolderErrors, UpdateAssetFolderResponse, UpdateAssetFolderResponses, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserFactData, UpdateEndUserFactError, UpdateEndUserFactErrors, UpdateEndUserFactResponse, UpdateEndUserFactResponses, UpdateEndUserMemoryData, UpdateEndUserMemoryError, UpdateEndUserMemoryErrors, UpdateEndUserMemoryResponse, UpdateEndUserMemoryResponses, UpdateEndUserPersonalizationData, UpdateEndUserPersonalizationError, UpdateEndUserPersonalizationErrors, UpdateEndUserPersonalizationResponse, UpdateEndUserPersonalizationResponses, UpdateEndUserResponse, UpdateEndUserResponses, UpdateFactData, UpdateFactError, UpdateFactErrors, UpdateFactResponse, UpdateFactResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, Variables, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket, WebhookSecret, WebhookTestResult, WriteSessionMemoriesData, WriteSessionMemoriesError, WriteSessionMemoriesErrors, WriteSessionMemoriesResponse, WriteSessionMemoriesResponses } from './types.gen.js';
@@ -6841,6 +6841,168 @@ export type VoiceUpdate = {
6841
6841
  models?: Array<string>;
6842
6842
  provider_defaults?: ProviderVoiceSettings | null;
6843
6843
  };
6844
+ export type TextResponse = {
6845
+ /**
6846
+ * `txt_…` — this call's id, and its row in your request history.
6847
+ */
6848
+ id: string;
6849
+ /**
6850
+ * The model that answered.
6851
+ */
6852
+ model: string;
6853
+ /**
6854
+ * The answer. With `response_schema`, JSON as text. Empty when the model stopped before writing anything.
6855
+ */
6856
+ text: string;
6857
+ /**
6858
+ * How it ended. `stop`: the model finished. `length`: cut at `max_output_tokens` — `text` is real, and shorter than the model meant. `blocked`: the model's own safety stopped the answer, and `text` is empty. A request the model refuses outright is a 502 with its words instead.
6859
+ */
6860
+ finish_reason: 'stop' | 'length' | 'blocked';
6861
+ /**
6862
+ * Tokens sent to the model: charged at its input price.
6863
+ */
6864
+ input_tokens: number;
6865
+ /**
6866
+ * Tokens of the answer: charged at its output price.
6867
+ */
6868
+ output_tokens: number;
6869
+ /**
6870
+ * Tokens the model spent thinking, which are not in `text`: charged at its thinking price.
6871
+ */
6872
+ thought_tokens: number;
6873
+ /**
6874
+ * How many of `input_tokens` the model's provider read from its cache. A count only: they are charged as any input.
6875
+ */
6876
+ cached_tokens: number;
6877
+ /**
6878
+ * What this call was charged, in micro-credits: its tokens at the model's prices, less your plan's discount.
6879
+ */
6880
+ credits_micros: number;
6881
+ /**
6882
+ * When the request arrived.
6883
+ */
6884
+ created_at: string;
6885
+ };
6886
+ export type TextStreamLine = ({
6887
+ type: 'text.delta';
6888
+ } & TextStreamDelta) | ({
6889
+ type: 'done';
6890
+ } & TextStreamDone) | ({
6891
+ type: 'error';
6892
+ } & TextStreamError);
6893
+ export type TextStreamDelta = {
6894
+ type: 'text.delta';
6895
+ /**
6896
+ * The next piece of the answer: append it to the last.
6897
+ */
6898
+ text: string;
6899
+ };
6900
+ export type TextStreamDone = {
6901
+ type: 'done';
6902
+ /**
6903
+ * `txt_…` — this call's id, and its row in your request history.
6904
+ */
6905
+ id: string;
6906
+ /**
6907
+ * The model that answered.
6908
+ */
6909
+ model: string;
6910
+ /**
6911
+ * The answer. With `response_schema`, JSON as text. Empty when the model stopped before writing anything.
6912
+ */
6913
+ text: string;
6914
+ /**
6915
+ * How it ended. `stop`: the model finished. `length`: cut at `max_output_tokens` — `text` is real, and shorter than the model meant. `blocked`: the model's own safety stopped the answer, and `text` is empty. A request the model refuses outright is a 502 with its words instead.
6916
+ */
6917
+ finish_reason: 'stop' | 'length' | 'blocked';
6918
+ /**
6919
+ * Tokens sent to the model: charged at its input price.
6920
+ */
6921
+ input_tokens: number;
6922
+ /**
6923
+ * Tokens of the answer: charged at its output price.
6924
+ */
6925
+ output_tokens: number;
6926
+ /**
6927
+ * Tokens the model spent thinking, which are not in `text`: charged at its thinking price.
6928
+ */
6929
+ thought_tokens: number;
6930
+ /**
6931
+ * How many of `input_tokens` the model's provider read from its cache. A count only: they are charged as any input.
6932
+ */
6933
+ cached_tokens: number;
6934
+ /**
6935
+ * What this call was charged, in micro-credits: its tokens at the model's prices, less your plan's discount.
6936
+ */
6937
+ credits_micros: number;
6938
+ /**
6939
+ * When the request arrived.
6940
+ */
6941
+ created_at: string;
6942
+ };
6943
+ export type TextStreamError = {
6944
+ type: 'error';
6945
+ code: ErrorCode;
6946
+ message: string;
6947
+ };
6948
+ export type TextRequest = {
6949
+ /**
6950
+ * The prompt, as a string — or a chat: a list of messages, oldest first, **ending with a `user` message**. Nothing is remembered between calls: send the whole chat each time. `input` and `instructions` together are at most the platform's `limits.text.input_chars` characters, and a chat at most `limits.text.messages` messages (`GET /v1/platform/limits`).
6951
+ */
6952
+ input: string | Array<TextMessage>;
6953
+ /**
6954
+ * The system prompt: who the model is and how it answers, apart from what it is asked.
6955
+ */
6956
+ instructions?: string | null;
6957
+ /**
6958
+ * The Gemini model that answers. Unset is the platform's `text.model` (`GET /v1/platform/limits`), and the answer's `model` says which it was.
6959
+ */
6960
+ model?: 'gemini-3.1-flash-lite' | 'gemini-3.5-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
6961
+ /**
6962
+ * How hard the model thinks before answering: `minimal` is fastest. Unset, the model decides. Thinking is charged as `thought_tokens`. Not every model takes `minimal`: one that does not refuses it (422), naming the lowest level it takes.
6963
+ */
6964
+ thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
6965
+ /**
6966
+ * The most tokens the answer may be, the model's thinking included. Unset is the platform's `text.max_output_tokens` (`GET /v1/platform/limits`). An answer cut here has `finish_reason` `length`. It is also what the request is checked against before the model is asked: an organisation that could not pay for this many is refused (402).
6967
+ */
6968
+ max_output_tokens?: number | null;
6969
+ /**
6970
+ * How random the answer is, 0 to 2. **Only `gemini-3.1-flash-lite` takes it**: Google retired it from its newer models, and with any other this is refused (422), never dropped.
6971
+ */
6972
+ temperature?: number | null;
6973
+ /**
6974
+ * How much of the likeliest words the model picks from, by their total probability, 0 to 1. **Only `gemini-3.1-flash-lite` takes it**, as `temperature`.
6975
+ */
6976
+ top_p?: number | null;
6977
+ /**
6978
+ * The same seed makes the same request answer more alike. Never a guarantee. Unset is a new one each time.
6979
+ */
6980
+ seed?: number | null;
6981
+ /**
6982
+ * Where the model stops writing: at the first of these it writes, which is left out. At most 5, of 100 characters each.
6983
+ */
6984
+ stop_sequences?: Array<string> | null;
6985
+ /**
6986
+ * A JSON Schema. With one, the answer's `text` is JSON that fits it — still a string: parse it. The model reads a subset of JSON Schema, and one it cannot use is refused with its words (502).
6987
+ */
6988
+ response_schema?: {
6989
+ [key: string]: unknown;
6990
+ } | null;
6991
+ /**
6992
+ * `true` answers `application/x-ndjson`: the answer piece by piece as it is written, one `TextStreamLine` a line.
6993
+ */
6994
+ stream?: boolean;
6995
+ };
6996
+ export type TextMessage = {
6997
+ /**
6998
+ * Who said it: `user` for what you or your user wrote, `assistant` for an earlier answer of the model's.
6999
+ */
7000
+ role: 'user' | 'assistant';
7001
+ /**
7002
+ * The message's text.
7003
+ */
7004
+ content: string;
7005
+ };
6844
7006
  export type GetHealthData = {
6845
7007
  body?: never;
6846
7008
  path?: never;
@@ -13301,3 +13463,55 @@ export type ResampleVoiceResponses = {
13301
13463
  200: VoiceDetail;
13302
13464
  };
13303
13465
  export type ResampleVoiceResponse = ResampleVoiceResponses[keyof ResampleVoiceResponses];
13466
+ export type GenerateTextData = {
13467
+ body: TextRequest;
13468
+ path?: never;
13469
+ query?: never;
13470
+ url: '/v1/text';
13471
+ };
13472
+ export type GenerateTextErrors = {
13473
+ /**
13474
+ * The request could not be read: malformed JSON
13475
+ */
13476
+ 400: ErrorResponse;
13477
+ /**
13478
+ * Missing or invalid credentials
13479
+ */
13480
+ 401: ErrorResponse;
13481
+ /**
13482
+ * Out of credits, the organisation is suspended, or it could not pay for what this request could cost at most — nothing was charged
13483
+ */
13484
+ 402: ErrorResponse;
13485
+ /**
13486
+ * The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
13487
+ */
13488
+ 403: ErrorResponse;
13489
+ /**
13490
+ * The body is larger than the platform's `limits.text.request_bytes`
13491
+ */
13492
+ 413: ErrorResponse;
13493
+ /**
13494
+ * The request failed validation: a field out of bounds, an unknown model, a chat that does not end with a `user` message, input past the platform's limits, or a setting the model does not take
13495
+ */
13496
+ 422: ErrorResponse;
13497
+ /**
13498
+ * Rate limit exceeded
13499
+ */
13500
+ 429: ErrorResponse;
13501
+ /**
13502
+ * The model failed, or refused the request outright; the message says why. Nothing was charged
13503
+ */
13504
+ 502: ErrorResponse;
13505
+ /**
13506
+ * Text is not configured on this platform, or the model provider is at its rate limit — then with `Retry-After`
13507
+ */
13508
+ 503: ErrorResponse;
13509
+ };
13510
+ export type GenerateTextError = GenerateTextErrors[keyof GenerateTextErrors];
13511
+ export type GenerateTextResponses = {
13512
+ /**
13513
+ * The answer — one JSON body, or with `stream: true` a line a piece
13514
+ */
13515
+ 200: TextResponse;
13516
+ };
13517
+ export type GenerateTextResponse = GenerateTextResponses[keyof GenerateTextResponses];
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export type { Knowledge, KnowledgeInsightsParams, KnowledgeListParams, Knowledge
17
17
  export type { Library, Listing, Resource, Waitable, WaitableLibrary, } from "./resources/resource.js";
18
18
  export type { Speech, Stt, SttEvent, SttParams, Transcript, Tts, } from "./resources/speech.js";
19
19
  export type { TemplateFile, Templates } from "./resources/templates.js";
20
+ export type { Text, TextParams } from "./resources/text.js";
20
21
  export type { ToolCallsParams, Tools } from "./resources/tools.js";
21
22
  export type { Usage, UsageParams } from "./resources/usage.js";
22
23
  export type { Voices, VoiceUploadFields } from "./resources/voices.js";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * `client.text` — `POST /v1/text`: a prompt or a chat in, a Gemini model's
3
+ * answer out, charged per token. A metered POST, resent only after a 429:
4
+ * a 503 for the model provider's own rate limit is thrown with its
5
+ * `retryAfter`, the caller's to wait for.
6
+ *
7
+ * - **`generate(body)` answers it whole**, with its tokens and what it
8
+ * cost (`credits_micros`). **`stream(body)` answers it as it is
9
+ * written**: an async iterator of the stream's NDJSON lines —
10
+ * `text.delta` pieces, then one `done` carrying the whole answer, or one
11
+ * `error` and no `done`. **A stream that ends with no `done` is not
12
+ * whole**, and is charged for what was written.
13
+ * - **`stream` is the method's, never the body's**: a body that named one
14
+ * would be answered in the other method's shape, so it is not sent on.
15
+ * - **Nothing is sent until the iterator is read**, and one left early
16
+ * hangs up (`../stream.ts`).
17
+ * - **Both wait `TEXT_WAIT_MS` for their answer's headers**: a stream's
18
+ * arrive with the model's first piece, not at once, and its timer ends
19
+ * there; `signal` still ends it.
20
+ */
21
+ import type { TextRequest, TextResponse, TextStreamLine } from "../gen/index.js";
22
+ import type { RequestOptions } from "../transport.js";
23
+ import { Resource } from "./resource.js";
24
+ /** `POST /v1/text`'s body without `stream`, which the method chosen says. */
25
+ export type TextParams = Omit<TextRequest, "stream">;
26
+ /**
27
+ * The least these calls wait for their answer, in ms. **The API holds a
28
+ * whole answer open past the client's 30 s**: for the platform's
29
+ * `text.timeout_ms`, 120 s unless its staff changed it — here with room
30
+ * for the answer to arrive. Hung up on at 30 s, the model's work went on
31
+ * and was charged, and its answer was lost: a POST is not sent again.
32
+ * `apps/api/test/sdk.test.ts` holds it above the API's own. A platform
33
+ * that waits longer, or a model that thinks for longer before a stream's
34
+ * first piece, is a call's own `timeoutMs`.
35
+ */
36
+ export declare const TEXT_WAIT_MS = 130000;
37
+ export declare class Text extends Resource {
38
+ /** The answer whole, once it is all written. */
39
+ generate(body: TextParams, options?: RequestOptions): Promise<TextResponse>;
40
+ /** The answer as it is written: an iterator of its lines. */
41
+ stream(body: TextParams, options?: RequestOptions): AsyncGenerator<TextStreamLine, void, undefined>;
42
+ /** The one call both make: `stream` set for a stream, left out for an answer whole. */
43
+ private ask;
44
+ }
@@ -0,0 +1,35 @@
1
+ import { ndjson } from "../stream.js";
2
+ import { Resource } from "./resource.js";
3
+ /**
4
+ * The least these calls wait for their answer, in ms. **The API holds a
5
+ * whole answer open past the client's 30 s**: for the platform's
6
+ * `text.timeout_ms`, 120 s unless its staff changed it — here with room
7
+ * for the answer to arrive. Hung up on at 30 s, the model's work went on
8
+ * and was charged, and its answer was lost: a POST is not sent again.
9
+ * `apps/api/test/sdk.test.ts` holds it above the API's own. A platform
10
+ * that waits longer, or a model that thinks for longer before a stream's
11
+ * first piece, is a call's own `timeoutMs`.
12
+ */
13
+ export const TEXT_WAIT_MS = 130_000;
14
+ export class Text extends Resource {
15
+ /** The answer whole, once it is all written. */
16
+ generate(body, options) {
17
+ return this.ask(body, options).then((answer) => answer.data);
18
+ }
19
+ /** The answer as it is written: an iterator of its lines. */
20
+ async *stream(body, options) {
21
+ const answer = await this.ask(body, options, true);
22
+ yield* ndjson(answer.data, answer.requestId);
23
+ }
24
+ /** The one call both make: `stream` set for a stream, left out for an answer whole. */
25
+ ask(body, options, stream) {
26
+ return this.api.request({
27
+ method: "POST",
28
+ path: this.base,
29
+ // An `undefined` is not written into JSON: the API's default, whole.
30
+ body: { ...body, stream },
31
+ read: stream && "stream",
32
+ waitMs: TEXT_WAIT_MS,
33
+ }, options);
34
+ }
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumavox/server",
3
- "version": "0.66.0",
3
+ "version": "0.67.0",
4
4
  "description": "The Lumavox API from your server: end users, ephemeral keys and the rest, typed from the published OpenAPI document. Zero dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",