@vertesia/client 1.2.0 → 1.4.0-dev.20260614.160504Z
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/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 +51 -0
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/IamApi.js +67 -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} +8 -7
- package/lib/RunsApi.d.ts.map +1 -0
- package/lib/{esm/RunsApi.js → RunsApi.js} +11 -11
- 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} +42 -27
- package/lib/client.d.ts.map +1 -0
- package/lib/{esm/client.js → client.js} +90 -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} +13 -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 +55 -8
- package/lib/store/AgentsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AgentsApi.js +155 -47
- 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 +44 -46
- package/lib/store/WorkflowsApi.js.map +1 -0
- package/lib/store/client.d.ts +59 -0
- package/lib/store/client.d.ts.map +1 -0
- package/lib/{esm/store → store}/client.js +32 -29
- 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 +20 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +20 -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 +1 -0
- package/lib/store/version.d.ts.map +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 +25 -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 +46 -23
- 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 +22 -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 +130 -103
- package/src/execute.ts +41 -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 +285 -143
- 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 +140 -146
- package/src/store/client.ts +44 -39
- package/src/store/errors.ts +3 -3
- package/src/store/index.ts +19 -18
- package/src/store/signed-url.test.ts +182 -0
- package/src/store/signed-url.ts +184 -0
- package/src/store/stream-termination.test.ts +58 -0
- package/src/store/stream-termination.ts +40 -0
- package/src/store/version.ts +1 -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.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/lib/{esm/store → store}/version.js +0 -0
package/src/GroupsApi.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
|
+
CreateUserGroupPayload,
|
|
4
|
+
DeleteByIdResult,
|
|
5
|
+
UpdateUserGroupPayload,
|
|
6
|
+
UserGroup,
|
|
7
|
+
UserRef,
|
|
8
|
+
} from '@vertesia/common';
|
|
3
9
|
|
|
4
10
|
export interface GroupsQueryOptions {
|
|
5
11
|
search?: string;
|
|
@@ -10,9 +16,8 @@ export interface GroupsQueryOptions {
|
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
export class GroupsApi extends ApiTopic {
|
|
13
|
-
|
|
14
19
|
constructor(parent: ClientBase) {
|
|
15
|
-
super(parent,
|
|
20
|
+
super(parent, '/groups');
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
/**
|
|
@@ -39,7 +44,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
39
44
|
* @returns The UserGroup object
|
|
40
45
|
*/
|
|
41
46
|
retrieve(groupId: string): Promise<UserGroup> {
|
|
42
|
-
return this.get(
|
|
47
|
+
return this.get(`/${groupId}`);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/**
|
|
@@ -49,7 +54,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
49
54
|
* @returns The updated UserGroup object
|
|
50
55
|
*/
|
|
51
56
|
update(groupId: string, payload: UpdateUserGroupPayload): Promise<UserGroup> {
|
|
52
|
-
return this.put(
|
|
57
|
+
return this.put(`/${groupId}`, { payload });
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
/**
|
|
@@ -58,7 +63,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
58
63
|
* @returns Object with the deleted group ID
|
|
59
64
|
*/
|
|
60
65
|
delete(groupId: string): Promise<DeleteByIdResult> {
|
|
61
|
-
return this.del(
|
|
66
|
+
return this.del(`/${groupId}`);
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
/**
|
|
@@ -67,7 +72,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
67
72
|
* @returns Array of UserRef objects representing group members
|
|
68
73
|
*/
|
|
69
74
|
listMembers(groupId: string): Promise<UserRef[]> {
|
|
70
|
-
return this.get(
|
|
75
|
+
return this.get(`/${groupId}/members`);
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
/**
|
|
@@ -77,7 +82,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
77
82
|
* @returns The updated UserGroup object
|
|
78
83
|
*/
|
|
79
84
|
addMember(groupId: string, userId: string): Promise<UserGroup> {
|
|
80
|
-
return this.post(
|
|
85
|
+
return this.post(`/${groupId}/members/${userId}`);
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
/**
|
|
@@ -87,7 +92,7 @@ export class GroupsApi extends ApiTopic {
|
|
|
87
92
|
* @returns The updated UserGroup object
|
|
88
93
|
*/
|
|
89
94
|
removeMember(groupId: string, userId: string): Promise<UserGroup> {
|
|
90
|
-
return this.del(
|
|
95
|
+
return this.del(`/${groupId}/members/${userId}`);
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
/**
|
package/src/IamApi.ts
CHANGED
|
@@ -1,43 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type {
|
|
3
|
+
ACECreatePayload,
|
|
4
|
+
ACEUpdatePayload,
|
|
5
|
+
AccessControlEntry,
|
|
6
|
+
AcesQueryOptions,
|
|
7
|
+
DeleteByIdResult,
|
|
8
|
+
PrincipalIdentity,
|
|
9
|
+
RoleDefinition,
|
|
10
|
+
} from '@vertesia/common';
|
|
11
|
+
import { GroupsApi } from './GroupsApi.js';
|
|
5
12
|
|
|
6
13
|
export interface FilterOption {
|
|
7
|
-
id: string
|
|
8
|
-
name: string
|
|
9
|
-
count: number
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
count: number;
|
|
10
17
|
}
|
|
11
18
|
|
|
12
|
-
|
|
13
19
|
export class IamApi extends ApiTopic {
|
|
14
|
-
|
|
15
20
|
constructor(parent: ClientBase) {
|
|
16
|
-
super(parent,
|
|
21
|
+
super(parent, '/api/v1/iam');
|
|
17
22
|
}
|
|
18
23
|
|
|
19
|
-
aces = new AcesApi(this)
|
|
20
|
-
roles = new RolesApi(this)
|
|
21
|
-
groups = new GroupsApi(this)
|
|
24
|
+
aces = new AcesApi(this);
|
|
25
|
+
roles = new RolesApi(this);
|
|
26
|
+
groups = new GroupsApi(this);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the current user's principal identity — the id plus the merged
|
|
30
|
+
* ABAC principal context (clearance, compartments, email, tags, properties).
|
|
31
|
+
*
|
|
32
|
+
* Rejects with HTTP 400 if the caller is not a user principal
|
|
33
|
+
* (API keys, service accounts, etc. — they have no underlying user context).
|
|
34
|
+
*/
|
|
35
|
+
getPrincipalIdentity(): Promise<PrincipalIdentity> {
|
|
36
|
+
return this.get('/users/identity');
|
|
37
|
+
}
|
|
22
38
|
}
|
|
23
39
|
|
|
24
40
|
export class RolesApi extends ApiTopic {
|
|
25
|
-
|
|
26
41
|
constructor(parent: ClientBase) {
|
|
27
|
-
super(parent,
|
|
42
|
+
super(parent, '/roles');
|
|
28
43
|
}
|
|
29
44
|
|
|
30
45
|
list(): Promise<RoleDefinition[]> {
|
|
31
46
|
return this.get('/');
|
|
32
47
|
}
|
|
33
|
-
|
|
34
48
|
}
|
|
35
49
|
|
|
36
|
-
|
|
37
50
|
export class AcesApi extends ApiTopic {
|
|
38
|
-
|
|
39
51
|
constructor(parent: ClientBase) {
|
|
40
|
-
super(parent,
|
|
52
|
+
super(parent, '/aces');
|
|
41
53
|
}
|
|
42
54
|
|
|
43
55
|
/**
|
|
@@ -50,21 +62,32 @@ export class AcesApi extends ApiTopic {
|
|
|
50
62
|
return this.get('/', { query: { ...options } });
|
|
51
63
|
}
|
|
52
64
|
|
|
65
|
+
/**
|
|
66
|
+
* List all ACEs scoped to the current project.
|
|
67
|
+
* Returns both regular project ACEs and dynamic (content_set/principal_set) ACEs.
|
|
68
|
+
*/
|
|
69
|
+
listProjectAces(): Promise<AccessControlEntry[]> {
|
|
70
|
+
return this.get('/project');
|
|
71
|
+
}
|
|
72
|
+
|
|
53
73
|
/**
|
|
54
74
|
* Get an ACE by its Id
|
|
55
75
|
* @param id
|
|
56
76
|
* @returns InteractionResult
|
|
57
77
|
**/
|
|
58
78
|
retrieve(id: string): Promise<AccessControlEntry> {
|
|
59
|
-
return this.get(
|
|
79
|
+
return this.get(`/${id}`);
|
|
60
80
|
}
|
|
61
81
|
|
|
62
82
|
create(payload: ACECreatePayload): Promise<AccessControlEntry> {
|
|
63
|
-
return this.post('/', { payload })
|
|
83
|
+
return this.post('/', { payload });
|
|
64
84
|
}
|
|
65
85
|
|
|
66
|
-
|
|
67
|
-
return this.
|
|
86
|
+
update(id: string, payload: ACEUpdatePayload): Promise<AccessControlEntry> {
|
|
87
|
+
return this.put(`/${id}`, { payload });
|
|
68
88
|
}
|
|
69
89
|
|
|
90
|
+
delete(id: string): Promise<DeleteByIdResult> {
|
|
91
|
+
return this.del(`/${id}`);
|
|
92
|
+
}
|
|
70
93
|
}
|
package/src/InteractionBase.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type {
|
|
2
|
+
InteractionExecutionPayload,
|
|
3
|
+
InteractionExecutionResult,
|
|
4
|
+
InteractionUpdatePayload,
|
|
5
|
+
} from '@vertesia/common';
|
|
6
|
+
import { VertesiaClient, type VertesiaClientProps } from './client.js';
|
|
7
|
+
import { executeInteraction } from './execute.js';
|
|
4
8
|
|
|
5
|
-
export class InteractionBase<P =
|
|
9
|
+
export class InteractionBase<P = unknown> {
|
|
6
10
|
client: VertesiaClient;
|
|
7
11
|
|
|
8
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
public id: string,
|
|
14
|
+
clientOrOpts: VertesiaClient | VertesiaClientProps,
|
|
15
|
+
) {
|
|
9
16
|
if (clientOrOpts instanceof VertesiaClient) {
|
|
10
17
|
this.client = clientOrOpts;
|
|
11
18
|
} else {
|
|
@@ -23,7 +30,7 @@ export class InteractionBase<P = any> {
|
|
|
23
30
|
|
|
24
31
|
//TODO - Not implemented
|
|
25
32
|
render(_data: P) {
|
|
26
|
-
throw new Error(
|
|
33
|
+
throw new Error('Not implemented');
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
@@ -35,10 +42,12 @@ export class InteractionBase<P = any> {
|
|
|
35
42
|
* @param id of the interaction to execute
|
|
36
43
|
* @param payload InteractionExecutionPayload
|
|
37
44
|
* @param onChunk callback to be called when the next chunk of the response is available
|
|
38
|
-
* @returns the resolved execution
|
|
45
|
+
* @returns the resolved interaction execution result
|
|
39
46
|
*/
|
|
40
|
-
async execute(
|
|
41
|
-
|
|
47
|
+
async execute(
|
|
48
|
+
payload: InteractionExecutionPayload = {},
|
|
49
|
+
onChunk?: (chunk: string) => void,
|
|
50
|
+
): Promise<InteractionExecutionResult<P>> {
|
|
42
51
|
return executeInteraction<P>(this.client, this.id, payload, onChunk);
|
|
43
52
|
}
|
|
44
53
|
}
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
2
|
-
import {
|
|
3
|
-
CatalogInteractionRef,
|
|
4
|
-
InCodeInteraction,
|
|
5
|
-
InteractionStatus
|
|
6
|
-
} from "@vertesia/common";
|
|
7
|
-
|
|
1
|
+
import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
|
|
2
|
+
import type { CatalogInteractionRef, InCodeInteraction, InteractionStatus } from '@vertesia/common';
|
|
8
3
|
|
|
9
4
|
export class InteractionCatalogApi extends ApiTopic {
|
|
10
5
|
constructor(parent: ClientBase) {
|
|
11
|
-
super(parent,
|
|
6
|
+
super(parent, '/api/v1/interactions/catalog');
|
|
12
7
|
}
|
|
13
8
|
|
|
14
9
|
/**
|
|
15
10
|
* List all project interactions
|
|
16
11
|
*/
|
|
17
|
-
list(query: { status?: InteractionStatus
|
|
18
|
-
return this.get(
|
|
19
|
-
query
|
|
12
|
+
list(query: { status?: InteractionStatus; tag?: string } = {}): Promise<CatalogInteractionRef[]> {
|
|
13
|
+
return this.get('/', {
|
|
14
|
+
query,
|
|
20
15
|
});
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
/**
|
|
24
19
|
* List all stored interactions
|
|
25
20
|
*/
|
|
26
|
-
listStoredInteractions(query: { status?: InteractionStatus
|
|
27
|
-
return this.get(
|
|
28
|
-
query
|
|
21
|
+
listStoredInteractions(query: { status?: InteractionStatus; tag?: string } = {}): Promise<CatalogInteractionRef[]> {
|
|
22
|
+
return this.get('/stored', {
|
|
23
|
+
query,
|
|
29
24
|
});
|
|
30
25
|
}
|
|
31
26
|
|
|
@@ -35,8 +30,8 @@ export class InteractionCatalogApi extends ApiTopic {
|
|
|
35
30
|
listSysInteractions(tag?: string): Promise<CatalogInteractionRef[]> {
|
|
36
31
|
return this.get(`/sys`, {
|
|
37
32
|
query: {
|
|
38
|
-
tag
|
|
39
|
-
}
|
|
33
|
+
tag,
|
|
34
|
+
},
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
37
|
|
|
@@ -46,8 +41,8 @@ export class InteractionCatalogApi extends ApiTopic {
|
|
|
46
41
|
listAppInteractions(appName: string, tag?: string): Promise<CatalogInteractionRef[]> {
|
|
47
42
|
return this.get(`/apps/${appName}`, {
|
|
48
43
|
query: {
|
|
49
|
-
tag
|
|
50
|
-
}
|
|
44
|
+
tag,
|
|
45
|
+
},
|
|
51
46
|
});
|
|
52
47
|
}
|
|
53
48
|
|
|
@@ -57,8 +52,8 @@ export class InteractionCatalogApi extends ApiTopic {
|
|
|
57
52
|
listAllAppInteractions(tag?: string): Promise<CatalogInteractionRef[]> {
|
|
58
53
|
return this.get(`/apps`, {
|
|
59
54
|
query: {
|
|
60
|
-
tag
|
|
61
|
-
}
|
|
55
|
+
tag,
|
|
56
|
+
},
|
|
62
57
|
});
|
|
63
58
|
}
|
|
64
59
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompletionResult } from '@llumiverse/common';
|
|
1
|
+
import type { CompletionResult } from '@llumiverse/common';
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
3
|
import { InteractionOutput, IS_INTERACTION_OUTPUT } from './InteractionOutput.js';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ describe('InteractionOutput', () => {
|
|
|
9
9
|
{ type: 'json', value: { name: 'Alice', age: 30 } },
|
|
10
10
|
{ type: 'json', value: { title: 'Engineer', level: 'Senior' } },
|
|
11
11
|
{ type: 'image', value: 'data:image/png;base64,iVBORw0K...' },
|
|
12
|
-
{ type: 'image', value: 'https://example.com/image.jpg' }
|
|
12
|
+
{ type: 'image', value: 'https://example.com/image.jpg' },
|
|
13
13
|
];
|
|
14
14
|
|
|
15
15
|
describe('text accessors', () => {
|
|
@@ -19,9 +19,7 @@ describe('InteractionOutput', () => {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it('should return empty string when no text results exist', () => {
|
|
22
|
-
const output = InteractionOutput.from([
|
|
23
|
-
{ type: 'json', value: { foo: 'bar' } }
|
|
24
|
-
]);
|
|
22
|
+
const output = InteractionOutput.from([{ type: 'json', value: { foo: 'bar' } }]);
|
|
25
23
|
expect(output.text()).toBe('');
|
|
26
24
|
});
|
|
27
25
|
|
|
@@ -29,7 +27,6 @@ describe('InteractionOutput', () => {
|
|
|
29
27
|
const output = InteractionOutput.from(sampleResults);
|
|
30
28
|
expect(output.texts()).toEqual(['Hello, ', 'World!']);
|
|
31
29
|
});
|
|
32
|
-
|
|
33
30
|
});
|
|
34
31
|
|
|
35
32
|
describe('object accessors', () => {
|
|
@@ -44,28 +41,22 @@ describe('InteractionOutput', () => {
|
|
|
44
41
|
const objects = output.objects();
|
|
45
42
|
expect(objects).toEqual([
|
|
46
43
|
{ name: 'Alice', age: 30 },
|
|
47
|
-
{ title: 'Engineer', level: 'Senior' }
|
|
44
|
+
{ title: 'Engineer', level: 'Senior' },
|
|
48
45
|
]);
|
|
49
46
|
});
|
|
50
47
|
|
|
51
48
|
it('should parse text as JSON when no JSON result exists', () => {
|
|
52
|
-
const output = InteractionOutput.from([
|
|
53
|
-
{ type: 'text', value: '{"foo":"bar"}' }
|
|
54
|
-
]);
|
|
49
|
+
const output = InteractionOutput.from([{ type: 'text', value: '{"foo":"bar"}' }]);
|
|
55
50
|
expect(output.object()).toEqual({ foo: 'bar' });
|
|
56
51
|
});
|
|
57
52
|
|
|
58
53
|
it('should throw error when no JSON result and text is not valid JSON', () => {
|
|
59
|
-
const output = InteractionOutput.from([
|
|
60
|
-
{ type: 'text', value: 'not json' }
|
|
61
|
-
]);
|
|
54
|
+
const output = InteractionOutput.from([{ type: 'text', value: 'not json' }]);
|
|
62
55
|
expect(() => output.object()).toThrow();
|
|
63
56
|
});
|
|
64
57
|
|
|
65
58
|
it('should throw error when no JSON result and no text', () => {
|
|
66
|
-
const output = InteractionOutput.from([
|
|
67
|
-
{ type: 'image', value: 'data:image/png;base64,abc' }
|
|
68
|
-
]);
|
|
59
|
+
const output = InteractionOutput.from([{ type: 'image', value: 'data:image/png;base64,abc' }]);
|
|
69
60
|
expect(() => output.object()).toThrow('No JSON result found and no text available to parse');
|
|
70
61
|
});
|
|
71
62
|
});
|
|
@@ -78,19 +69,13 @@ describe('InteractionOutput', () => {
|
|
|
78
69
|
|
|
79
70
|
it('should return all images', () => {
|
|
80
71
|
const output = InteractionOutput.from(sampleResults);
|
|
81
|
-
expect(output.images()).toEqual([
|
|
82
|
-
'data:image/png;base64,iVBORw0K...',
|
|
83
|
-
'https://example.com/image.jpg'
|
|
84
|
-
]);
|
|
72
|
+
expect(output.images()).toEqual(['data:image/png;base64,iVBORw0K...', 'https://example.com/image.jpg']);
|
|
85
73
|
});
|
|
86
74
|
|
|
87
75
|
it('should throw error when no image result exists', () => {
|
|
88
|
-
const output = InteractionOutput.from([
|
|
89
|
-
{ type: 'text', value: 'hello' }
|
|
90
|
-
]);
|
|
76
|
+
const output = InteractionOutput.from([{ type: 'text', value: 'hello' }]);
|
|
91
77
|
expect(() => output.image()).toThrow('No image result found');
|
|
92
78
|
});
|
|
93
|
-
|
|
94
79
|
});
|
|
95
80
|
|
|
96
81
|
describe('utility methods', () => {
|
|
@@ -106,43 +91,37 @@ describe('InteractionOutput', () => {
|
|
|
106
91
|
|
|
107
92
|
it('should stringify all parts with default separator and compact JSON', () => {
|
|
108
93
|
const output = InteractionOutput.from(sampleResults);
|
|
109
|
-
const result = output.stringify('\n', 0);
|
|
94
|
+
const result = output.stringify('\n', 0); // Explicitly request compact JSON
|
|
110
95
|
|
|
111
96
|
expect(result).toBe(
|
|
112
97
|
'Hello, \n' +
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
98
|
+
'World!\n' +
|
|
99
|
+
'{"name":"Alice","age":30}\n' +
|
|
100
|
+
'{"title":"Engineer","level":"Senior"}\n' +
|
|
101
|
+
'data:image/png;base64,iVBORw0K...\n' +
|
|
102
|
+
'https://example.com/image.jpg',
|
|
118
103
|
);
|
|
119
104
|
});
|
|
120
105
|
|
|
121
106
|
it('should stringify all parts with formatted JSON', () => {
|
|
122
107
|
const mixed: CompletionResult[] = [
|
|
123
108
|
{ type: 'text', value: 'Result:' },
|
|
124
|
-
{ type: 'json', value: { score: 95, status: 'pass' } }
|
|
109
|
+
{ type: 'json', value: { score: 95, status: 'pass' } },
|
|
125
110
|
];
|
|
126
111
|
const output = InteractionOutput.from(mixed);
|
|
127
112
|
const result = output.stringify('\n', 2);
|
|
128
113
|
|
|
129
|
-
expect(result).toBe(
|
|
130
|
-
'Result:\n' +
|
|
131
|
-
'{\n' +
|
|
132
|
-
' "score": 95,\n' +
|
|
133
|
-
' "status": "pass"\n' +
|
|
134
|
-
'}'
|
|
135
|
-
);
|
|
114
|
+
expect(result).toBe('Result:\n' + '{\n' + ' "score": 95,\n' + ' "status": "pass"\n' + '}');
|
|
136
115
|
});
|
|
137
116
|
|
|
138
117
|
it('should stringify with custom separator', () => {
|
|
139
118
|
const mixed: CompletionResult[] = [
|
|
140
119
|
{ type: 'text', value: 'A' },
|
|
141
120
|
{ type: 'json', value: { x: 1 } },
|
|
142
|
-
{ type: 'text', value: 'B' }
|
|
121
|
+
{ type: 'text', value: 'B' },
|
|
143
122
|
];
|
|
144
123
|
const output = InteractionOutput.from(mixed);
|
|
145
|
-
const result = output.stringify(' | ', 0);
|
|
124
|
+
const result = output.stringify(' | ', 0); // Explicitly request compact JSON
|
|
146
125
|
|
|
147
126
|
expect(result).toBe('A | {"x":1} | B');
|
|
148
127
|
});
|
|
@@ -150,14 +129,13 @@ describe('InteractionOutput', () => {
|
|
|
150
129
|
it('should stringify with empty separator', () => {
|
|
151
130
|
const mixed: CompletionResult[] = [
|
|
152
131
|
{ type: 'text', value: 'Hello' },
|
|
153
|
-
{ type: 'text', value: 'World' }
|
|
132
|
+
{ type: 'text', value: 'World' },
|
|
154
133
|
];
|
|
155
134
|
const output = InteractionOutput.from(mixed);
|
|
156
135
|
const result = output.stringify('');
|
|
157
136
|
|
|
158
137
|
expect(result).toBe('HelloWorld');
|
|
159
138
|
});
|
|
160
|
-
|
|
161
139
|
});
|
|
162
140
|
|
|
163
141
|
describe('Proxy functionality', () => {
|
|
@@ -172,10 +150,10 @@ describe('InteractionOutput', () => {
|
|
|
172
150
|
expect(output.length).toBe(6);
|
|
173
151
|
|
|
174
152
|
// Array methods
|
|
175
|
-
const types = output.map(r => r.type);
|
|
153
|
+
const types = output.map((r) => r.type);
|
|
176
154
|
expect(types).toEqual(['text', 'text', 'json', 'json', 'image', 'image']);
|
|
177
155
|
|
|
178
|
-
const textResults = output.filter(r => r.type === 'text');
|
|
156
|
+
const textResults = output.filter((r) => r.type === 'text');
|
|
179
157
|
expect(textResults).toHaveLength(2);
|
|
180
158
|
});
|
|
181
159
|
|
|
@@ -190,9 +168,10 @@ describe('InteractionOutput', () => {
|
|
|
190
168
|
|
|
191
169
|
it('should be marked with IS_INTERACTION_OUTPUT symbol', () => {
|
|
192
170
|
const output = InteractionOutput.from(sampleResults);
|
|
171
|
+
const markedOutput = output as { [IS_INTERACTION_OUTPUT]?: boolean };
|
|
193
172
|
|
|
194
173
|
// Check that the symbol marker is present
|
|
195
|
-
expect(
|
|
174
|
+
expect(markedOutput[IS_INTERACTION_OUTPUT]).toBe(true);
|
|
196
175
|
});
|
|
197
176
|
|
|
198
177
|
it('should return the same instance when calling from() on an already wrapped array', () => {
|
|
@@ -249,7 +228,7 @@ describe('InteractionOutput', () => {
|
|
|
249
228
|
const mixed: CompletionResult[] = [
|
|
250
229
|
{ type: 'text', value: 'Start' },
|
|
251
230
|
{ type: 'json', value: { count: 5 } },
|
|
252
|
-
{ type: 'text', value: 'End' }
|
|
231
|
+
{ type: 'text', value: 'End' },
|
|
253
232
|
];
|
|
254
233
|
|
|
255
234
|
const output = InteractionOutput.from(mixed);
|
|
@@ -258,9 +237,7 @@ describe('InteractionOutput', () => {
|
|
|
258
237
|
});
|
|
259
238
|
|
|
260
239
|
it('should handle results with only one type', () => {
|
|
261
|
-
const textOnly: CompletionResult[] = [
|
|
262
|
-
{ type: 'text', value: 'Only text here' }
|
|
263
|
-
];
|
|
240
|
+
const textOnly: CompletionResult[] = [{ type: 'text', value: 'Only text here' }];
|
|
264
241
|
|
|
265
242
|
const output = InteractionOutput.from(textOnly);
|
|
266
243
|
expect(output.text()).toBe('Only text here');
|
|
@@ -271,11 +248,12 @@ describe('InteractionOutput', () => {
|
|
|
271
248
|
|
|
272
249
|
describe('Type safety with generics', () => {
|
|
273
250
|
it('should provide type safety with generic parameter', () => {
|
|
274
|
-
interface User {
|
|
251
|
+
interface User {
|
|
252
|
+
name: string;
|
|
253
|
+
age: number;
|
|
254
|
+
}
|
|
275
255
|
|
|
276
|
-
const results: CompletionResult[] = [
|
|
277
|
-
{ type: 'json', value: { name: 'Bob', age: 25 } }
|
|
278
|
-
];
|
|
256
|
+
const results: CompletionResult[] = [{ type: 'json', value: { name: 'Bob', age: 25 } }];
|
|
279
257
|
|
|
280
258
|
const output = InteractionOutput.from<User>(results);
|
|
281
259
|
const user = output.object(); // TypeScript knows this is User
|
|
@@ -284,14 +262,19 @@ describe('InteractionOutput', () => {
|
|
|
284
262
|
expect(user.age).toBe(25);
|
|
285
263
|
});
|
|
286
264
|
|
|
287
|
-
|
|
288
265
|
it('should allow type override at method level', () => {
|
|
289
|
-
interface Person {
|
|
290
|
-
|
|
266
|
+
interface Person {
|
|
267
|
+
name: string;
|
|
268
|
+
age: number;
|
|
269
|
+
}
|
|
270
|
+
interface Address {
|
|
271
|
+
street: string;
|
|
272
|
+
city: string;
|
|
273
|
+
}
|
|
291
274
|
|
|
292
275
|
const results: CompletionResult[] = [
|
|
293
276
|
{ type: 'json', value: { name: 'Alice', age: 30 } },
|
|
294
|
-
{ type: 'json', value: { street: '123 Main', city: 'NYC' } }
|
|
277
|
+
{ type: 'json', value: { street: '123 Main', city: 'NYC' } },
|
|
295
278
|
];
|
|
296
279
|
|
|
297
280
|
const output = InteractionOutput.from<Person>(results);
|