@lumavox/server 0.2.2 → 0.4.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
@@ -25,7 +25,7 @@ const person = await lumavox.endUsers.create({ external_id: user.id });
25
25
  // Their device talks to agents with a key of its own, never yours.
26
26
  const { key } = await lumavox.ephemeralKeys.create({
27
27
  end_user_id: user.id,
28
- credit_limit: "5",
28
+ credit_limit_micros: 5_000_000, // 5 credits
29
29
  expires_in_seconds: 900,
30
30
  });
31
31
  ```
@@ -53,8 +53,10 @@ createClient({
53
53
  Bodies and answers are the API's own JSON, field for field, as the API
54
54
  reference shows them; methods are camelCase, and the SDK's options go in a
55
55
  last argument on every call: `{ timeoutMs, signal, maxRetries, requestId }`.
56
- Amounts are decimal strings and times ISO strings, as on the wire. Every
57
- schema is exported as a type: `GenerationInfo`, `AssetDetail`, `EndUserInfo`, …
56
+ Credits are integers of micro-credits (`*_micros`; 1 credit is 1,000,000)
57
+ and times ISO strings, as on the wire. Every schema is exported as a type:
58
+ `GenerationInfo`, `AssetDetail`, `EndUserInfo`, … — and `Page<T>`, any
59
+ list's page.
58
60
 
59
61
  | Resource | Methods |
60
62
  |---|---|
@@ -62,17 +64,17 @@ schema is exported as a type: `GenerationInfo`, `AssetDetail`, `EndUserInfo`,
62
64
  | `ephemeralKeys` | `limits`, `create`, `revoke`, `inspect`, `list`, `page` |
63
65
  | `images`, `videos`, `audio`, `skybox`, `transcriptions` | `create`, `get`, `wait`, `generate`; `skybox.styles` |
64
66
  | `generations` | `get`, `wait`, `list`, `page` |
65
- | `templates` | `list`, `get`, `create`, `generate`, `file` |
67
+ | `templates` | `list`, `page`, `get`, `create`, `generate`, `file` |
66
68
  | `tts`, `stt` | `create` |
67
- | `voices` | `list`, `get`, `create`, `uploadUrl`, `upload`, `update`, `delete`, `resample`, `design`, `saveDesign`, `wait` |
69
+ | `voices` | `list`, `page`, `get`, `create`, `uploadUrl`, `upload`, `update`, `delete`, `resample`, `design`, `saveDesign`, `wait` |
68
70
  | `assets` | `list`, `page`, `get`, `uploadUrl`, `confirm`, `upload`, `update`, `delete`, `deleteMany`, `move`, `wait`; `assets.folders.*` |
69
- | `agents` | `list`, `get`, `create`, `update`, `delete`; `agents.settings.get/update`; `agents.knowledge.list/set` |
71
+ | `agents` | `list`, `page`, `get`, `create`, `update`, `delete`; `agents.settings.get/update`; `agents.knowledge.list/set` |
70
72
  | `knowledge` | `list`, `page`, `get`, `create`, `bulk`, `fromUrl`, `uploadUrl`, `fromFile`, `upload`, `update`, `delete`, `reindex`, `refresh`, `setAgents`, `search`, `categories`, `insights`, `wait` |
71
73
  | `usage` | `get`, `plan` |
72
74
  | the client | `health()` |
73
75
 
74
- - **`list()` is an async iterator over every item**, page after page;
75
- `page()` is one page.
76
+ - **`list()` is an async iterator over every item**, page after page by
77
+ each page's `next_cursor`; `page()` is one page, `{ data, next_cursor }`.
76
78
  - **`generate(body)` creates a job and waits for it**; `wait(id)` waits for
77
79
  one you made. Both answer the finished job — read its `status`; a failed
78
80
  one is refunded. Give a long one a `signal: AbortSignal.timeout(…)`.
@@ -83,14 +85,17 @@ schema is exported as a type: `GenerationInfo`, `AssetDetail`, `EndUserInfo`,
83
85
  - **`tts.create({ …, stream: true })`** answers a `ReadableStream` of PCM;
84
86
  **`stt.create(audio, { stream: true })`** an async iterator of the
85
87
  transcript's events.
86
- - **A `delete` of something already gone answers `null`** (a voice's,
87
- `false`).
88
+ - **A `delete` of something already gone is done**: one thing's answers
89
+ `true`, or `false` when there was none; one that reports counts (an end
90
+ user's, a folder's) answers them, or `null` when there was none.
88
91
 
89
92
  ## Errors
90
93
 
91
- Everything thrown is a `PlatformError`: `status`, `type` (the API's —
92
- `validation_error`, `insufficient_credits`, …), `message`, `requestId`,
93
- `details` (a 422's fields) and `retryAfter` (seconds).
94
+ Everything thrown is a `PlatformError`: `status`, `code` (the API's —
95
+ `validation_failed`, `insufficient_credits`, … — or the SDK's own when
96
+ the API did not answer: `connection_error`, `timeout`, …), `message`,
97
+ `requestId`, `issues` (where a request failed validation) and
98
+ `retryAfter` (seconds).
94
99
 
95
100
  | Class | When |
96
101
  |---|---|
@@ -99,7 +104,7 @@ Everything thrown is a `PlatformError`: `status`, `type` (the API's —
99
104
  | `InsufficientCreditsError` | 402 |
100
105
  | `PermissionError` | 403 |
101
106
  | `NotFoundError` | 404 |
102
- | `ConflictError` | 409: a plan's maximum, or an id already taken |
107
+ | `ConflictError` | 409: a plan's maximum, an id already taken, or a change since it was read |
103
108
  | `RateLimitError` | 429 |
104
109
  | `ServerError` | 5xx |
105
110
  | `ConnectionError` | no response; `cause` is what `fetch` threw |
@@ -121,7 +126,7 @@ and a longer one is thrown at once as a `RateLimitError` with its
121
126
 
122
127
  ## End users and ephemeral keys
123
128
 
124
- - **A key is prepaid**: its `credit_limit` is set aside from your balance
129
+ - **A key is prepaid**: its `credit_limit_micros` is set aside from your balance
125
130
  when it is minted, and what it does not spend comes back when it settles.
126
131
  `create` clamps the lifetime to the platform's maximum (`clampTtl: false`
127
132
  sends your body as written); your plan's own caps for one person's key
@@ -132,4 +137,4 @@ and a longer one is thrown at once as a `RateLimitError` with its
132
137
  - **`endUsers.export(id)`** reads every conversation and fact about a
133
138
  person with a five-minute key of their own, revoked after — on failure
134
139
  too. The key is an ordinary one: at the person's live-key cap the export
135
- fails as the mint does. Facts are the first 100 for now.
140
+ fails as the mint does. Facts are the newest 100 for now.
package/dist/errors.d.ts CHANGED
@@ -4,43 +4,51 @@
4
4
  * caller acts on differently.
5
5
  *
6
6
  * The API answers its errors in one envelope —
7
- * `{"error":{"type","message","request_id","details"?}}`
8
- * (`apps/api/src/http/errors.ts`) — and `type` is the thing to switch on.
9
- * Two bodies are not that envelope, and are read here too:
10
- * - **the 400 the document declares** on every route with a body or a path
11
- * parameter, `{status_code, detail, extra}`;
12
- * - **Cloudflare's own refusal**, `error code: 1010` as plain text with no
13
- * `X-Request-Id`: the request never reached the API, so there is no id
14
- * to report.
7
+ * `{"error":{"code","message","request_id","issues"}}`
8
+ * (`apps/api/src/http/errors.ts`) — and `code` is the thing to switch on.
9
+ * One body is not that envelope, and is read here too: **Cloudflare's own
10
+ * refusal**, `error code: 1010` as plain text with no `X-Request-Id` — the
11
+ * request never reached the API, so there is no id to report.
15
12
  */
13
+ import type { ErrorCode, ValidationIssue } from "./gen/index.js";
14
+ export type { ErrorCode, ValidationIssue };
16
15
  /** What one error says, as the SDK read it. */
17
16
  export interface PlatformErrorInit {
18
17
  status: number;
19
- type: string;
18
+ code: PlatformErrorCode;
20
19
  message: string;
21
20
  requestId: string | null;
22
- details?: unknown;
21
+ issues?: ValidationIssue[];
23
22
  retryAfter?: number | null;
24
23
  cause?: unknown;
25
24
  }
25
+ /**
26
+ * The API's codes, and the SDK's own for an answer that was not the API's:
27
+ * `cloudflare_error`, `http_error` (an error body that was not the
28
+ * envelope), `invalid_response` (a success that was not JSON),
29
+ * `connection_error` and `timeout` — and `client_error`, no request at
30
+ * all: the app's own code (its `getToken`) threw, as `@lumavox/react`
31
+ * reports it.
32
+ */
33
+ export type PlatformErrorCode = ErrorCode | "cloudflare_error" | "http_error" | "invalid_response" | "connection_error" | "timeout" | "client_error";
26
34
  export declare class PlatformError extends Error {
27
35
  name: string;
28
36
  /** The HTTP status; `0` when no response came back. */
29
37
  readonly status: number;
30
- /** The API's machine-readable category: `validation_error`, `rate_limit_error`, … */
31
- readonly type: string;
38
+ /** What went wrong: the API's `code` — `validation_failed`, `rate_limited`, … */
39
+ readonly code: PlatformErrorCode;
32
40
  /**
33
41
  * The request's `X-Request-Id` — the one the SDK sent, which the API
34
42
  * keeps. `null` only when Cloudflare refused it before the API saw it.
35
43
  */
36
44
  readonly requestId: string | null;
37
- /** Field-level problems on a 422; the 400's `extra`; otherwise `undefined`. */
38
- readonly details: unknown;
45
+ /** Where a request failed validation; empty otherwise. */
46
+ readonly issues: ValidationIssue[];
39
47
  /** Seconds to wait before trying again, from `Retry-After`; `null` without one. */
40
48
  readonly retryAfter: number | null;
41
49
  constructor(init: PlatformErrorInit);
42
50
  }
43
- /** 400 or 422: the request is malformed or failed validation; `details` says where. */
51
+ /** 400 or 422: the request is malformed or failed validation; `issues` says where. */
44
52
  export declare class ValidationError extends PlatformError {
45
53
  name: string;
46
54
  }
@@ -60,7 +68,7 @@ export declare class PermissionError extends PlatformError {
60
68
  export declare class NotFoundError extends PlatformError {
61
69
  name: string;
62
70
  }
63
- /** 409: a plan's maximum, or an id already taken. */
71
+ /** 409: a plan's maximum, an id already taken, or a change since it was read. */
64
72
  export declare class ConflictError extends PlatformError {
65
73
  name: string;
66
74
  }
package/dist/errors.js CHANGED
@@ -1,18 +1,3 @@
1
- /**
2
- * Every failure the SDK throws: a `PlatformError`, so one `catch` with
3
- * `instanceof PlatformError` sees them all, and a subclass per status a
4
- * caller acts on differently.
5
- *
6
- * The API answers its errors in one envelope —
7
- * `{"error":{"type","message","request_id","details"?}}`
8
- * (`apps/api/src/http/errors.ts`) — and `type` is the thing to switch on.
9
- * Two bodies are not that envelope, and are read here too:
10
- * - **the 400 the document declares** on every route with a body or a path
11
- * parameter, `{status_code, detail, extra}`;
12
- * - **Cloudflare's own refusal**, `error code: 1010` as plain text with no
13
- * `X-Request-Id`: the request never reached the API, so there is no id
14
- * to report.
15
- */
16
1
  export class PlatformError extends Error {
17
2
  // Written out, not `new.target.name`: a customer's minifier renames classes.
18
3
  name = "PlatformError";
@@ -20,13 +5,13 @@ export class PlatformError extends Error {
20
5
  // `init` is the options too: `Error` reads only its `cause`.
21
6
  super(init.message, init);
22
7
  this.status = init.status;
23
- this.type = init.type;
8
+ this.code = init.code;
24
9
  this.requestId = init.requestId;
25
- this.details = init.details;
10
+ this.issues = init.issues ?? [];
26
11
  this.retryAfter = init.retryAfter ?? null;
27
12
  }
28
13
  }
29
- /** 400 or 422: the request is malformed or failed validation; `details` says where. */
14
+ /** 400 or 422: the request is malformed or failed validation; `issues` says where. */
30
15
  export class ValidationError extends PlatformError {
31
16
  name = "ValidationError";
32
17
  }
@@ -46,7 +31,7 @@ export class PermissionError extends PlatformError {
46
31
  export class NotFoundError extends PlatformError {
47
32
  name = "NotFoundError";
48
33
  }
49
- /** 409: a plan's maximum, or an id already taken. */
34
+ /** 409: a plan's maximum, an id already taken, or a change since it was read. */
50
35
  export class ConflictError extends PlatformError {
51
36
  name = "ConflictError";
52
37
  }
@@ -102,34 +87,29 @@ export function errorFromResponse(status, headers, text, sentRequestId) {
102
87
  body = undefined;
103
88
  }
104
89
  const e = isObject(body) && isObject(body.error) ? body.error : null;
105
- const code = /^error code: (\d+)/.exec(text.trim())?.[1];
90
+ const cloudflare = /^error code: (\d+)/.exec(text.trim())?.[1];
106
91
  const snippet = text.trim().slice(0, 200);
107
92
  const said = e
108
93
  ? {
109
- type: typeof e.type === "string" ? e.type : "unknown_error",
94
+ code: typeof e.code === "string"
95
+ ? e.code
96
+ : "http_error",
110
97
  message: typeof e.message === "string" ? e.message : http,
111
98
  requestId: typeof e.request_id === "string" ? e.request_id : requestId,
112
- details: e.details ?? undefined,
99
+ issues: Array.isArray(e.issues) ? e.issues : [],
113
100
  }
114
- : isObject(body) && typeof body.detail === "string"
101
+ : cloudflare && answered === null
115
102
  ? {
116
- type: "invalid_request",
117
- message: body.detail,
118
- requestId,
119
- details: body.extra ?? undefined,
103
+ code: "cloudflare_error",
104
+ message: `Cloudflare refused the request with error code ${cloudflare} ` +
105
+ "before it reached the API.",
106
+ requestId: null,
120
107
  }
121
- : code && answered === null
122
- ? {
123
- type: "cloudflare_error",
124
- message: `Cloudflare refused the request with error code ${code} ` +
125
- "before it reached the API.",
126
- requestId: null,
127
- }
128
- : {
129
- type: "http_error",
130
- message: snippet ? `${http}: ${snippet}` : http,
131
- requestId,
132
- };
108
+ : {
109
+ code: "http_error",
110
+ message: snippet ? `${http}: ${snippet}` : http,
111
+ requestId,
112
+ };
133
113
  return new (classOf(status))({
134
114
  ...said,
135
115
  status,
@@ -1 +1 @@
1
- export type { AgentCreateRequest, AgentInfo, AgentList, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSummary, AgentUpdate, AgentVoice, ApiKeySelf, AssetBulkRequest, AssetDeleted, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkKnowledgeData, BulkKnowledgeError, BulkKnowledgeErrors, BulkKnowledgeResponse, BulkKnowledgeResponses, ClientOptions, CompactData, CompactError, CompactErrors, CompactionInfo, CompactRequest, CompactResponse, CompactResponses, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, CreateFolderData, CreateFolderError, CreateFolderErrors, CreateFolderResponse, CreateFolderResponses, CreateImageData, CreateImageError, CreateImageErrors, CreateImageResponse, CreateImageResponses, CreateKnowledgeData, CreateKnowledgeError, CreateKnowledgeErrors, CreateKnowledgeFromFileData, CreateKnowledgeFromFileError, CreateKnowledgeFromFileErrors, CreateKnowledgeFromFileResponse, CreateKnowledgeFromFileResponses, CreateKnowledgeFromUrlData, CreateKnowledgeFromUrlError, CreateKnowledgeFromUrlErrors, CreateKnowledgeFromUrlResponse, CreateKnowledgeFromUrlResponses, CreateKnowledgeResponse, CreateKnowledgeResponses, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, CreateTranscriptionData, CreateTranscriptionError, CreateTranscriptionErrors, CreateTranscriptionResponse, CreateTranscriptionResponses, CreateVideoData, CreateVideoError, CreateVideoErrors, CreateVideoResponse, CreateVideoResponses, CreateVoiceData, CreateVoiceError, CreateVoiceErrors, CreateVoiceResponse, CreateVoiceResponses, DeleteAgentData, DeleteAgentError, DeleteAgentErrors, DeleteAgentResponse, DeleteAgentResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFolderData, DeleteFolderError, DeleteFolderErrors, DeleteFolderResponse, DeleteFolderResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserList, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralTokenSelf, ErrorInfo, ErrorResponse, ExtractData, ExtractError, ExtractErrors, ExtractResponse, ExtractResponses, FactInfo, FactList, FolderCreate, FolderDeleted, FolderDetail, FolderLevel, FolderSummary, FolderUpdate, ForgetFactData, ForgetFactError, ForgetFactErrors, ForgetFactResponse, ForgetFactResponses, ForgetUserFactsData, ForgetUserFactsError, ForgetUserFactsErrors, ForgetUserFactsResponse, ForgetUserFactsResponses, ForgottenFacts, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentError, GetAgentErrors, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetResponse, GetAssetResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserResponse, GetEndUserResponses, GetFolderData, GetFolderError, GetFolderErrors, GetFolderResponse, GetFolderResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeResponse, GetKnowledgeResponses, GetSessionDetailData, GetSessionDetailError, GetSessionDetailErrors, GetSessionDetailResponse, GetSessionDetailResponses, GetVoiceData, GetVoiceError, GetVoiceErrors, GetVoiceResponse, GetVoiceResponses, HealthData, HealthResponse, HealthResponse2, HealthResponses, ImageRequest, KnowledgeAssigned, KnowledgeAssignment, KnowledgeBulk, KnowledgeBulkResult, KnowledgeCategories, KnowledgeCitation, KnowledgeCreate, KnowledgeEntryUsage, KnowledgeFileCreate, KnowledgeInfo, KnowledgeInsights, KnowledgeInsightsData, KnowledgeInsightsError, KnowledgeInsightsErrors, KnowledgeInsightsResponse, KnowledgeInsightsResponses, KnowledgeList, KnowledgeLookupInfo, KnowledgeSearchHit, KnowledgeSearchList, KnowledgeSearchRequest, KnowledgeSearchResult, KnowledgeUpdate, KnowledgeUploadRequest, KnowledgeUploadTicket, KnowledgeUploadUrlData, KnowledgeUploadUrlError, KnowledgeUploadUrlErrors, KnowledgeUploadUrlResponse, KnowledgeUploadUrlResponses, KnowledgeUrlCreate, LimitsData, LimitsError, LimitsErrors, LimitsResponse, LimitsResponses, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, ListEphemeralKeysData, ListEphemeralKeysError, ListEphemeralKeysErrors, ListEphemeralKeysResponse, ListEphemeralKeysResponses, ListFactsData, ListFactsError, ListFactsErrors, ListFactsResponse, ListFactsResponses, ListFoldersData, ListFoldersError, ListFoldersErrors, ListFoldersResponse, ListFoldersResponses, ListGenerationsData, ListGenerationsError, ListGenerationsErrors, ListGenerationsResponse, ListGenerationsResponses, ListKnowledgeCategoriesData, ListKnowledgeCategoriesError, ListKnowledgeCategoriesErrors, ListKnowledgeCategoriesResponse, ListKnowledgeCategoriesResponses, ListKnowledgeData, ListKnowledgeError, ListKnowledgeErrors, ListKnowledgeResponse, ListKnowledgeResponses, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListStylesData, ListStylesError, ListStylesErrors, ListStylesResponse, ListStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MessageInfo, MessageKnowledge, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, OrgPlan, PlanData, PlanError, PlanErrors, PlanResponse, PlanResponses, ProviderVoiceSettings, PutAgentSettingsData, PutAgentSettingsError, PutAgentSettingsErrors, PutAgentSettingsResponse, PutAgentSettingsResponses, ReadAudioData, ReadAudioError, ReadAudioErrors, ReadAudioResponse, ReadAudioResponses, ReadGenerationData, ReadGenerationError, ReadGenerationErrors, ReadGenerationResponse, ReadGenerationResponses, ReadImageData, ReadImageError, ReadImageErrors, ReadImageResponse, ReadImageResponses, ReadSkyboxData, ReadSkyboxError, ReadSkyboxErrors, ReadSkyboxResponse, ReadSkyboxResponses, ReadTemplateData, ReadTemplateError, ReadTemplateErrors, ReadTemplateResponse, ReadTemplateResponses, ReadTranscriptionData, ReadTranscriptionError, ReadTranscriptionErrors, ReadTranscriptionResponse, ReadTranscriptionResponses, ReadVideoData, ReadVideoError, ReadVideoErrors, ReadVideoResponse, ReadVideoResponses, Reference, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationList, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, StreamDone, StreamError, StreamSegment, StreamTranscript, TemplateFileData, TemplateFileError, TemplateFileErrors, TemplateFileResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplateList, TokenSelfData, TokenSelfError, TokenSelfErrors, TokenSelfResponse, TokenSelfResponses, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponses, TranscriptWord, TtsData, TtsError, TtsErrors, TtsOptions, TtsRequest, TtsResponse, TtsResponses, UnansweredQuestion, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserResponse, UpdateEndUserResponses, UpdateFolderData, UpdateFolderError, UpdateFolderErrors, UpdateFolderResponse, UpdateFolderResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadConfirmData, UploadConfirmError, UploadConfirmErrors, UploadConfirmResponse, UploadConfirmResponses, UploadTicket, UploadTicketRequest, UploadUrlData, UploadUrlError, UploadUrlErrors, UploadUrlResponse, UploadUrlResponses, UsageByKey, UsageData, UsageDay, UsageError, UsageErrors, UsageResponse, UsageResponse2, UsageResponses, UsageSummary, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceSample, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket, VoiceUploadUrlData, VoiceUploadUrlError, VoiceUploadUrlErrors, VoiceUploadUrlResponse, VoiceUploadUrlResponses } from './types.gen.js';
1
+ export type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentUpdate, AgentVoice, AgentVoiceInfo, ApiKeySelf, AssetBulkRequest, AssetDetail, AssetMoveRequest, AssetPage, AssetsAffected, AssetSummary, AssetUpdate, AssignedAgent, AudioRequest, BulkEditKnowledgeData, BulkEditKnowledgeError, BulkEditKnowledgeErrors, BulkEditKnowledgeResponse, BulkEditKnowledgeResponses, ClientOptions, CompactionInfo, CompactRequest, CompactSessionData, CompactSessionError, CompactSessionErrors, CompactSessionResponse, CompactSessionResponses, ConfirmAssetUploadData, ConfirmAssetUploadError, ConfirmAssetUploadErrors, ConfirmAssetUploadResponse, ConfirmAssetUploadResponses, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentResponse, CreateAgentResponses, CreateAssetFolderData, CreateAssetFolderError, CreateAssetFolderErrors, CreateAssetFolderResponse, CreateAssetFolderResponses, CreateAssetUploadUrlData, CreateAssetUploadUrlError, CreateAssetUploadUrlErrors, CreateAssetUploadUrlResponse, CreateAssetUploadUrlResponses, CreateAudioData, CreateAudioError, CreateAudioErrors, CreateAudioResponse, CreateAudioResponses, CreateEndUserData, CreateEndUserError, CreateEndUserErrors, CreateEndUserResponse, CreateEndUserResponses, CreateEphemeralKeyData, CreateEphemeralKeyError, CreateEphemeralKeyErrors, CreateEphemeralKeyResponse, CreateEphemeralKeyResponses, 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, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSkyboxData, CreateSkyboxError, CreateSkyboxErrors, CreateSkyboxResponse, CreateSkyboxResponses, 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, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteVoiceData, DeleteVoiceError, DeleteVoiceErrors, DeleteVoiceResponse, DeleteVoiceResponses, DesignVoiceData, DesignVoiceError, DesignVoiceErrors, DesignVoiceResponse, DesignVoiceResponses, EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EphemeralKeyInfo, EphemeralKeyLimits, EphemeralKeyPage, EphemeralTokenSelf, ErrorCode, ErrorInfo, ErrorResponse, ExtractSessionFactsData, ExtractSessionFactsError, ExtractSessionFactsErrors, ExtractSessionFactsResponse, ExtractSessionFactsResponses, FactInfo, FactPage, FactsDeleted, FolderCreate, FolderDeleted, FolderDetail, FolderPage, FolderSummary, FolderUpdate, GenerateFromTemplateData, GenerateFromTemplateError, GenerateFromTemplateErrors, GenerateFromTemplateResponse, GenerateFromTemplateResponses, GenerationAudio, GenerationImage, GenerationInfo, GenerationPage, GenerationSkybox, GenerationTranscript, GenerationVideo, GetAgentData, GetAgentError, GetAgentErrors, GetAgentResponse, GetAgentResponses, GetAgentSettingsData, GetAgentSettingsError, GetAgentSettingsErrors, GetAgentSettingsResponse, GetAgentSettingsResponses, GetAssetData, GetAssetError, GetAssetErrors, GetAssetFolderData, GetAssetFolderError, GetAssetFolderErrors, GetAssetFolderResponse, GetAssetFolderResponses, GetAssetResponse, GetAssetResponses, GetAudioData, GetAudioError, GetAudioErrors, GetAudioResponse, GetAudioResponses, GetEndUserData, GetEndUserError, GetEndUserErrors, GetEndUserResponse, GetEndUserResponses, GetEphemeralKeyLimitsData, GetEphemeralKeyLimitsError, GetEphemeralKeyLimitsErrors, GetEphemeralKeyLimitsResponse, GetEphemeralKeyLimitsResponses, GetGenerationData, GetGenerationError, GetGenerationErrors, GetGenerationResponse, GetGenerationResponses, GetHealthData, GetHealthResponse, GetHealthResponses, GetImageData, GetImageError, GetImageErrors, GetImageResponse, GetImageResponses, GetKnowledgeData, GetKnowledgeError, GetKnowledgeErrors, GetKnowledgeInsightsData, GetKnowledgeInsightsError, GetKnowledgeInsightsErrors, GetKnowledgeInsightsResponse, GetKnowledgeInsightsResponses, GetKnowledgeResponse, GetKnowledgeResponses, GetPlanData, GetPlanError, GetPlanErrors, GetPlanResponse, GetPlanResponses, GetSessionData, GetSessionError, GetSessionErrors, GetSessionResponse, GetSessionResponses, GetSkyboxData, GetSkyboxError, GetSkyboxErrors, GetSkyboxResponse, GetSkyboxResponses, GetTemplateData, GetTemplateError, GetTemplateErrors, GetTemplateFileData, GetTemplateFileError, GetTemplateFileErrors, GetTemplateFileResponses, GetTemplateResponse, GetTemplateResponses, GetTokenData, GetTokenError, GetTokenErrors, GetTokenResponse, GetTokenResponses, 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, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUsersData, ListEndUsersError, ListEndUsersErrors, ListEndUsersResponse, ListEndUsersResponses, 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, ListRelationsData, ListRelationsError, ListRelationsErrors, ListRelationsResponse, ListRelationsResponses, ListSessionsData, ListSessionsError, ListSessionsErrors, ListSessionsResponse, ListSessionsResponses, ListSkyboxStylesData, ListSkyboxStylesError, ListSkyboxStylesErrors, ListSkyboxStylesResponse, ListSkyboxStylesResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MessageInfo, MessageKnowledge, MessagePage, MoveAssetsData, MoveAssetsError, MoveAssetsErrors, MoveAssetsResponse, MoveAssetsResponses, OrgPlan, ProviderVoiceSettings, ProviderVoiceSettingsInfo, Reference, RefreshKnowledgeData, RefreshKnowledgeError, RefreshKnowledgeErrors, RefreshKnowledgeResponse, RefreshKnowledgeResponses, ReindexKnowledgeData, ReindexKnowledgeError, ReindexKnowledgeErrors, ReindexKnowledgeResponse, ReindexKnowledgeResponses, RelationInfo, RelationPage, ResampleVoiceData, ResampleVoiceError, ResampleVoiceErrors, ResampleVoiceResponse, ResampleVoiceResponses, RevokeEphemeralKeyData, RevokeEphemeralKeyError, RevokeEphemeralKeyErrors, RevokeEphemeralKeyResponse, RevokeEphemeralKeyResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TokenSelf, TranscribeAssetRequest, TranscribeData, TranscribeError, TranscribeErrors, TranscribeResponse, TranscribeResponses, Transcription, TranscriptionStreamLine, TranscriptWord, TtsOptions, TtsRequest, UnansweredQuestion, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentResponse, UpdateAgentResponses, UpdateAgentSettingsData, UpdateAgentSettingsError, UpdateAgentSettingsErrors, UpdateAgentSettingsResponse, UpdateAgentSettingsResponses, UpdateAssetData, UpdateAssetError, UpdateAssetErrors, UpdateAssetFolderData, UpdateAssetFolderError, UpdateAssetFolderErrors, UpdateAssetFolderResponse, UpdateAssetFolderResponses, UpdateAssetResponse, UpdateAssetResponses, UpdateEndUserData, UpdateEndUserError, UpdateEndUserErrors, UpdateEndUserResponse, UpdateEndUserResponses, UpdateKnowledgeData, UpdateKnowledgeError, UpdateKnowledgeErrors, UpdateKnowledgeResponse, UpdateKnowledgeResponses, UpdateVoiceData, UpdateVoiceError, UpdateVoiceErrors, UpdateVoiceResponse, UpdateVoiceResponses, UploadConfirm, UploadTicket, UploadTicketRequest, UsageByKey, UsageDay, UsageResponse, UsageSummary, ValidationIssue, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket } from './types.gen.js';