@vertesia/client 1.1.1-dev.20260505.163000Z → 1.3.0-dev.20260620.061059Z
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 +29 -0
- package/lib/{types/AccountApi.d.ts → AccountApi.d.ts} +5 -10
- package/lib/AccountApi.d.ts.map +1 -0
- package/lib/{esm/AccountApi.js → AccountApi.js} +5 -13
- package/lib/AccountApi.js.map +1 -0
- package/lib/{types/AccountsApi.d.ts → AccountsApi.d.ts} +3 -2
- package/lib/AccountsApi.d.ts.map +1 -0
- package/lib/{esm/AccountsApi.js → AccountsApi.js} +2 -2
- package/lib/AccountsApi.js.map +1 -0
- package/lib/{types/AnalyticsApi.d.ts → AnalyticsApi.d.ts} +3 -2
- package/lib/AnalyticsApi.d.ts.map +1 -0
- package/lib/{esm/AnalyticsApi.js → AnalyticsApi.js} +5 -5
- package/lib/AnalyticsApi.js.map +1 -0
- package/lib/{types/ApiKeysApi.d.ts → ApiKeysApi.d.ts} +3 -2
- package/lib/ApiKeysApi.d.ts.map +1 -0
- package/lib/ApiKeysApi.js.map +1 -0
- package/lib/{types/AppsApi.d.ts → AppsApi.d.ts} +40 -2
- package/lib/AppsApi.d.ts.map +1 -0
- package/lib/{esm/AppsApi.js → AppsApi.js} +87 -14
- package/lib/AppsApi.js.map +1 -0
- package/lib/{types/AuditTrailApi.d.ts → AuditTrailApi.d.ts} +2 -1
- package/lib/AuditTrailApi.d.ts.map +1 -0
- package/lib/{esm/AuditTrailApi.js → AuditTrailApi.js} +1 -1
- package/lib/AuditTrailApi.js.map +1 -0
- package/lib/{types/CommandsApi.d.ts → CommandsApi.d.ts} +3 -2
- package/lib/CommandsApi.d.ts.map +1 -0
- package/lib/{esm/CommandsApi.js → CommandsApi.js} +3 -3
- package/lib/CommandsApi.js.map +1 -0
- package/lib/{types/EnvironmentsApi.d.ts → EnvironmentsApi.d.ts} +5 -4
- package/lib/EnvironmentsApi.d.ts.map +1 -0
- package/lib/{esm/EnvironmentsApi.js → EnvironmentsApi.js} +13 -13
- package/lib/EnvironmentsApi.js.map +1 -0
- package/lib/{types/GroupsApi.d.ts → GroupsApi.d.ts} +3 -2
- package/lib/GroupsApi.d.ts.map +1 -0
- package/lib/{esm/GroupsApi.js → GroupsApi.js} +8 -8
- package/lib/GroupsApi.js.map +1 -0
- package/lib/IamApi.d.ts +58 -0
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/IamApi.js +76 -0
- package/lib/IamApi.js.map +1 -0
- package/lib/{types/InteractionBase.d.ts → InteractionBase.d.ts} +6 -5
- package/lib/InteractionBase.d.ts.map +1 -0
- package/lib/{esm/InteractionBase.js → InteractionBase.js} +4 -4
- package/lib/InteractionBase.js.map +1 -0
- package/lib/{types/InteractionCatalogApi.d.ts → InteractionCatalogApi.d.ts} +3 -2
- package/lib/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/{esm/InteractionCatalogApi.js → InteractionCatalogApi.js} +12 -12
- package/lib/InteractionCatalogApi.js.map +1 -0
- package/lib/{types/InteractionOutput.d.ts → InteractionOutput.d.ts} +13 -12
- package/lib/InteractionOutput.d.ts.map +1 -0
- package/lib/{esm/InteractionOutput.js → InteractionOutput.js} +22 -25
- package/lib/InteractionOutput.js.map +1 -0
- package/lib/{types/InteractionResult.example.d.ts → InteractionResult.example.d.ts} +1 -0
- package/lib/InteractionResult.example.d.ts.map +1 -0
- package/lib/{esm/InteractionResult.example.js → InteractionResult.example.js} +4 -4
- package/lib/InteractionResult.example.js.map +1 -0
- package/lib/{types/InteractionsApi.d.ts → InteractionsApi.d.ts} +17 -6
- package/lib/InteractionsApi.d.ts.map +1 -0
- package/lib/{esm/InteractionsApi.js → InteractionsApi.js} +45 -28
- package/lib/InteractionsApi.js.map +1 -0
- package/lib/{types/OAuthClientsApi.d.ts → OAuthClientsApi.d.ts} +4 -2
- package/lib/OAuthClientsApi.d.ts.map +1 -0
- package/lib/{esm/OAuthClientsApi.js → OAuthClientsApi.js} +3 -0
- package/lib/OAuthClientsApi.js.map +1 -0
- package/lib/{types/OAuthGrantsApi.d.ts → OAuthGrantsApi.d.ts} +2 -1
- package/lib/OAuthGrantsApi.d.ts.map +1 -0
- package/lib/OAuthGrantsApi.js.map +1 -0
- package/lib/{types/OAuthProvidersApi.d.ts → OAuthProvidersApi.d.ts} +3 -2
- package/lib/OAuthProvidersApi.d.ts.map +1 -0
- package/lib/OAuthProvidersApi.js.map +1 -0
- package/lib/OAuthServerApi.d.ts +19 -0
- package/lib/OAuthServerApi.d.ts.map +1 -0
- package/lib/OAuthServerApi.js +48 -0
- package/lib/OAuthServerApi.js.map +1 -0
- package/lib/{types/ProjectsApi.d.ts → ProjectsApi.d.ts} +8 -5
- package/lib/ProjectsApi.d.ts.map +1 -0
- package/lib/{esm/ProjectsApi.js → ProjectsApi.js} +21 -12
- package/lib/ProjectsApi.js.map +1 -0
- package/lib/{types/PromptsApi.d.ts → PromptsApi.d.ts} +17 -9
- package/lib/PromptsApi.d.ts.map +1 -0
- package/lib/{esm/PromptsApi.js → PromptsApi.js} +16 -18
- package/lib/PromptsApi.js.map +1 -0
- package/lib/RefsApi.d.ts +7 -0
- package/lib/RefsApi.d.ts.map +1 -0
- package/lib/{esm/RefsApi.js → RefsApi.js} +2 -2
- package/lib/RefsApi.js.map +1 -0
- package/lib/{types/RemoteMcpConnectionsApi.d.ts → RemoteMcpConnectionsApi.d.ts} +3 -2
- package/lib/RemoteMcpConnectionsApi.d.ts.map +1 -0
- package/lib/{esm/RemoteMcpConnectionsApi.js → RemoteMcpConnectionsApi.js} +3 -3
- package/lib/RemoteMcpConnectionsApi.js.map +1 -0
- package/lib/{types/RunsApi.d.ts → RunsApi.d.ts} +11 -7
- package/lib/RunsApi.d.ts.map +1 -0
- package/lib/{esm/RunsApi.js → RunsApi.js} +14 -12
- package/lib/RunsApi.js.map +1 -0
- package/lib/SecretsApi.d.ts +18 -0
- package/lib/SecretsApi.d.ts.map +1 -0
- package/lib/SecretsApi.js +30 -0
- package/lib/SecretsApi.js.map +1 -0
- package/lib/{types/SkillsApi.d.ts → SkillsApi.d.ts} +3 -2
- package/lib/SkillsApi.d.ts.map +1 -0
- package/lib/{esm/SkillsApi.js → SkillsApi.js} +3 -3
- package/lib/SkillsApi.js.map +1 -0
- package/lib/{types/StreamSource.d.ts → StreamSource.d.ts} +1 -0
- package/lib/StreamSource.d.ts.map +1 -0
- package/lib/StreamSource.js.map +1 -0
- package/lib/ToolsApi.d.ts +36 -0
- package/lib/ToolsApi.d.ts.map +1 -0
- package/lib/ToolsApi.js +46 -0
- package/lib/ToolsApi.js.map +1 -0
- package/lib/{types/TrainingApi.d.ts → TrainingApi.d.ts} +7 -6
- package/lib/TrainingApi.d.ts.map +1 -0
- package/lib/TrainingApi.js +51 -0
- package/lib/TrainingApi.js.map +1 -0
- package/lib/{types/UsersApi.d.ts → UsersApi.d.ts} +3 -2
- package/lib/UsersApi.d.ts.map +1 -0
- package/lib/{esm/UsersApi.js → UsersApi.js} +3 -3
- package/lib/UsersApi.js.map +1 -0
- package/lib/{types/client.d.ts → client.d.ts} +55 -27
- package/lib/client.d.ts.map +1 -0
- package/lib/{esm/client.js → client.js} +113 -61
- package/lib/client.js.map +1 -0
- package/lib/{types/execute.d.ts → execute.d.ts} +5 -4
- package/lib/execute.d.ts.map +1 -0
- package/lib/{esm/execute.js → execute.js} +29 -11
- package/lib/execute.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +9 -8
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +4 -2
- package/lib/index.js.map +1 -0
- package/lib/{types/nodejs → nodejs}/NodeStreamSource.d.ts +3 -2
- package/lib/nodejs/NodeStreamSource.d.ts.map +1 -0
- package/lib/{esm/nodejs → nodejs}/NodeStreamSource.js +3 -3
- package/lib/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/nodejs/index.d.ts +2 -0
- package/lib/nodejs/index.d.ts.map +1 -0
- package/lib/nodejs/index.js +2 -0
- package/lib/nodejs/index.js.map +1 -0
- package/lib/{types/store → store}/AgentsApi.d.ts +60 -9
- package/lib/store/AgentsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AgentsApi.js +174 -53
- package/lib/store/AgentsApi.js.map +1 -0
- package/lib/{types/store → store}/AnalyzeDocApi.d.ts +3 -2
- package/lib/store/AnalyzeDocApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AnalyzeDocApi.js +10 -10
- package/lib/store/AnalyzeDocApi.js.map +1 -0
- package/lib/{types/store → store}/CollectionsApi.d.ts +6 -5
- package/lib/store/CollectionsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/CollectionsApi.js +22 -22
- package/lib/store/CollectionsApi.js.map +1 -0
- package/lib/{types/store → store}/CostApi.d.ts +3 -2
- package/lib/store/CostApi.d.ts.map +1 -0
- package/lib/store/CostApi.js.map +1 -0
- package/lib/{types/store → store}/DashboardApi.d.ts +3 -2
- package/lib/store/DashboardApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DashboardApi.js +7 -4
- package/lib/store/DashboardApi.js.map +1 -0
- package/lib/{types/store → store}/DataApi.d.ts +4 -3
- package/lib/store/DataApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DataApi.js +6 -6
- package/lib/store/DataApi.js.map +1 -0
- package/lib/{types/store → store}/EmailApi.d.ts +3 -2
- package/lib/store/EmailApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/EmailApi.js +5 -5
- package/lib/store/EmailApi.js.map +1 -0
- package/lib/store/EmbeddingsApi.d.ts +13 -0
- package/lib/store/EmbeddingsApi.d.ts.map +1 -0
- package/lib/store/EmbeddingsApi.js +25 -0
- package/lib/store/EmbeddingsApi.js.map +1 -0
- package/lib/{types/store → store}/FilesApi.d.ts +22 -7
- package/lib/store/FilesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/FilesApi.js +56 -51
- package/lib/store/FilesApi.js.map +1 -0
- package/lib/{types/store → store}/HiveMemoryApi.d.ts +3 -2
- package/lib/store/HiveMemoryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/HiveMemoryApi.js +11 -11
- package/lib/{esm/store → store}/HiveMemoryApi.js.map +1 -1
- package/lib/{types/store → store}/IndexingApi.d.ts +16 -10
- package/lib/store/IndexingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/IndexingApi.js +57 -45
- package/lib/store/IndexingApi.js.map +1 -0
- package/lib/{types/store → store}/ObjectsApi.d.ts +16 -11
- package/lib/store/ObjectsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ObjectsApi.js +46 -63
- package/lib/store/ObjectsApi.js.map +1 -0
- package/lib/{types/store → store}/PendingAsksApi.d.ts +5 -2
- package/lib/store/PendingAsksApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/PendingAsksApi.js +4 -4
- package/lib/store/PendingAsksApi.js.map +1 -0
- package/lib/store/ProcessApi.d.ts +25 -0
- package/lib/store/ProcessApi.d.ts.map +1 -0
- package/lib/store/ProcessApi.js +42 -0
- package/lib/store/ProcessApi.js.map +1 -0
- package/lib/{types/store → store}/QueryApi.d.ts +2 -1
- package/lib/store/QueryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/QueryApi.js +3 -3
- package/lib/store/QueryApi.js.map +1 -0
- package/lib/{types/store → store}/RenderingApi.d.ts +3 -2
- package/lib/store/RenderingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/RenderingApi.js +8 -8
- package/lib/store/RenderingApi.js.map +1 -0
- package/lib/{types/store → store}/SchedulesApi.d.ts +3 -2
- package/lib/store/SchedulesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/SchedulesApi.js +4 -4
- package/lib/store/SchedulesApi.js.map +1 -0
- package/lib/store/TaskApi.d.ts +16 -0
- package/lib/store/TaskApi.d.ts.map +1 -0
- package/lib/store/TaskApi.js +42 -0
- package/lib/store/TaskApi.js.map +1 -0
- package/lib/{types/store → store}/ToolsApi.d.ts +3 -2
- package/lib/store/ToolsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ToolsApi.js +2 -2
- package/lib/store/ToolsApi.js.map +1 -0
- package/lib/{types/store → store}/TypeCatalogApi.d.ts +4 -3
- package/lib/store/TypeCatalogApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypeCatalogApi.js +5 -5
- package/lib/store/TypeCatalogApi.js.map +1 -0
- package/lib/{types/store → store}/TypesApi.d.ts +5 -4
- package/lib/store/TypesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypesApi.js +12 -12
- package/lib/store/TypesApi.js.map +1 -0
- package/lib/{types/store → store}/WorkflowsApi.d.ts +11 -9
- package/lib/store/WorkflowsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/WorkflowsApi.js +62 -52
- package/lib/store/WorkflowsApi.js.map +1 -0
- package/lib/store/client.d.ts +62 -0
- package/lib/store/client.d.ts.map +1 -0
- package/lib/store/client.js +106 -0
- package/lib/store/client.js.map +1 -0
- package/lib/{types/store → store}/errors.d.ts +2 -1
- package/lib/store/errors.d.ts.map +1 -0
- package/lib/store/errors.js +7 -0
- package/lib/store/errors.js.map +1 -0
- package/lib/store/index.d.ts +21 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +21 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/signed-url.d.ts +39 -0
- package/lib/store/signed-url.d.ts.map +1 -0
- package/lib/store/signed-url.js +153 -0
- package/lib/store/signed-url.js.map +1 -0
- package/lib/store/stream-termination.d.ts +4 -0
- package/lib/store/stream-termination.d.ts.map +1 -0
- package/lib/store/stream-termination.js +31 -0
- package/lib/store/stream-termination.js.map +1 -0
- package/lib/{types/store → store}/version.d.ts +2 -0
- package/lib/store/version.d.ts.map +1 -0
- package/lib/{esm/store → store}/version.js +1 -0
- package/lib/store/version.js.map +1 -0
- package/lib/vertesia-client.js +1 -1
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +26 -38
- package/src/AccountApi.ts +10 -22
- package/src/AccountsApi.ts +3 -9
- package/src/AnalyticsApi.ts +6 -8
- package/src/ApiKeysApi.ts +10 -2
- package/src/AppsApi.ts +131 -27
- package/src/AuditTrailApi.ts +4 -4
- package/src/CommandsApi.ts +7 -8
- package/src/EnvironmentsApi.ts +27 -23
- package/src/GroupsApi.ts +15 -10
- package/src/IamApi.ts +56 -22
- package/src/InteractionBase.ts +18 -9
- package/src/InteractionCatalogApi.ts +15 -20
- package/src/InteractionOutput.test.ts +40 -57
- package/src/InteractionOutput.ts +55 -47
- package/src/InteractionResult.example.ts +30 -18
- package/src/InteractionsApi.ts +113 -59
- package/src/OAuthClientsApi.ts +6 -1
- package/src/OAuthGrantsApi.ts +1 -1
- package/src/OAuthProvidersApi.ts +3 -4
- package/src/OAuthServerApi.ts +53 -6
- package/src/ProjectsApi.ts +70 -31
- package/src/PromptsApi.ts +44 -29
- package/src/RefsApi.ts +4 -10
- package/src/RemoteMcpConnectionsApi.ts +6 -7
- package/src/RunsApi.ts +25 -20
- package/src/SecretsApi.ts +56 -0
- package/src/SkillsApi.ts +5 -12
- package/src/StreamSource.ts +6 -1
- package/src/ToolsApi.ts +52 -0
- package/src/TrainingApi.ts +27 -25
- package/src/UsersApi.ts +6 -8
- package/src/client.test.ts +68 -2
- package/src/client.ts +160 -103
- package/src/execute.ts +60 -20
- package/src/index.ts +8 -8
- package/src/nodejs/NodeStreamSource.ts +4 -5
- package/src/nodejs/index.ts +1 -1
- package/src/store/AgentsApi.ts +308 -148
- package/src/store/AnalyzeDocApi.ts +39 -21
- package/src/store/CollectionsApi.ts +40 -38
- package/src/store/CostApi.ts +14 -19
- package/src/store/DashboardApi.ts +24 -27
- package/src/store/DataApi.ts +29 -32
- package/src/store/EmailApi.ts +6 -6
- package/src/store/EmbeddingsApi.ts +15 -15
- package/src/store/FilesApi.ts +80 -85
- package/src/store/HiveMemoryApi.ts +17 -28
- package/src/store/IndexingApi.ts +113 -76
- package/src/store/ObjectsApi.ts +100 -131
- package/src/store/PendingAsksApi.ts +7 -5
- package/src/store/ProcessApi.ts +61 -0
- package/src/store/QueryApi.ts +3 -4
- package/src/store/RenderingApi.ts +14 -17
- package/src/store/SchedulesApi.ts +6 -6
- package/src/store/TaskApi.ts +45 -0
- package/src/store/ToolsApi.ts +3 -3
- package/src/store/TypeCatalogApi.ts +56 -53
- package/src/store/TypesApi.ts +26 -18
- package/src/store/WorkflowsApi.ts +158 -152
- package/src/store/client.ts +58 -39
- package/src/store/errors.ts +3 -3
- package/src/store/index.ts +20 -18
- package/src/store/signed-url.test.ts +182 -0
- package/src/store/signed-url.ts +184 -0
- package/src/store/stream-gap.test.ts +230 -0
- package/src/store/stream-termination.test.ts +58 -0
- package/src/store/stream-termination.ts +40 -0
- package/src/store/version.ts +2 -1
- package/lib/cjs/AccountApi.js +0 -85
- package/lib/cjs/AccountApi.js.map +0 -1
- package/lib/cjs/AccountsApi.js +0 -16
- package/lib/cjs/AccountsApi.js.map +0 -1
- package/lib/cjs/AnalyticsApi.js +0 -43
- package/lib/cjs/AnalyticsApi.js.map +0 -1
- package/lib/cjs/ApiKeysApi.js +0 -61
- package/lib/cjs/ApiKeysApi.js.map +0 -1
- package/lib/cjs/AppsApi.js +0 -137
- package/lib/cjs/AppsApi.js.map +0 -1
- package/lib/cjs/AuditTrailApi.js +0 -39
- package/lib/cjs/AuditTrailApi.js.map +0 -1
- package/lib/cjs/CommandsApi.js +0 -19
- package/lib/cjs/CommandsApi.js.map +0 -1
- package/lib/cjs/EnvironmentsApi.js +0 -72
- package/lib/cjs/EnvironmentsApi.js.map +0 -1
- package/lib/cjs/GroupsApi.js +0 -86
- package/lib/cjs/GroupsApi.js.map +0 -1
- package/lib/cjs/IamApi.js +0 -53
- package/lib/cjs/IamApi.js.map +0 -1
- package/lib/cjs/InteractionBase.js +0 -44
- package/lib/cjs/InteractionBase.js.map +0 -1
- package/lib/cjs/InteractionCatalogApi.js +0 -64
- package/lib/cjs/InteractionCatalogApi.js.map +0 -1
- package/lib/cjs/InteractionOutput.js +0 -300
- package/lib/cjs/InteractionOutput.js.map +0 -1
- package/lib/cjs/InteractionResult.example.js +0 -57
- package/lib/cjs/InteractionResult.example.js.map +0 -1
- package/lib/cjs/InteractionsApi.js +0 -260
- package/lib/cjs/InteractionsApi.js.map +0 -1
- package/lib/cjs/OAuthClientsApi.js +0 -25
- package/lib/cjs/OAuthClientsApi.js.map +0 -1
- package/lib/cjs/OAuthGrantsApi.js +0 -30
- package/lib/cjs/OAuthGrantsApi.js.map +0 -1
- package/lib/cjs/OAuthProvidersApi.js +0 -43
- package/lib/cjs/OAuthProvidersApi.js.map +0 -1
- package/lib/cjs/OAuthServerApi.js +0 -22
- package/lib/cjs/OAuthServerApi.js.map +0 -1
- package/lib/cjs/ProjectsApi.js +0 -105
- package/lib/cjs/ProjectsApi.js.map +0 -1
- package/lib/cjs/PromptsApi.js +0 -135
- package/lib/cjs/PromptsApi.js.map +0 -1
- package/lib/cjs/RefsApi.js +0 -14
- package/lib/cjs/RefsApi.js.map +0 -1
- package/lib/cjs/RemoteMcpConnectionsApi.js +0 -38
- package/lib/cjs/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/cjs/RunsApi.js +0 -115
- package/lib/cjs/RunsApi.js.map +0 -1
- package/lib/cjs/SkillsApi.js +0 -39
- package/lib/cjs/SkillsApi.js.map +0 -1
- package/lib/cjs/StreamSource.js +0 -17
- package/lib/cjs/StreamSource.js.map +0 -1
- package/lib/cjs/TrainingApi.js +0 -54
- package/lib/cjs/TrainingApi.js.map +0 -1
- package/lib/cjs/UsersApi.js +0 -19
- package/lib/cjs/UsersApi.js.map +0 -1
- package/lib/cjs/client.js +0 -375
- package/lib/cjs/client.js.map +0 -1
- package/lib/cjs/execute.js +0 -160
- package/lib/cjs/execute.js.map +0 -1
- package/lib/cjs/index.js +0 -36
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
- package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/cjs/nodejs/index.js +0 -18
- package/lib/cjs/nodejs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/store/AgentsApi.js +0 -663
- package/lib/cjs/store/AgentsApi.js.map +0 -1
- package/lib/cjs/store/AnalyzeDocApi.js +0 -56
- package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
- package/lib/cjs/store/CollectionsApi.js +0 -131
- package/lib/cjs/store/CollectionsApi.js.map +0 -1
- package/lib/cjs/store/CommandsApi.js +0 -17
- package/lib/cjs/store/CommandsApi.js.map +0 -1
- package/lib/cjs/store/CostApi.js +0 -62
- package/lib/cjs/store/CostApi.js.map +0 -1
- package/lib/cjs/store/DashboardApi.js +0 -182
- package/lib/cjs/store/DashboardApi.js.map +0 -1
- package/lib/cjs/store/DataApi.js +0 -436
- package/lib/cjs/store/DataApi.js.map +0 -1
- package/lib/cjs/store/EmailApi.js +0 -103
- package/lib/cjs/store/EmailApi.js.map +0 -1
- package/lib/cjs/store/EmbeddingsApi.js +0 -29
- package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
- package/lib/cjs/store/FilesApi.js +0 -286
- package/lib/cjs/store/FilesApi.js.map +0 -1
- package/lib/cjs/store/HiveMemoryApi.js +0 -174
- package/lib/cjs/store/HiveMemoryApi.js.map +0 -1
- package/lib/cjs/store/IndexingApi.js +0 -308
- package/lib/cjs/store/IndexingApi.js.map +0 -1
- package/lib/cjs/store/ObjectsApi.js +0 -340
- package/lib/cjs/store/ObjectsApi.js.map +0 -1
- package/lib/cjs/store/PendingAsksApi.js +0 -43
- package/lib/cjs/store/PendingAsksApi.js.map +0 -1
- package/lib/cjs/store/QueryApi.js +0 -67
- package/lib/cjs/store/QueryApi.js.map +0 -1
- package/lib/cjs/store/RenderingApi.js +0 -84
- package/lib/cjs/store/RenderingApi.js.map +0 -1
- package/lib/cjs/store/SchedulesApi.js +0 -103
- package/lib/cjs/store/SchedulesApi.js.map +0 -1
- package/lib/cjs/store/ToolsApi.js +0 -21
- package/lib/cjs/store/ToolsApi.js.map +0 -1
- package/lib/cjs/store/TypeCatalogApi.js +0 -50
- package/lib/cjs/store/TypeCatalogApi.js.map +0 -1
- package/lib/cjs/store/TypesApi.js +0 -60
- package/lib/cjs/store/TypesApi.js.map +0 -1
- package/lib/cjs/store/WorkersApi.js +0 -16
- package/lib/cjs/store/WorkersApi.js.map +0 -1
- package/lib/cjs/store/WorkflowsApi.js +0 -621
- package/lib/cjs/store/WorkflowsApi.js.map +0 -1
- package/lib/cjs/store/client.js +0 -93
- package/lib/cjs/store/client.js.map +0 -1
- package/lib/cjs/store/errors.js +0 -11
- package/lib/cjs/store/errors.js.map +0 -1
- package/lib/cjs/store/index.js +0 -34
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/version.js +0 -6
- package/lib/cjs/store/version.js.map +0 -1
- package/lib/esm/AccountApi.js.map +0 -1
- package/lib/esm/AccountsApi.js.map +0 -1
- package/lib/esm/AnalyticsApi.js.map +0 -1
- package/lib/esm/ApiKeysApi.js.map +0 -1
- package/lib/esm/AppsApi.js.map +0 -1
- package/lib/esm/AuditTrailApi.js.map +0 -1
- package/lib/esm/CommandsApi.js.map +0 -1
- package/lib/esm/EnvironmentsApi.js.map +0 -1
- package/lib/esm/GroupsApi.js.map +0 -1
- package/lib/esm/IamApi.js +0 -47
- package/lib/esm/IamApi.js.map +0 -1
- package/lib/esm/InteractionBase.js.map +0 -1
- package/lib/esm/InteractionCatalogApi.js.map +0 -1
- package/lib/esm/InteractionOutput.js.map +0 -1
- package/lib/esm/InteractionResult.example.js.map +0 -1
- package/lib/esm/InteractionsApi.js.map +0 -1
- package/lib/esm/OAuthClientsApi.js.map +0 -1
- package/lib/esm/OAuthGrantsApi.js.map +0 -1
- package/lib/esm/OAuthProvidersApi.js.map +0 -1
- package/lib/esm/OAuthServerApi.js +0 -19
- package/lib/esm/OAuthServerApi.js.map +0 -1
- package/lib/esm/ProjectsApi.js.map +0 -1
- package/lib/esm/PromptsApi.js.map +0 -1
- package/lib/esm/RefsApi.js.map +0 -1
- package/lib/esm/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/esm/RunsApi.js.map +0 -1
- package/lib/esm/SkillsApi.js.map +0 -1
- package/lib/esm/StreamSource.js.map +0 -1
- package/lib/esm/TrainingApi.js +0 -51
- package/lib/esm/TrainingApi.js.map +0 -1
- package/lib/esm/UsersApi.js.map +0 -1
- package/lib/esm/client.js.map +0 -1
- package/lib/esm/execute.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/esm/nodejs/index.js +0 -2
- package/lib/esm/nodejs/index.js.map +0 -1
- package/lib/esm/store/AgentsApi.js.map +0 -1
- package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
- package/lib/esm/store/CollectionsApi.js.map +0 -1
- package/lib/esm/store/CommandsApi.js +0 -13
- package/lib/esm/store/CommandsApi.js.map +0 -1
- package/lib/esm/store/CostApi.js.map +0 -1
- package/lib/esm/store/DashboardApi.js.map +0 -1
- package/lib/esm/store/DataApi.js.map +0 -1
- package/lib/esm/store/EmailApi.js.map +0 -1
- package/lib/esm/store/EmbeddingsApi.js +0 -25
- package/lib/esm/store/EmbeddingsApi.js.map +0 -1
- package/lib/esm/store/FilesApi.js.map +0 -1
- package/lib/esm/store/IndexingApi.js.map +0 -1
- package/lib/esm/store/ObjectsApi.js.map +0 -1
- package/lib/esm/store/PendingAsksApi.js.map +0 -1
- package/lib/esm/store/QueryApi.js.map +0 -1
- package/lib/esm/store/RenderingApi.js.map +0 -1
- package/lib/esm/store/SchedulesApi.js.map +0 -1
- package/lib/esm/store/ToolsApi.js.map +0 -1
- package/lib/esm/store/TypeCatalogApi.js.map +0 -1
- package/lib/esm/store/TypesApi.js.map +0 -1
- package/lib/esm/store/WorkersApi.js +0 -12
- package/lib/esm/store/WorkersApi.js.map +0 -1
- package/lib/esm/store/WorkflowsApi.js.map +0 -1
- package/lib/esm/store/client.js +0 -89
- package/lib/esm/store/client.js.map +0 -1
- package/lib/esm/store/errors.js +0 -7
- package/lib/esm/store/errors.js.map +0 -1
- package/lib/esm/store/index.js +0 -18
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/version.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/AccountApi.d.ts.map +0 -1
- package/lib/types/AccountsApi.d.ts.map +0 -1
- package/lib/types/AnalyticsApi.d.ts.map +0 -1
- package/lib/types/ApiKeysApi.d.ts.map +0 -1
- package/lib/types/AppsApi.d.ts.map +0 -1
- package/lib/types/AuditTrailApi.d.ts.map +0 -1
- package/lib/types/CommandsApi.d.ts.map +0 -1
- package/lib/types/EnvironmentsApi.d.ts.map +0 -1
- package/lib/types/GroupsApi.d.ts.map +0 -1
- package/lib/types/IamApi.d.ts +0 -36
- package/lib/types/IamApi.d.ts.map +0 -1
- package/lib/types/InteractionBase.d.ts.map +0 -1
- package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
- package/lib/types/InteractionOutput.d.ts.map +0 -1
- package/lib/types/InteractionResult.example.d.ts.map +0 -1
- package/lib/types/InteractionsApi.d.ts.map +0 -1
- package/lib/types/OAuthClientsApi.d.ts.map +0 -1
- package/lib/types/OAuthGrantsApi.d.ts.map +0 -1
- package/lib/types/OAuthProvidersApi.d.ts.map +0 -1
- package/lib/types/OAuthServerApi.d.ts +0 -10
- package/lib/types/OAuthServerApi.d.ts.map +0 -1
- package/lib/types/ProjectsApi.d.ts.map +0 -1
- package/lib/types/PromptsApi.d.ts.map +0 -1
- package/lib/types/RefsApi.d.ts +0 -6
- package/lib/types/RefsApi.d.ts.map +0 -1
- package/lib/types/RemoteMcpConnectionsApi.d.ts.map +0 -1
- package/lib/types/RunsApi.d.ts.map +0 -1
- package/lib/types/SkillsApi.d.ts.map +0 -1
- package/lib/types/StreamSource.d.ts.map +0 -1
- package/lib/types/TrainingApi.d.ts.map +0 -1
- package/lib/types/UsersApi.d.ts.map +0 -1
- package/lib/types/client.d.ts.map +0 -1
- package/lib/types/execute.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
- package/lib/types/nodejs/index.d.ts +0 -1
- package/lib/types/nodejs/index.d.ts.map +0 -1
- package/lib/types/store/AgentsApi.d.ts.map +0 -1
- package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
- package/lib/types/store/CollectionsApi.d.ts.map +0 -1
- package/lib/types/store/CommandsApi.d.ts +0 -10
- package/lib/types/store/CommandsApi.d.ts.map +0 -1
- package/lib/types/store/CostApi.d.ts.map +0 -1
- package/lib/types/store/DashboardApi.d.ts.map +0 -1
- package/lib/types/store/DataApi.d.ts.map +0 -1
- package/lib/types/store/EmailApi.d.ts.map +0 -1
- package/lib/types/store/EmbeddingsApi.d.ts +0 -12
- package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
- package/lib/types/store/FilesApi.d.ts.map +0 -1
- package/lib/types/store/HiveMemoryApi.d.ts.map +0 -1
- package/lib/types/store/IndexingApi.d.ts.map +0 -1
- package/lib/types/store/ObjectsApi.d.ts.map +0 -1
- package/lib/types/store/PendingAsksApi.d.ts.map +0 -1
- package/lib/types/store/QueryApi.d.ts.map +0 -1
- package/lib/types/store/RenderingApi.d.ts.map +0 -1
- package/lib/types/store/SchedulesApi.d.ts.map +0 -1
- package/lib/types/store/ToolsApi.d.ts.map +0 -1
- package/lib/types/store/TypeCatalogApi.d.ts.map +0 -1
- package/lib/types/store/TypesApi.d.ts.map +0 -1
- package/lib/types/store/WorkersApi.d.ts +0 -6
- package/lib/types/store/WorkersApi.d.ts.map +0 -1
- package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
- package/lib/types/store/client.d.ts +0 -57
- package/lib/types/store/client.d.ts.map +0 -1
- package/lib/types/store/errors.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -17
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/version.d.ts.map +0 -1
- package/src/store/CommandsApi.ts +0 -15
- package/src/store/WorkersApi.ts +0 -17
- /package/lib/{esm/ApiKeysApi.js → ApiKeysApi.js} +0 -0
- /package/lib/{esm/OAuthGrantsApi.js → OAuthGrantsApi.js} +0 -0
- /package/lib/{esm/OAuthProvidersApi.js → OAuthProvidersApi.js} +0 -0
- /package/lib/{esm/StreamSource.js → StreamSource.js} +0 -0
- /package/lib/{esm/store → store}/CostApi.js +0 -0
package/src/store/ObjectsApi.ts
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
import { ApiTopic } from
|
|
1
|
+
import { ApiTopic } from '@vertesia/api-fetch-client';
|
|
2
2
|
import {
|
|
3
|
-
BulkObjectCreateResult,
|
|
4
|
-
BulkObjectDeleteResult,
|
|
5
|
-
BulkObjectUpdateResult,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ComputeObjectFacetPayload,
|
|
10
|
-
ContentObject,
|
|
3
|
+
type BulkObjectCreateResult,
|
|
4
|
+
type BulkObjectDeleteResult,
|
|
5
|
+
type BulkObjectUpdateResult,
|
|
6
|
+
type Collection,
|
|
7
|
+
type ComplexSearchPayload,
|
|
8
|
+
type ComputedFacetResponse,
|
|
9
|
+
type ComputeObjectFacetPayload,
|
|
10
|
+
type ContentObject,
|
|
11
11
|
ContentObjectApiHeaders,
|
|
12
|
-
ContentObjectItem,
|
|
13
|
-
ContentObjectProcessingPriority,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
CreateContentObjectPayload,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
12
|
+
type ContentObjectItem,
|
|
13
|
+
type ContentObjectProcessingPriority,
|
|
14
|
+
type ContentObjectTextResponse,
|
|
15
|
+
type ContentSource,
|
|
16
|
+
type CreateContentObjectPayload,
|
|
17
|
+
canGenerateRendition,
|
|
18
|
+
type DeleteContentObjectResult,
|
|
19
|
+
type Embedding,
|
|
20
|
+
type ExportPropertiesPayload,
|
|
21
|
+
type ExportPropertiesResponse,
|
|
22
|
+
type FindPayload,
|
|
23
|
+
type GetFileUrlPayload,
|
|
24
|
+
type GetFileUrlResponse,
|
|
25
|
+
type GetRenditionParams,
|
|
26
|
+
type GetRenditionResponse,
|
|
27
|
+
type GetUploadUrlPayload,
|
|
28
|
+
type ListWorkflowRunsResponse,
|
|
29
|
+
type ObjectSearchPayload,
|
|
30
|
+
type ObjectSearchQuery,
|
|
31
|
+
type ObjectSearchResponse,
|
|
32
|
+
type SetObjectEmbeddingsResponse,
|
|
33
|
+
type SupportedEmbeddingTypes,
|
|
34
|
+
} from '@vertesia/common';
|
|
35
|
+
|
|
36
|
+
export { getSupportedRenditionFormats, supportsVisualRendition } from '@vertesia/common';
|
|
37
37
|
// Re-export rendition utilities for consumers
|
|
38
38
|
export { canGenerateRendition };
|
|
39
|
-
export { getSupportedRenditionFormats, supportsVisualRendition } from "@vertesia/common";
|
|
40
39
|
|
|
41
|
-
import { StreamSource } from
|
|
42
|
-
import { AnalyzeDocApi } from
|
|
43
|
-
import { ZenoClient } from
|
|
40
|
+
import { StreamSource } from '../StreamSource.js';
|
|
41
|
+
import { AnalyzeDocApi } from './AnalyzeDocApi.js';
|
|
42
|
+
import type { ZenoClient } from './client.js';
|
|
43
|
+
import { fetchSignedUrl } from './signed-url.js';
|
|
44
|
+
|
|
45
|
+
type ContentObjectWritePayload = Omit<CreateContentObjectPayload, 'content'> & {
|
|
46
|
+
content?: ContentSource | File | StreamSource;
|
|
47
|
+
};
|
|
44
48
|
|
|
45
49
|
export class ObjectsApi extends ApiTopic {
|
|
46
50
|
declare client: ZenoClient;
|
|
47
51
|
|
|
48
52
|
constructor(parent: ZenoClient) {
|
|
49
|
-
super(parent,
|
|
53
|
+
super(parent, '/api/v1/objects');
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
analyze(objectId: string) {
|
|
@@ -54,19 +58,19 @@ export class ObjectsApi extends ApiTopic {
|
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
getUploadUrl(payload: GetUploadUrlPayload): Promise<GetFileUrlResponse> {
|
|
57
|
-
return this.post(
|
|
61
|
+
return this.post('/upload-url', {
|
|
58
62
|
payload,
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
getDownloadUrl(fileUri: string, name?: string, disposition?:
|
|
63
|
-
return this.post(
|
|
66
|
+
getDownloadUrl(fileUri: string, name?: string, disposition?: 'inline' | 'attachment'): Promise<{ url: string }> {
|
|
67
|
+
return this.post('/download-url', {
|
|
64
68
|
payload: { file: fileUri, name, disposition } satisfies GetFileUrlPayload,
|
|
65
69
|
});
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
getDownloadUrlWithOptions(payload: GetFileUrlPayload): Promise<{ url: string }> {
|
|
69
|
-
return this.post(
|
|
73
|
+
return this.post('/download-url', { payload });
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
getContentSource(objectId: string): Promise<ContentSource> {
|
|
@@ -79,14 +83,12 @@ export class ObjectsApi extends ApiTopic {
|
|
|
79
83
|
* @param payload Search/filter parameters
|
|
80
84
|
* @returns Matching content objects
|
|
81
85
|
*/
|
|
82
|
-
list<T =
|
|
83
|
-
payload: ObjectSearchPayload = {},
|
|
84
|
-
): Promise<ContentObjectItem<T>[]> {
|
|
86
|
+
list<T = unknown>(payload: ObjectSearchPayload = {}): Promise<ContentObjectItem<T>[]> {
|
|
85
87
|
const limit = payload.limit || 100;
|
|
86
88
|
const offset = payload.offset || 0;
|
|
87
89
|
const query = payload.query || ({} as ObjectSearchQuery);
|
|
88
90
|
|
|
89
|
-
return this.get(
|
|
91
|
+
return this.get('/', {
|
|
90
92
|
query: {
|
|
91
93
|
limit,
|
|
92
94
|
offset,
|
|
@@ -98,35 +100,33 @@ export class ObjectsApi extends ApiTopic {
|
|
|
98
100
|
});
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
computeFacets(
|
|
102
|
-
|
|
103
|
-
): Promise<ComputedFacetResponse> {
|
|
104
|
-
return this.post("/facets", {
|
|
103
|
+
computeFacets(query: ComputeObjectFacetPayload): Promise<ComputedFacetResponse> {
|
|
104
|
+
return this.post('/facets', {
|
|
105
105
|
payload: query,
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
listFolders(_path: string =
|
|
110
|
-
throw new Error(
|
|
109
|
+
listFolders(_path: string = '/') {
|
|
110
|
+
throw new Error('Not implemented yet');
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/** Find object based on query */
|
|
114
114
|
find(payload: FindPayload): Promise<ContentObject[]> {
|
|
115
|
-
return this.post(
|
|
115
|
+
return this.post('/find', {
|
|
116
116
|
payload,
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/** Count number of objects matching this query */
|
|
121
121
|
count(payload: FindPayload): Promise<{ count: number }> {
|
|
122
|
-
return this.post(
|
|
122
|
+
return this.post('/count', {
|
|
123
123
|
payload,
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/** Search object — different from find because allow full text search */
|
|
128
128
|
search(payload: ComplexSearchPayload): Promise<ObjectSearchResponse> {
|
|
129
|
-
return this.post(
|
|
129
|
+
return this.post('/search', {
|
|
130
130
|
payload,
|
|
131
131
|
});
|
|
132
132
|
}
|
|
@@ -154,48 +154,24 @@ export class ObjectsApi extends ApiTopic {
|
|
|
154
154
|
const sourceMimeType = source.type || mime_type;
|
|
155
155
|
|
|
156
156
|
// upload the file content to the signed URL
|
|
157
|
-
|
|
157
|
+
const res = await fetchSignedUrl(url, {
|
|
158
158
|
method: 'PUT',
|
|
159
|
-
//@ts-ignore: duplex is not in the types. See https://github.com/node-fetch/node-fetch/issues/1769
|
|
160
|
-
duplex: isStream ? "half" : undefined,
|
|
161
|
-
body: isStream ? source.stream : source,
|
|
162
|
-
headers: {
|
|
163
|
-
'Content-Type': mime_type || 'application/octet-stream'
|
|
164
|
-
}
|
|
165
|
-
}).then((res: Response) => {
|
|
166
|
-
if (res.ok) {
|
|
167
|
-
return res;
|
|
168
|
-
} else {
|
|
169
|
-
console.log(res);
|
|
170
|
-
throw new Error(`Failed to upload file: ${res.statusText}`);
|
|
171
|
-
}
|
|
172
|
-
});*/
|
|
173
|
-
|
|
174
|
-
const res = await fetch(url, {
|
|
175
|
-
method: "PUT",
|
|
176
159
|
body: isStream ? source.stream : source,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
throw new Error(`Failed to upload file: ${res.statusText}`);
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
.catch((err) => {
|
|
190
|
-
console.error("Failed to upload file", err);
|
|
191
|
-
throw err;
|
|
192
|
-
});
|
|
160
|
+
headers: sourceMimeType ? { 'Content-Type': sourceMimeType } : undefined,
|
|
161
|
+
}).catch((err) => {
|
|
162
|
+
console.error('Failed to upload file', err);
|
|
163
|
+
throw err;
|
|
164
|
+
});
|
|
165
|
+
if (!res.ok) {
|
|
166
|
+
console.error('Failed to upload file', { status: res.status, statusText: res.statusText, url });
|
|
167
|
+
throw new Error(`Failed to upload file: ${res.statusText}`);
|
|
168
|
+
}
|
|
193
169
|
|
|
194
170
|
//Etag need to be unquoted
|
|
195
171
|
//When a server returns an ETag header, it includes the quotes around the actual hash value.
|
|
196
172
|
//This is part of the HTTP specification (RFC 7232), which states that ETags should be
|
|
197
173
|
//enclosed in double quotes.
|
|
198
|
-
const etag = res.headers.get(
|
|
174
|
+
const etag = res.headers.get('etag')?.replace(/^"(.*)"$/, '$1');
|
|
199
175
|
|
|
200
176
|
return {
|
|
201
177
|
source: id,
|
|
@@ -206,20 +182,20 @@ export class ObjectsApi extends ApiTopic {
|
|
|
206
182
|
}
|
|
207
183
|
|
|
208
184
|
async create(
|
|
209
|
-
payload:
|
|
185
|
+
payload: ContentObjectWritePayload,
|
|
210
186
|
options?: {
|
|
211
187
|
collection_id?: string;
|
|
212
188
|
processing_priority?: ContentObjectProcessingPriority;
|
|
213
189
|
},
|
|
214
190
|
): Promise<ContentObject> {
|
|
191
|
+
const { content, ...payloadWithoutContent } = payload;
|
|
215
192
|
const createPayload: CreateContentObjectPayload = {
|
|
216
|
-
...
|
|
193
|
+
...payloadWithoutContent,
|
|
217
194
|
};
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
createPayload.content = await this.upload(payload.content);
|
|
195
|
+
if (content instanceof StreamSource || content instanceof File) {
|
|
196
|
+
createPayload.content = await this.upload(content);
|
|
197
|
+
} else {
|
|
198
|
+
createPayload.content = content;
|
|
223
199
|
}
|
|
224
200
|
|
|
225
201
|
const headers: Record<string, string> = {};
|
|
@@ -230,7 +206,7 @@ export class ObjectsApi extends ApiTopic {
|
|
|
230
206
|
headers[ContentObjectApiHeaders.COLLECTION_ID] = options.collection_id;
|
|
231
207
|
}
|
|
232
208
|
|
|
233
|
-
return await this.post(
|
|
209
|
+
return await this.post('/', {
|
|
234
210
|
payload: createPayload,
|
|
235
211
|
headers: headers,
|
|
236
212
|
});
|
|
@@ -253,9 +229,7 @@ export class ObjectsApi extends ApiTopic {
|
|
|
253
229
|
processing_priority?: ContentObjectProcessingPriority;
|
|
254
230
|
},
|
|
255
231
|
): Promise<ContentObject> {
|
|
256
|
-
const metadata = await this.client.files.getMetadata(
|
|
257
|
-
uri,
|
|
258
|
-
);
|
|
232
|
+
const metadata = await this.client.files.getMetadata(uri);
|
|
259
233
|
const createPayload: CreateContentObjectPayload = {
|
|
260
234
|
...payload,
|
|
261
235
|
content: {
|
|
@@ -274,7 +248,7 @@ export class ObjectsApi extends ApiTopic {
|
|
|
274
248
|
headers[ContentObjectApiHeaders.COLLECTION_ID] = options.collection_id;
|
|
275
249
|
}
|
|
276
250
|
|
|
277
|
-
return await this.post(
|
|
251
|
+
return await this.post('/', {
|
|
278
252
|
payload: createPayload,
|
|
279
253
|
headers: headers,
|
|
280
254
|
});
|
|
@@ -294,7 +268,7 @@ export class ObjectsApi extends ApiTopic {
|
|
|
294
268
|
*/
|
|
295
269
|
async update(
|
|
296
270
|
id: string,
|
|
297
|
-
payload: Partial<
|
|
271
|
+
payload: Partial<ContentObjectWritePayload>,
|
|
298
272
|
options?: {
|
|
299
273
|
createRevision?: boolean;
|
|
300
274
|
revisionLabel?: string;
|
|
@@ -304,16 +278,16 @@ export class ObjectsApi extends ApiTopic {
|
|
|
304
278
|
ifMatch?: string;
|
|
305
279
|
},
|
|
306
280
|
): Promise<ContentObject> {
|
|
281
|
+
const { content, ...payloadWithoutContent } = payload;
|
|
307
282
|
const updatePayload: Partial<CreateContentObjectPayload> = {
|
|
308
|
-
...
|
|
283
|
+
...payloadWithoutContent,
|
|
309
284
|
};
|
|
310
285
|
|
|
311
286
|
// Handle file upload if content is provided as File or StreamSource
|
|
312
|
-
if (
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
updatePayload.content = await this.upload(payload.content);
|
|
287
|
+
if (content instanceof StreamSource || content instanceof File) {
|
|
288
|
+
updatePayload.content = await this.upload(content);
|
|
289
|
+
} else {
|
|
290
|
+
updatePayload.content = content;
|
|
317
291
|
}
|
|
318
292
|
|
|
319
293
|
const headers: Record<string, string> = {};
|
|
@@ -324,13 +298,13 @@ export class ObjectsApi extends ApiTopic {
|
|
|
324
298
|
headers[ContentObjectApiHeaders.PROCESSING_PRIORITY] = options.processing_priority;
|
|
325
299
|
}
|
|
326
300
|
if (options?.createRevision) {
|
|
327
|
-
headers[ContentObjectApiHeaders.CREATE_REVISION] =
|
|
301
|
+
headers[ContentObjectApiHeaders.CREATE_REVISION] = 'true';
|
|
328
302
|
if (options.revisionLabel) {
|
|
329
303
|
headers[ContentObjectApiHeaders.REVISION_LABEL] = options.revisionLabel;
|
|
330
304
|
}
|
|
331
305
|
}
|
|
332
306
|
if (options?.suppressWorkflows) {
|
|
333
|
-
headers[ContentObjectApiHeaders.SUPPRESS_WORKFLOWS] =
|
|
307
|
+
headers[ContentObjectApiHeaders.SUPPRESS_WORKFLOWS] = 'true';
|
|
334
308
|
}
|
|
335
309
|
|
|
336
310
|
return this.put(`/${id}`, {
|
|
@@ -366,13 +340,13 @@ export class ObjectsApi extends ApiTopic {
|
|
|
366
340
|
return this.client.runOperation({
|
|
367
341
|
name: 'delete',
|
|
368
342
|
ids: idOrIds,
|
|
369
|
-
params: {}
|
|
343
|
+
params: {},
|
|
370
344
|
}) as Promise<BulkObjectDeleteResult>;
|
|
371
345
|
}
|
|
372
346
|
return this.del(`/${idOrIds}`);
|
|
373
347
|
}
|
|
374
348
|
|
|
375
|
-
bulkUpdate(updates: Record<string, Record<string,
|
|
349
|
+
bulkUpdate(updates: Record<string, Record<string, unknown>>): Promise<BulkObjectUpdateResult> {
|
|
376
350
|
const ids = Object.keys(updates);
|
|
377
351
|
return this.client.runOperation({
|
|
378
352
|
name: 'update',
|
|
@@ -381,10 +355,14 @@ export class ObjectsApi extends ApiTopic {
|
|
|
381
355
|
}) as Promise<BulkObjectUpdateResult>;
|
|
382
356
|
}
|
|
383
357
|
|
|
384
|
-
bulkCreate(
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
358
|
+
bulkCreate(
|
|
359
|
+
objects: CreateContentObjectPayload[],
|
|
360
|
+
options?: {
|
|
361
|
+
collection_id?: string;
|
|
362
|
+
skip_workflows?: boolean;
|
|
363
|
+
processing_priority?: ContentObjectProcessingPriority;
|
|
364
|
+
},
|
|
365
|
+
): Promise<BulkObjectCreateResult> {
|
|
388
366
|
return this.client.runOperation({
|
|
389
367
|
name: 'create',
|
|
390
368
|
ids: [],
|
|
@@ -400,10 +378,7 @@ export class ObjectsApi extends ApiTopic {
|
|
|
400
378
|
return this.get(`/${documentId}/renditions`);
|
|
401
379
|
}
|
|
402
380
|
|
|
403
|
-
getRendition(
|
|
404
|
-
documentId: string,
|
|
405
|
-
options: GetRenditionParams,
|
|
406
|
-
): Promise<GetRenditionResponse> {
|
|
381
|
+
getRendition(documentId: string, options: GetRenditionParams): Promise<GetRenditionResponse> {
|
|
407
382
|
const query = {
|
|
408
383
|
max_hw: options.max_hw,
|
|
409
384
|
generate_if_missing: options.generate_if_missing,
|
|
@@ -445,19 +420,13 @@ export class ObjectsApi extends ApiTopic {
|
|
|
445
420
|
return this.getRendition(documentId, options);
|
|
446
421
|
}
|
|
447
422
|
|
|
448
|
-
exportProperties(
|
|
449
|
-
|
|
450
|
-
): Promise<ExportPropertiesResponse> {
|
|
451
|
-
return this.post("/export", {
|
|
423
|
+
exportProperties(payload: ExportPropertiesPayload): Promise<ExportPropertiesResponse> {
|
|
424
|
+
return this.post('/export', {
|
|
452
425
|
payload,
|
|
453
426
|
});
|
|
454
427
|
}
|
|
455
428
|
|
|
456
|
-
setEmbedding(
|
|
457
|
-
id: string,
|
|
458
|
-
type: SupportedEmbeddingTypes,
|
|
459
|
-
payload: Embedding,
|
|
460
|
-
): Promise<SetObjectEmbeddingsResponse> {
|
|
429
|
+
setEmbedding(id: string, type: SupportedEmbeddingTypes, payload: Embedding): Promise<SetObjectEmbeddingsResponse> {
|
|
461
430
|
return this.put(`/${id}/embeddings/${type}`, {
|
|
462
431
|
payload,
|
|
463
432
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
2
|
-
import { ListPendingAsksResponse, PendingAskData, UserChannel } from
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type { ListPendingAsksResponse, PendingAskData, TaskField, UserChannel } from '@vertesia/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Request to register a pending ask.
|
|
@@ -17,6 +17,8 @@ export interface RegisterPendingAskRequest {
|
|
|
17
17
|
timeoutHours?: number;
|
|
18
18
|
/** User communication channels */
|
|
19
19
|
userChannels: UserChannel[];
|
|
20
|
+
/** Durable task fields shown in task inbox */
|
|
21
|
+
taskFields?: TaskField[];
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
/**
|
|
@@ -61,7 +63,7 @@ export interface ResolvePendingAskResponse {
|
|
|
61
63
|
*/
|
|
62
64
|
export class PendingAsksApi extends ApiTopic {
|
|
63
65
|
constructor(parent: ClientBase) {
|
|
64
|
-
super(parent,
|
|
66
|
+
super(parent, '/api/v1/pending-asks');
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
/**
|
|
@@ -70,7 +72,7 @@ export class PendingAsksApi extends ApiTopic {
|
|
|
70
72
|
* Stores in Redis and sends webhook if configured.
|
|
71
73
|
*/
|
|
72
74
|
register(request: RegisterPendingAskRequest): Promise<RegisterPendingAskResponse> {
|
|
73
|
-
return this.post(
|
|
75
|
+
return this.post('/', { payload: request });
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
/**
|
|
@@ -86,7 +88,7 @@ export class PendingAsksApi extends ApiTopic {
|
|
|
86
88
|
* List all pending asks for the current project.
|
|
87
89
|
*/
|
|
88
90
|
list(): Promise<ListPendingAsksResponse> {
|
|
89
|
-
return this.get(
|
|
91
|
+
return this.get('/');
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
|
+
CreateProcessDefinitionPayload,
|
|
4
|
+
ProcessDefinition,
|
|
5
|
+
PublishProcessDefinitionPayload,
|
|
6
|
+
RevertProcessDefinitionPayload,
|
|
7
|
+
UpdateProcessDefinitionPayload,
|
|
8
|
+
} from '@vertesia/common';
|
|
9
|
+
|
|
10
|
+
export interface ListProcessDefinitionsQuery {
|
|
11
|
+
status?: string;
|
|
12
|
+
process?: string;
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
/** Include every revision/version instead of only the latest head revision. */
|
|
16
|
+
allVersions?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class ProcessApi extends ApiTopic {
|
|
20
|
+
constructor(parent: ClientBase) {
|
|
21
|
+
super(parent, '/api/v1/processes');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
list(query?: ListProcessDefinitionsQuery): Promise<ProcessDefinition[]> {
|
|
25
|
+
const params: Record<string, string> = {};
|
|
26
|
+
if (query?.status) params.status = query.status;
|
|
27
|
+
if (query?.process) params.process = query.process;
|
|
28
|
+
if (query?.limit != null) params.limit = String(query.limit);
|
|
29
|
+
if (query?.offset != null) params.offset = String(query.offset);
|
|
30
|
+
if (query?.allVersions) params.all_versions = 'true';
|
|
31
|
+
return this.get('/', { query: params });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
retrieve(id: string): Promise<ProcessDefinition> {
|
|
35
|
+
return this.get(`/${id}`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
create(payload: CreateProcessDefinitionPayload): Promise<ProcessDefinition> {
|
|
39
|
+
return this.post('/', { payload });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
update(id: string, payload: UpdateProcessDefinitionPayload): Promise<ProcessDefinition> {
|
|
43
|
+
return this.put(`/${id}`, { payload });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
listVersions(id: string): Promise<ProcessDefinition[]> {
|
|
47
|
+
return this.get(`/${id}/versions`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
publish(id: string, payload: PublishProcessDefinitionPayload): Promise<ProcessDefinition> {
|
|
51
|
+
return this.post(`/${id}/publish`, { payload });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
revert(id: string, payload: RevertProcessDefinitionPayload): Promise<ProcessDefinition> {
|
|
55
|
+
return this.post(`/${id}/revert`, { payload });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
delete(id: string): Promise<{ id: string; count: number }> {
|
|
59
|
+
return this.del(`/${id}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/src/store/QueryApi.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Query payload for agent data access
|
|
@@ -47,8 +47,7 @@ export interface QueryResult {
|
|
|
47
47
|
* All queries are automatically filtered based on the authenticated user's permissions.
|
|
48
48
|
*/
|
|
49
49
|
export class QueryApi extends ApiTopic {
|
|
50
|
-
|
|
51
|
-
constructor(parent: ClientBase, basePath: string = "/api/v1/query") {
|
|
50
|
+
constructor(parent: ClientBase, basePath: string = '/api/v1/query') {
|
|
52
51
|
super(parent, basePath);
|
|
53
52
|
}
|
|
54
53
|
|
|
@@ -84,7 +83,7 @@ export class QueryApi extends ApiTopic {
|
|
|
84
83
|
* ```
|
|
85
84
|
*/
|
|
86
85
|
async execute(payload: QueryPayload): Promise<QueryResult> {
|
|
87
|
-
return this.post(
|
|
86
|
+
return this.post('/', { payload });
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
2
|
import {
|
|
3
3
|
isWorkflowTerminalStatus,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
type RenderMarkdownPayload,
|
|
5
|
+
type RenderMarkdownPollOptions,
|
|
6
|
+
type RenderMarkdownResponse,
|
|
7
|
+
type RenderMarkdownStartResponse,
|
|
8
|
+
type RenderMarkdownStatusResponse,
|
|
9
9
|
WorkflowExecutionStatus,
|
|
10
|
-
} from
|
|
10
|
+
} from '@vertesia/common';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* API for rendering markdown documents to PDF or DOCX.
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
*/
|
|
16
16
|
export class RenderingApi extends ApiTopic {
|
|
17
17
|
constructor(parent: ClientBase) {
|
|
18
|
-
super(parent,
|
|
18
|
+
super(parent, '/api/v1/rendering');
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -41,14 +41,11 @@ export class RenderingApi extends ApiTopic {
|
|
|
41
41
|
* });
|
|
42
42
|
*/
|
|
43
43
|
start(payload: RenderMarkdownPayload): Promise<RenderMarkdownStartResponse> {
|
|
44
|
-
return this.post(
|
|
44
|
+
return this.post('/jobs', { payload });
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
getStatus(
|
|
48
|
-
|
|
49
|
-
workflowRunId: string,
|
|
50
|
-
): Promise<RenderMarkdownStatusResponse> {
|
|
51
|
-
return this.get("/jobs/status", {
|
|
47
|
+
getStatus(workflowId: string, workflowRunId: string): Promise<RenderMarkdownStatusResponse> {
|
|
48
|
+
return this.get('/jobs/status', {
|
|
52
49
|
query: {
|
|
53
50
|
workflow_id: workflowId,
|
|
54
51
|
workflow_run_id: workflowRunId,
|
|
@@ -65,7 +62,7 @@ export class RenderingApi extends ApiTopic {
|
|
|
65
62
|
|
|
66
63
|
const started = await this.start(payload);
|
|
67
64
|
if (!started.workflow_id || !started.workflow_run_id) {
|
|
68
|
-
throw new Error(
|
|
65
|
+
throw new Error('Failed to start rendering workflow');
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
const startTime = Date.now();
|
|
@@ -76,10 +73,10 @@ export class RenderingApi extends ApiTopic {
|
|
|
76
73
|
|
|
77
74
|
if (status.status === WorkflowExecutionStatus.COMPLETED) {
|
|
78
75
|
if (!status.download_url && !status.file_uri) {
|
|
79
|
-
throw new Error(status.error ||
|
|
76
|
+
throw new Error(status.error || 'Rendering completed but no output file was produced');
|
|
80
77
|
}
|
|
81
78
|
return {
|
|
82
|
-
status:
|
|
79
|
+
status: 'success',
|
|
83
80
|
format: payload.format,
|
|
84
81
|
download_url: status.download_url,
|
|
85
82
|
file_uri: status.file_uri,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
2
|
-
import {
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
3
|
AgentSchedule,
|
|
4
4
|
AgentScheduleWithTemporalInfo,
|
|
5
5
|
CreateSchedulePayload,
|
|
6
6
|
ScheduleListItem,
|
|
7
7
|
UpdateSchedulePayload,
|
|
8
|
-
} from
|
|
8
|
+
} from '@vertesia/common';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Client API for managing agent schedules.
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
*/
|
|
15
15
|
export class SchedulesApi extends ApiTopic {
|
|
16
16
|
constructor(parent: ClientBase) {
|
|
17
|
-
super(parent,
|
|
17
|
+
super(parent, '/api/v1/schedules');
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* List all schedules in the project.
|
|
22
22
|
*/
|
|
23
23
|
list(): Promise<ScheduleListItem[]> {
|
|
24
|
-
return this.get(
|
|
24
|
+
return this.get('/');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -50,7 +50,7 @@ export class SchedulesApi extends ApiTopic {
|
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
52
|
create(payload: CreateSchedulePayload): Promise<AgentSchedule> {
|
|
53
|
-
return this.post(
|
|
53
|
+
return this.post('/', { payload });
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|