@lumavox/server 0.10.0 → 0.13.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 +3 -2
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/types.gen.d.ts +362 -5
- package/dist/resources/end-users.d.ts +26 -2
- package/dist/resources/end-users.js +19 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ list's page.
|
|
|
60
60
|
|
|
61
61
|
| Resource | Methods |
|
|
62
62
|
|---|---|
|
|
63
|
-
| `endUsers` | `create`, `get`, `update`, `delete`, `list`, `page`, `export` |
|
|
63
|
+
| `endUsers` | `create`, `get`, `update`, `delete`, `list`, `page`, `export`; `facts.list`, `facts.add`, `facts.update`, `facts.delete` |
|
|
64
64
|
| `ephemeralKeys` | `limits`, `create`, `revoke`, `inspect`, `list`, `page` |
|
|
65
65
|
| `images`, `videos`, `audio`, `skybox`, `transcriptions` | `create`, `get`, `wait`, `generate`; `skybox.styles` |
|
|
66
66
|
| `generations` | `get`, `wait`, `list`, `page` |
|
|
@@ -138,6 +138,7 @@ and a longer one is thrown at once as a `RateLimitError` with its
|
|
|
138
138
|
deadline. **`inspect` shows a key's spend turn by turn**, as the key
|
|
139
139
|
itself reads it.
|
|
140
140
|
- **`endUsers.export(id)`** reads every conversation and fact about a
|
|
141
|
-
person
|
|
141
|
+
person — replaced facts too, until they are deleted — with a
|
|
142
|
+
five-minute key of their own, revoked after — on failure
|
|
142
143
|
too. The key is an ordinary one: at the person's live-key cap the export
|
|
143
144
|
fails as the mint does.
|
package/dist/gen/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, 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, 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, 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, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, 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, 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, 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, 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, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, 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, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MessageInfo, MessageKnowledge, MessagePage, MessageSource, MessageToolCall, 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, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, 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, UpdateToolData, UpdateToolError, UpdateToolErrors, UpdateToolResponse, UpdateToolResponses, 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';
|
|
1
|
+
export type { AgentCreateRequest, AgentInfo, AgentKnowledgeUpdate, AgentPage, AgentSettingsInfo, AgentSettingsUpdate, AgentStt, AgentSttInfo, AgentSummary, AgentToolsUpdate, 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, CreateEndUserFactData, CreateEndUserFactError, CreateEndUserFactErrors, CreateEndUserFactResponse, CreateEndUserFactResponses, 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, 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, DeleteAllFactsData, DeleteAllFactsError, DeleteAllFactsErrors, DeleteAllFactsResponse, DeleteAllFactsResponses, DeleteAssetData, DeleteAssetError, DeleteAssetErrors, DeleteAssetFolderData, DeleteAssetFolderError, DeleteAssetFolderErrors, DeleteAssetFolderResponse, DeleteAssetFolderResponses, DeleteAssetResponse, DeleteAssetResponses, DeleteAssetsData, DeleteAssetsError, DeleteAssetsErrors, DeleteAssetsResponse, DeleteAssetsResponses, DeleteEndUserData, DeleteEndUserError, DeleteEndUserErrors, DeleteEndUserFactData, DeleteEndUserFactError, DeleteEndUserFactErrors, DeleteEndUserFactResponse, DeleteEndUserFactResponses, DeleteEndUserResponse, DeleteEndUserResponses, DeleteFactData, DeleteFactError, DeleteFactErrors, DeleteFactResponse, DeleteFactResponses, DeleteKnowledgeData, DeleteKnowledgeError, DeleteKnowledgeErrors, DeleteKnowledgeResponse, DeleteKnowledgeResponses, DeleteSessionData, DeleteSessionError, DeleteSessionErrors, DeleteSessionResponse, DeleteSessionResponses, DeleteToolData, DeleteToolError, DeleteToolErrors, DeleteToolResponse, DeleteToolResponses, 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, FactCreateRequest, FactInfo, FactPage, FactsDeleted, FactUpdateRequest, 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, 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, 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, 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, ListAgentKnowledgeData, ListAgentKnowledgeError, ListAgentKnowledgeErrors, ListAgentKnowledgeResponse, ListAgentKnowledgeResponses, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListAgentToolsData, ListAgentToolsError, ListAgentToolsErrors, ListAgentToolsResponse, ListAgentToolsResponses, ListAssetFoldersData, ListAssetFoldersError, ListAssetFoldersErrors, ListAssetFoldersResponse, ListAssetFoldersResponses, ListAssetsData, ListAssetsError, ListAssetsErrors, ListAssetsResponse, ListAssetsResponses, ListEndUserFactsData, ListEndUserFactsError, ListEndUserFactsErrors, ListEndUserFactsResponse, ListEndUserFactsResponses, 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, ListToolCallsData, ListToolCallsError, ListToolCallsErrors, ListToolCallsResponse, ListToolCallsResponses, ListToolsData, ListToolsError, ListToolsErrors, ListToolsResponse, ListToolsResponses, ListVoicesData, ListVoicesError, ListVoicesErrors, ListVoicesResponse, ListVoicesResponses, MessageInfo, MessageKnowledge, MessagePage, MessageSource, MessageToolCall, 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, RotateToolSecretData, RotateToolSecretError, RotateToolSecretErrors, RotateToolSecretResponse, RotateToolSecretResponses, SaveDesignedVoiceData, SaveDesignedVoiceError, SaveDesignedVoiceErrors, SaveDesignedVoiceResponse, SaveDesignedVoiceResponses, SearchKnowledgeData, SearchKnowledgeError, SearchKnowledgeErrors, SearchKnowledgeResponse, SearchKnowledgeResponses, SessionCreateRequest, SessionDetail, SessionInfo, SessionPage, SetAgentKnowledgeData, SetAgentKnowledgeError, SetAgentKnowledgeErrors, SetAgentKnowledgeResponse, SetAgentKnowledgeResponses, SetAgentToolsData, SetAgentToolsError, SetAgentToolsErrors, SetAgentToolsResponse, SetAgentToolsResponses, SetKnowledgeAgentsData, SetKnowledgeAgentsError, SetKnowledgeAgentsErrors, SetKnowledgeAgentsResponse, SetKnowledgeAgentsResponses, SkyboxFile, SkyboxRequest, SkyboxStyle, SkyboxStylePage, SpeechProvider, StreamDone, StreamError, StreamSegment, StreamTranscript, SynthesizeSpeechData, SynthesizeSpeechError, SynthesizeSpeechErrors, SynthesizeSpeechResponse, SynthesizeSpeechResponses, TemplateGenerateRequest, TemplateInfo, TemplateInput, TemplatePage, TestToolData, TestToolError, TestToolErrors, TestToolResponse, TestToolResponses, TokenSelf, ToolCall, ToolCallPage, ToolCreate, ToolInfo, ToolPage, ToolsAssigned, ToolTestRequest, ToolTestResult, ToolUpdate, ToolWithSecret, 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, UpdateEndUserFactData, UpdateEndUserFactError, UpdateEndUserFactErrors, UpdateEndUserFactResponse, UpdateEndUserFactResponses, 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, VariantInfo, VideoRequest, VoiceDesignPreview, VoiceDesignRequest, VoiceDesignResult, VoiceDesignSaveRequest, VoiceDetail, VoiceInfo, VoiceInfoPage, VoiceKind, VoiceSample, VoiceSource, VoiceStatus, VoiceUpdate, VoiceUpload, VoiceUploadRequest, VoiceUploadTicket } from './types.gen.js';
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -1348,14 +1348,50 @@ export type FactInfo = {
|
|
|
1348
1348
|
* Which agent was being talked to when this was learned.
|
|
1349
1349
|
*/
|
|
1350
1350
|
agent_id: string | null;
|
|
1351
|
+
/**
|
|
1352
|
+
* When a conversation last said it again; `null` for never. The agents see the most recently confirmed first when not every fact fits.
|
|
1353
|
+
*/
|
|
1354
|
+
confirmed_at: string | null;
|
|
1351
1355
|
created_at: string;
|
|
1352
1356
|
id: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* When a later conversation replaced or removed it; `null` while it stands. Listed only with `include_replaced=true`.
|
|
1359
|
+
*/
|
|
1360
|
+
replaced_at: string | null;
|
|
1361
|
+
/**
|
|
1362
|
+
* The fact that replaced it — moved city, changed job — or `null` when it was removed with nothing in its place, or stands.
|
|
1363
|
+
*/
|
|
1364
|
+
replaced_by: string | null;
|
|
1365
|
+
/**
|
|
1366
|
+
* `person`: recalled by every agent of yours that shares its facts. `agent`: kept to one agent (`agent_id`), which alone recalls it — learnt by an agent whose `facts_scope` is `agent`, or added for that agent.
|
|
1367
|
+
*/
|
|
1368
|
+
scope: 'person' | 'agent';
|
|
1369
|
+
/**
|
|
1370
|
+
* `conversation`: a reading learnt it. `customer`: you added or corrected it — a later conversation never replaces or removes it.
|
|
1371
|
+
*/
|
|
1372
|
+
source: 'conversation' | 'customer';
|
|
1353
1373
|
text: string;
|
|
1354
1374
|
/**
|
|
1355
|
-
*
|
|
1375
|
+
* When it last changed: its `replaced_at` once replaced, else when you last corrected it, else its `created_at`.
|
|
1356
1376
|
*/
|
|
1357
1377
|
updated_at: string;
|
|
1358
1378
|
};
|
|
1379
|
+
export type FactCreateRequest = {
|
|
1380
|
+
/**
|
|
1381
|
+
* What to remember about the person, as one plain statement: "Prefers to be called Sam." At most 500 characters. Never a secret — a password, a code, a card, account or identity number, or a key is refused, since facts are sent to the model on every turn.
|
|
1382
|
+
*/
|
|
1383
|
+
text: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* Keep it to one agent: only that agent recalls it. Unset or `null`: every agent of yours that shares its facts — and the ones that keep their own, too.
|
|
1386
|
+
*/
|
|
1387
|
+
agent_id?: string | null;
|
|
1388
|
+
};
|
|
1389
|
+
export type FactUpdateRequest = {
|
|
1390
|
+
/**
|
|
1391
|
+
* What to remember about the person, as one plain statement: "Prefers to be called Sam." At most 500 characters. Never a secret — a password, a code, a card, account or identity number, or a key is refused, since facts are sent to the model on every turn.
|
|
1392
|
+
*/
|
|
1393
|
+
text: string;
|
|
1394
|
+
};
|
|
1359
1395
|
export type FactsDeleted = {
|
|
1360
1396
|
/**
|
|
1361
1397
|
* How many stored facts were deleted.
|
|
@@ -1427,6 +1463,18 @@ export type AgentSummary = {
|
|
|
1427
1463
|
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
1428
1464
|
*/
|
|
1429
1465
|
fact_instruction: string | null;
|
|
1466
|
+
/**
|
|
1467
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
1468
|
+
*
|
|
1469
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
1470
|
+
*/
|
|
1471
|
+
facts_enabled: boolean;
|
|
1472
|
+
/**
|
|
1473
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
1474
|
+
*
|
|
1475
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
1476
|
+
*/
|
|
1477
|
+
facts_scope: 'person' | 'agent' | null;
|
|
1430
1478
|
/**
|
|
1431
1479
|
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
1432
1480
|
*
|
|
@@ -1474,7 +1522,7 @@ export type AgentSummary = {
|
|
|
1474
1522
|
*/
|
|
1475
1523
|
knowledge_mode: 'auto' | 'prompt' | 'lookup' | null;
|
|
1476
1524
|
/**
|
|
1477
|
-
*
|
|
1525
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in about 6,000 characters (some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
1478
1526
|
*/
|
|
1479
1527
|
max_facts: number | null;
|
|
1480
1528
|
/**
|
|
@@ -1670,6 +1718,18 @@ export type AgentInfo = {
|
|
|
1670
1718
|
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
1671
1719
|
*/
|
|
1672
1720
|
fact_instruction: string | null;
|
|
1721
|
+
/**
|
|
1722
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
1723
|
+
*
|
|
1724
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
1725
|
+
*/
|
|
1726
|
+
facts_enabled: boolean;
|
|
1727
|
+
/**
|
|
1728
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
1729
|
+
*
|
|
1730
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
1731
|
+
*/
|
|
1732
|
+
facts_scope: 'person' | 'agent' | null;
|
|
1673
1733
|
/**
|
|
1674
1734
|
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
1675
1735
|
*
|
|
@@ -1717,7 +1777,7 @@ export type AgentInfo = {
|
|
|
1717
1777
|
*/
|
|
1718
1778
|
knowledge_mode: 'auto' | 'prompt' | 'lookup' | null;
|
|
1719
1779
|
/**
|
|
1720
|
-
*
|
|
1780
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in about 6,000 characters (some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
1721
1781
|
*/
|
|
1722
1782
|
max_facts: number | null;
|
|
1723
1783
|
/**
|
|
@@ -1855,6 +1915,18 @@ export type AgentCreateRequest = {
|
|
|
1855
1915
|
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
1856
1916
|
*/
|
|
1857
1917
|
fact_instruction?: string | null;
|
|
1918
|
+
/**
|
|
1919
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
1920
|
+
*
|
|
1921
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
1922
|
+
*/
|
|
1923
|
+
facts_enabled?: boolean | null;
|
|
1924
|
+
/**
|
|
1925
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
1926
|
+
*
|
|
1927
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
1928
|
+
*/
|
|
1929
|
+
facts_scope?: 'person' | 'agent' | null;
|
|
1858
1930
|
/**
|
|
1859
1931
|
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
1860
1932
|
*
|
|
@@ -1902,7 +1974,7 @@ export type AgentCreateRequest = {
|
|
|
1902
1974
|
*/
|
|
1903
1975
|
knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
|
|
1904
1976
|
/**
|
|
1905
|
-
*
|
|
1977
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in about 6,000 characters (some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
1906
1978
|
*/
|
|
1907
1979
|
max_facts?: number | null;
|
|
1908
1980
|
/**
|
|
@@ -2179,6 +2251,18 @@ export type AgentUpdate = {
|
|
|
2179
2251
|
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
2180
2252
|
*/
|
|
2181
2253
|
fact_instruction?: string | null;
|
|
2254
|
+
/**
|
|
2255
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
2256
|
+
*
|
|
2257
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and a compaction extracts nothing whatever it is asked. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
2258
|
+
*/
|
|
2259
|
+
facts_enabled?: boolean | null;
|
|
2260
|
+
/**
|
|
2261
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
2262
|
+
*
|
|
2263
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
2264
|
+
*/
|
|
2265
|
+
facts_scope?: 'person' | 'agent' | null;
|
|
2182
2266
|
/**
|
|
2183
2267
|
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
2184
2268
|
*
|
|
@@ -2226,7 +2310,7 @@ export type AgentUpdate = {
|
|
|
2226
2310
|
*/
|
|
2227
2311
|
knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
|
|
2228
2312
|
/**
|
|
2229
|
-
*
|
|
2313
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in about 6,000 characters (some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
2230
2314
|
*/
|
|
2231
2315
|
max_facts?: number | null;
|
|
2232
2316
|
/**
|
|
@@ -5156,6 +5240,10 @@ export type ListFactsData = {
|
|
|
5156
5240
|
* Optional, and only ever the key's own end user — their `eu_...` id or your own id for them. Anybody else is a 403.
|
|
5157
5241
|
*/
|
|
5158
5242
|
end_user_id?: string;
|
|
5243
|
+
/**
|
|
5244
|
+
* Also list the facts a later conversation replaced or removed, until they are deleted 30 days later.
|
|
5245
|
+
*/
|
|
5246
|
+
include_replaced?: boolean;
|
|
5159
5247
|
/**
|
|
5160
5248
|
* How many to answer, 1 to 200.
|
|
5161
5249
|
*/
|
|
@@ -5193,6 +5281,46 @@ export type ListFactsResponses = {
|
|
|
5193
5281
|
200: FactPage;
|
|
5194
5282
|
};
|
|
5195
5283
|
export type ListFactsResponse = ListFactsResponses[keyof ListFactsResponses];
|
|
5284
|
+
export type CreateFactData = {
|
|
5285
|
+
body: FactCreateRequest;
|
|
5286
|
+
path?: never;
|
|
5287
|
+
query?: never;
|
|
5288
|
+
url: '/v1/agent/facts';
|
|
5289
|
+
};
|
|
5290
|
+
export type CreateFactErrors = {
|
|
5291
|
+
/**
|
|
5292
|
+
* The request could not be read: malformed JSON
|
|
5293
|
+
*/
|
|
5294
|
+
400: ErrorResponse;
|
|
5295
|
+
/**
|
|
5296
|
+
* Missing or invalid credentials
|
|
5297
|
+
*/
|
|
5298
|
+
401: ErrorResponse;
|
|
5299
|
+
/**
|
|
5300
|
+
* The key's scopes do not cover this, or it is pinned to agents and `agent_id` names another
|
|
5301
|
+
*/
|
|
5302
|
+
403: ErrorResponse;
|
|
5303
|
+
/**
|
|
5304
|
+
* No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
|
|
5305
|
+
*/
|
|
5306
|
+
422: ErrorResponse;
|
|
5307
|
+
/**
|
|
5308
|
+
* Rate limit exceeded
|
|
5309
|
+
*/
|
|
5310
|
+
429: ErrorResponse;
|
|
5311
|
+
};
|
|
5312
|
+
export type CreateFactError = CreateFactErrors[keyof CreateFactErrors];
|
|
5313
|
+
export type CreateFactResponses = {
|
|
5314
|
+
/**
|
|
5315
|
+
* The fact that already said it, now yours
|
|
5316
|
+
*/
|
|
5317
|
+
200: FactInfo;
|
|
5318
|
+
/**
|
|
5319
|
+
* The fact, remembered
|
|
5320
|
+
*/
|
|
5321
|
+
201: FactInfo;
|
|
5322
|
+
};
|
|
5323
|
+
export type CreateFactResponse = CreateFactResponses[keyof CreateFactResponses];
|
|
5196
5324
|
export type DeleteFactData = {
|
|
5197
5325
|
body?: never;
|
|
5198
5326
|
path: {
|
|
@@ -5231,6 +5359,52 @@ export type DeleteFactResponses = {
|
|
|
5231
5359
|
204: void;
|
|
5232
5360
|
};
|
|
5233
5361
|
export type DeleteFactResponse = DeleteFactResponses[keyof DeleteFactResponses];
|
|
5362
|
+
export type UpdateFactData = {
|
|
5363
|
+
body: FactUpdateRequest;
|
|
5364
|
+
path: {
|
|
5365
|
+
fact_id: string;
|
|
5366
|
+
};
|
|
5367
|
+
query?: never;
|
|
5368
|
+
url: '/v1/agent/facts/{fact_id}';
|
|
5369
|
+
};
|
|
5370
|
+
export type UpdateFactErrors = {
|
|
5371
|
+
/**
|
|
5372
|
+
* The request could not be read: malformed JSON
|
|
5373
|
+
*/
|
|
5374
|
+
400: ErrorResponse;
|
|
5375
|
+
/**
|
|
5376
|
+
* Missing or invalid credentials
|
|
5377
|
+
*/
|
|
5378
|
+
401: ErrorResponse;
|
|
5379
|
+
/**
|
|
5380
|
+
* The key is valid but its scopes do not cover this capability
|
|
5381
|
+
*/
|
|
5382
|
+
403: ErrorResponse;
|
|
5383
|
+
/**
|
|
5384
|
+
* Unknown fact id
|
|
5385
|
+
*/
|
|
5386
|
+
404: ErrorResponse;
|
|
5387
|
+
/**
|
|
5388
|
+
* Replaced by a later conversation, or another fact already says that
|
|
5389
|
+
*/
|
|
5390
|
+
409: ErrorResponse;
|
|
5391
|
+
/**
|
|
5392
|
+
* No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
|
|
5393
|
+
*/
|
|
5394
|
+
422: ErrorResponse;
|
|
5395
|
+
/**
|
|
5396
|
+
* Rate limit exceeded
|
|
5397
|
+
*/
|
|
5398
|
+
429: ErrorResponse;
|
|
5399
|
+
};
|
|
5400
|
+
export type UpdateFactError = UpdateFactErrors[keyof UpdateFactErrors];
|
|
5401
|
+
export type UpdateFactResponses = {
|
|
5402
|
+
/**
|
|
5403
|
+
* The fact, corrected
|
|
5404
|
+
*/
|
|
5405
|
+
200: FactInfo;
|
|
5406
|
+
};
|
|
5407
|
+
export type UpdateFactResponse = UpdateFactResponses[keyof UpdateFactResponses];
|
|
5234
5408
|
export type ListRelationsData = {
|
|
5235
5409
|
body?: never;
|
|
5236
5410
|
path?: never;
|
|
@@ -5757,6 +5931,189 @@ export type UpdateEndUserResponses = {
|
|
|
5757
5931
|
200: EndUserInfo;
|
|
5758
5932
|
};
|
|
5759
5933
|
export type UpdateEndUserResponse = UpdateEndUserResponses[keyof UpdateEndUserResponses];
|
|
5934
|
+
export type ListEndUserFactsData = {
|
|
5935
|
+
body?: never;
|
|
5936
|
+
path: {
|
|
5937
|
+
end_user_id: string;
|
|
5938
|
+
};
|
|
5939
|
+
query?: {
|
|
5940
|
+
/**
|
|
5941
|
+
* Also list the facts a later conversation replaced or removed, until they are deleted 30 days later.
|
|
5942
|
+
*/
|
|
5943
|
+
include_replaced?: boolean;
|
|
5944
|
+
/**
|
|
5945
|
+
* How many to answer, 1 to 200.
|
|
5946
|
+
*/
|
|
5947
|
+
limit?: number;
|
|
5948
|
+
/**
|
|
5949
|
+
* The `next_cursor` of the page before.
|
|
5950
|
+
*/
|
|
5951
|
+
cursor?: string;
|
|
5952
|
+
};
|
|
5953
|
+
url: '/v1/end-users/{end_user_id}/facts';
|
|
5954
|
+
};
|
|
5955
|
+
export type ListEndUserFactsErrors = {
|
|
5956
|
+
/**
|
|
5957
|
+
* Missing or invalid credentials
|
|
5958
|
+
*/
|
|
5959
|
+
401: ErrorResponse;
|
|
5960
|
+
/**
|
|
5961
|
+
* 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
|
|
5962
|
+
*/
|
|
5963
|
+
403: ErrorResponse;
|
|
5964
|
+
/**
|
|
5965
|
+
* Unknown end user id
|
|
5966
|
+
*/
|
|
5967
|
+
404: ErrorResponse;
|
|
5968
|
+
/**
|
|
5969
|
+
* The request failed validation
|
|
5970
|
+
*/
|
|
5971
|
+
422: ErrorResponse;
|
|
5972
|
+
/**
|
|
5973
|
+
* Rate limit exceeded
|
|
5974
|
+
*/
|
|
5975
|
+
429: ErrorResponse;
|
|
5976
|
+
};
|
|
5977
|
+
export type ListEndUserFactsError = ListEndUserFactsErrors[keyof ListEndUserFactsErrors];
|
|
5978
|
+
export type ListEndUserFactsResponses = {
|
|
5979
|
+
/**
|
|
5980
|
+
* One page of what is remembered, oldest first
|
|
5981
|
+
*/
|
|
5982
|
+
200: FactPage;
|
|
5983
|
+
};
|
|
5984
|
+
export type ListEndUserFactsResponse = ListEndUserFactsResponses[keyof ListEndUserFactsResponses];
|
|
5985
|
+
export type CreateEndUserFactData = {
|
|
5986
|
+
body: FactCreateRequest;
|
|
5987
|
+
path: {
|
|
5988
|
+
end_user_id: string;
|
|
5989
|
+
};
|
|
5990
|
+
query?: never;
|
|
5991
|
+
url: '/v1/end-users/{end_user_id}/facts';
|
|
5992
|
+
};
|
|
5993
|
+
export type CreateEndUserFactErrors = {
|
|
5994
|
+
/**
|
|
5995
|
+
* The request could not be read: malformed JSON
|
|
5996
|
+
*/
|
|
5997
|
+
400: ErrorResponse;
|
|
5998
|
+
/**
|
|
5999
|
+
* Missing or invalid credentials
|
|
6000
|
+
*/
|
|
6001
|
+
401: ErrorResponse;
|
|
6002
|
+
/**
|
|
6003
|
+
* 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
|
|
6004
|
+
*/
|
|
6005
|
+
403: ErrorResponse;
|
|
6006
|
+
/**
|
|
6007
|
+
* Unknown end user id
|
|
6008
|
+
*/
|
|
6009
|
+
404: ErrorResponse;
|
|
6010
|
+
/**
|
|
6011
|
+
* No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
|
|
6012
|
+
*/
|
|
6013
|
+
422: ErrorResponse;
|
|
6014
|
+
/**
|
|
6015
|
+
* Rate limit exceeded
|
|
6016
|
+
*/
|
|
6017
|
+
429: ErrorResponse;
|
|
6018
|
+
};
|
|
6019
|
+
export type CreateEndUserFactError = CreateEndUserFactErrors[keyof CreateEndUserFactErrors];
|
|
6020
|
+
export type CreateEndUserFactResponses = {
|
|
6021
|
+
/**
|
|
6022
|
+
* The fact that already said it, now yours
|
|
6023
|
+
*/
|
|
6024
|
+
200: FactInfo;
|
|
6025
|
+
/**
|
|
6026
|
+
* The fact, remembered
|
|
6027
|
+
*/
|
|
6028
|
+
201: FactInfo;
|
|
6029
|
+
};
|
|
6030
|
+
export type CreateEndUserFactResponse = CreateEndUserFactResponses[keyof CreateEndUserFactResponses];
|
|
6031
|
+
export type DeleteEndUserFactData = {
|
|
6032
|
+
body?: never;
|
|
6033
|
+
path: {
|
|
6034
|
+
end_user_id: string;
|
|
6035
|
+
fact_id: string;
|
|
6036
|
+
};
|
|
6037
|
+
query?: never;
|
|
6038
|
+
url: '/v1/end-users/{end_user_id}/facts/{fact_id}';
|
|
6039
|
+
};
|
|
6040
|
+
export type DeleteEndUserFactErrors = {
|
|
6041
|
+
/**
|
|
6042
|
+
* Missing or invalid credentials
|
|
6043
|
+
*/
|
|
6044
|
+
401: ErrorResponse;
|
|
6045
|
+
/**
|
|
6046
|
+
* 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
|
|
6047
|
+
*/
|
|
6048
|
+
403: ErrorResponse;
|
|
6049
|
+
/**
|
|
6050
|
+
* Unknown end user id, or Unknown fact id
|
|
6051
|
+
*/
|
|
6052
|
+
404: ErrorResponse;
|
|
6053
|
+
/**
|
|
6054
|
+
* The request failed validation
|
|
6055
|
+
*/
|
|
6056
|
+
422: ErrorResponse;
|
|
6057
|
+
/**
|
|
6058
|
+
* Rate limit exceeded
|
|
6059
|
+
*/
|
|
6060
|
+
429: ErrorResponse;
|
|
6061
|
+
};
|
|
6062
|
+
export type DeleteEndUserFactError = DeleteEndUserFactErrors[keyof DeleteEndUserFactErrors];
|
|
6063
|
+
export type DeleteEndUserFactResponses = {
|
|
6064
|
+
/**
|
|
6065
|
+
* The fact is gone
|
|
6066
|
+
*/
|
|
6067
|
+
204: void;
|
|
6068
|
+
};
|
|
6069
|
+
export type DeleteEndUserFactResponse = DeleteEndUserFactResponses[keyof DeleteEndUserFactResponses];
|
|
6070
|
+
export type UpdateEndUserFactData = {
|
|
6071
|
+
body: FactUpdateRequest;
|
|
6072
|
+
path: {
|
|
6073
|
+
end_user_id: string;
|
|
6074
|
+
fact_id: string;
|
|
6075
|
+
};
|
|
6076
|
+
query?: never;
|
|
6077
|
+
url: '/v1/end-users/{end_user_id}/facts/{fact_id}';
|
|
6078
|
+
};
|
|
6079
|
+
export type UpdateEndUserFactErrors = {
|
|
6080
|
+
/**
|
|
6081
|
+
* The request could not be read: malformed JSON
|
|
6082
|
+
*/
|
|
6083
|
+
400: ErrorResponse;
|
|
6084
|
+
/**
|
|
6085
|
+
* Missing or invalid credentials
|
|
6086
|
+
*/
|
|
6087
|
+
401: ErrorResponse;
|
|
6088
|
+
/**
|
|
6089
|
+
* 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
|
|
6090
|
+
*/
|
|
6091
|
+
403: ErrorResponse;
|
|
6092
|
+
/**
|
|
6093
|
+
* Unknown end user id, or Unknown fact id
|
|
6094
|
+
*/
|
|
6095
|
+
404: ErrorResponse;
|
|
6096
|
+
/**
|
|
6097
|
+
* Replaced by a later conversation, or another fact already says that
|
|
6098
|
+
*/
|
|
6099
|
+
409: ErrorResponse;
|
|
6100
|
+
/**
|
|
6101
|
+
* No text, or text that looks like a secret — a password, a code, a card, account or identity number, or a key — which no fact may hold
|
|
6102
|
+
*/
|
|
6103
|
+
422: ErrorResponse;
|
|
6104
|
+
/**
|
|
6105
|
+
* Rate limit exceeded
|
|
6106
|
+
*/
|
|
6107
|
+
429: ErrorResponse;
|
|
6108
|
+
};
|
|
6109
|
+
export type UpdateEndUserFactError = UpdateEndUserFactErrors[keyof UpdateEndUserFactErrors];
|
|
6110
|
+
export type UpdateEndUserFactResponses = {
|
|
6111
|
+
/**
|
|
6112
|
+
* The fact, corrected
|
|
6113
|
+
*/
|
|
6114
|
+
200: FactInfo;
|
|
6115
|
+
};
|
|
6116
|
+
export type UpdateEndUserFactResponse = UpdateEndUserFactResponses[keyof UpdateEndUserFactResponses];
|
|
5760
6117
|
export type ListKnowledgeCategoriesData = {
|
|
5761
6118
|
body?: never;
|
|
5762
6119
|
path?: never;
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* key): it mints a five-minute key for them, lists their sessions (200 a
|
|
23
23
|
* page), reads each transcript back to its start by `messages.next_cursor`
|
|
24
24
|
* (200 messages a page, four sessions at a time), reads their facts (200
|
|
25
|
-
* a page)
|
|
25
|
+
* a page) — those a later conversation replaced too, which are still held
|
|
26
|
+
* until they are deleted 30 days on — and revokes the key in `finally` —
|
|
27
|
+
* after an abort or a failure
|
|
26
28
|
* too. The cost: one mint (and `limits()` when cold) + ⌈S/200⌉ lists +
|
|
27
29
|
* Σ⌈M/200⌉ transcript pages + ⌈F/200⌉ fact pages + one revoke. **Its ceilings**: the
|
|
28
30
|
* key is ordinary, so at the person's live-key cap or the plan's mint rate
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
* read fails with a 401; its one micro-credit is set aside like any key's,
|
|
32
34
|
* so an organisation with no balance cannot export (402).
|
|
33
35
|
*/
|
|
34
|
-
import type { EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, FactInfo, ListEndUsersData, SessionDetail } from "../gen/index.js";
|
|
36
|
+
import type { EndUserCreateRequest, EndUserDeleted, EndUserInfo, EndUserPage, EndUserUpdateRequest, FactCreateRequest, FactInfo, FactUpdateRequest, ListEndUsersData, SessionDetail } from "../gen/index.js";
|
|
35
37
|
import { type RequestOptions, type Transport } from "../transport.js";
|
|
36
38
|
import type { EphemeralKeys } from "./ephemeral-keys.js";
|
|
37
39
|
import { Editable } from "./resource.js";
|
|
@@ -57,8 +59,30 @@ export interface EndUserExport {
|
|
|
57
59
|
/** What is remembered about them, oldest first — the newest 100 for now. */
|
|
58
60
|
facts: FactInfo[];
|
|
59
61
|
}
|
|
62
|
+
/** A fact `facts.add` answered, and whether this call made it. */
|
|
63
|
+
export type FactAdded = FactInfo & {
|
|
64
|
+
/** `true` on a 201, `false` when a fact already said it — now yours. */
|
|
65
|
+
created: boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* `endUsers.facts`: what the agents remember about one person, from your
|
|
69
|
+
* server, with no key minted for them — `/v1/end-users/{id}/facts`.
|
|
70
|
+
*/
|
|
71
|
+
export interface EndUserFacts {
|
|
72
|
+
/** Every fact, oldest first; `include_replaced` lists the replaced ones too. */
|
|
73
|
+
list(id: string, params?: {
|
|
74
|
+
include_replaced?: boolean;
|
|
75
|
+
}, options?: RequestOptions): AsyncGenerator<FactInfo, void, undefined>;
|
|
76
|
+
/** Tells the agents something: yours, never replaced by a conversation. */
|
|
77
|
+
add(id: string, body: FactCreateRequest, options?: RequestOptions): Promise<FactAdded>;
|
|
78
|
+
/** Corrects one fact's words; the old ones are kept as forgotten. */
|
|
79
|
+
update(id: string, factId: string, body: FactUpdateRequest, options?: RequestOptions): Promise<FactInfo>;
|
|
80
|
+
/** Forgets one: `true`, or `false` when there is none by that id. */
|
|
81
|
+
delete(id: string, factId: string, options?: RequestOptions): Promise<boolean>;
|
|
82
|
+
}
|
|
60
83
|
export declare class EndUsers extends Editable<EndUserInfo, EndUserUpdateRequest, EndUserInfo, EndUserDeleted | null> {
|
|
61
84
|
private readonly keys;
|
|
85
|
+
readonly facts: EndUserFacts;
|
|
62
86
|
constructor(api: Transport, base: string, keys: EphemeralKeys);
|
|
63
87
|
/**
|
|
64
88
|
* Makes a person, or finds the one your `external_id` already names.
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* key): it mints a five-minute key for them, lists their sessions (200 a
|
|
23
23
|
* page), reads each transcript back to its start by `messages.next_cursor`
|
|
24
24
|
* (200 messages a page, four sessions at a time), reads their facts (200
|
|
25
|
-
* a page)
|
|
25
|
+
* a page) — those a later conversation replaced too, which are still held
|
|
26
|
+
* until they are deleted 30 days on — and revokes the key in `finally` —
|
|
27
|
+
* after an abort or a failure
|
|
26
28
|
* too. The cost: one mint (and `limits()` when cold) + ⌈S/200⌉ lists +
|
|
27
29
|
* Σ⌈M/200⌉ transcript pages + ⌈F/200⌉ fact pages + one revoke. **Its ceilings**: the
|
|
28
30
|
* key is ordinary, so at the person's live-key cap or the plan's mint rate
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
* so an organisation with no balance cannot export (402).
|
|
33
35
|
*/
|
|
34
36
|
import { pages } from "../paging.js";
|
|
35
|
-
import { segment, } from "../transport.js";
|
|
37
|
+
import { orNull, segment, } from "../transport.js";
|
|
36
38
|
import { Editable } from "./resource.js";
|
|
37
39
|
/** The routes' largest page, for end users, sessions and transcripts alike. */
|
|
38
40
|
const PAGE = 200;
|
|
@@ -65,6 +67,16 @@ export class EndUsers extends Editable {
|
|
|
65
67
|
constructor(api, base, keys) {
|
|
66
68
|
super(api, base);
|
|
67
69
|
this.keys = keys;
|
|
70
|
+
const fact = (id, factId) => this.at(id, `/facts/${segment(factId)}`);
|
|
71
|
+
this.facts = {
|
|
72
|
+
list: (id, params = {}, options) => this.each(this.at(id, "/facts"), params, options, PAGE),
|
|
73
|
+
add: async (id, body, options) => {
|
|
74
|
+
const answer = await this.api.request({ method: "POST", path: this.base + this.at(id, "/facts"), body }, options);
|
|
75
|
+
return { ...answer.data, created: answer.status === 201 };
|
|
76
|
+
},
|
|
77
|
+
update: (id, factId, body, options) => this.send("PATCH", fact(id, factId), options, body),
|
|
78
|
+
delete: (id, factId, options) => orNull(this.send("DELETE", fact(id, factId), options)).then((gone) => gone !== null),
|
|
79
|
+
};
|
|
68
80
|
}
|
|
69
81
|
/**
|
|
70
82
|
* Makes a person, or finds the one your `external_id` already names.
|
|
@@ -125,7 +137,11 @@ export class EndUsers extends Editable {
|
|
|
125
137
|
messages: { data: held.flat(), next_cursor: null },
|
|
126
138
|
};
|
|
127
139
|
});
|
|
128
|
-
const facts = await all(pages((cursor) => read("/v1/agent/facts", {
|
|
140
|
+
const facts = await all(pages((cursor) => read("/v1/agent/facts", {
|
|
141
|
+
limit: PAGE,
|
|
142
|
+
cursor,
|
|
143
|
+
include_replaced: true,
|
|
144
|
+
})));
|
|
129
145
|
return { end_user_id: key.end_user_id ?? id, sessions, facts };
|
|
130
146
|
}
|
|
131
147
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumavox/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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",
|