@vertesia/client 1.3.0 → 1.4.0-dev.20260615.042033Z
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/{types/IamApi.d.ts → IamApi.d.ts} +12 -3
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/{esm/IamApi.js → IamApi.js} +18 -8
- 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 +54 -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 +24 -37
- 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 +35 -24
- 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 +110 -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 -63
- 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 -311
- 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.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.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
|
@@ -1,58 +1,61 @@
|
|
|
1
|
-
import { ApiTopic, ClientBase } from
|
|
1
|
+
import { ApiTopic, type ClientBase, type IRequestParams } from '@vertesia/api-fetch-client';
|
|
2
2
|
import {
|
|
3
|
-
ActivityCatalog,
|
|
4
|
-
AgentEvent,
|
|
5
|
-
AgentMessage,
|
|
3
|
+
type ActivityCatalog,
|
|
4
|
+
type AgentEvent,
|
|
5
|
+
type AgentMessage,
|
|
6
6
|
AgentMessageType,
|
|
7
|
-
CompactMessage,
|
|
8
|
-
CreateWorkflowRulePayload,
|
|
9
|
-
DSLWorkflowDefinition,
|
|
10
|
-
DSLWorkflowSpec,
|
|
11
|
-
ErrorAnalyticsResponse,
|
|
12
|
-
ExecuteWorkflowPayload,
|
|
13
|
-
FirstResponseBehaviorAnalyticsResponse,
|
|
14
|
-
LatencyAnalyticsResponse,
|
|
15
|
-
ListWorkflowInteractionsResponse,
|
|
16
|
-
ListWorkflowRunsPayload,
|
|
17
|
-
ListWorkflowRunsResponse,
|
|
7
|
+
type CompactMessage,
|
|
8
|
+
type CreateWorkflowRulePayload,
|
|
9
|
+
type DSLWorkflowDefinition,
|
|
10
|
+
type DSLWorkflowSpec,
|
|
11
|
+
type ErrorAnalyticsResponse,
|
|
12
|
+
type ExecuteWorkflowPayload,
|
|
13
|
+
type FirstResponseBehaviorAnalyticsResponse,
|
|
14
|
+
type LatencyAnalyticsResponse,
|
|
15
|
+
type ListWorkflowInteractionsResponse,
|
|
16
|
+
type ListWorkflowRunsPayload,
|
|
17
|
+
type ListWorkflowRunsResponse,
|
|
18
|
+
type PromptSizeAnalyticsResponse,
|
|
18
19
|
parseMessage,
|
|
20
|
+
type RunsByAgentAnalyticsResponse,
|
|
21
|
+
type SignalAgentPayload,
|
|
22
|
+
type SignalAgentResponse,
|
|
23
|
+
type TimeToFirstResponseAnalyticsResponse,
|
|
24
|
+
type TokenUsageAnalyticsResponse,
|
|
25
|
+
type ToolAnalyticsResponse,
|
|
26
|
+
type ToolParameterAnalyticsResponse,
|
|
27
|
+
type TopPrincipalsAnalyticsResponse,
|
|
19
28
|
toAgentMessage,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
WorkflowRunWithDetails,
|
|
43
|
-
WorkflowToolParametersQuery,
|
|
44
|
-
WorkflowUpdatePublishResponse,
|
|
45
|
-
} from "@vertesia/common";
|
|
46
|
-
import { VertesiaClient } from "../client.js";
|
|
47
|
-
import { EventSourceProvider } from "../execute.js";
|
|
29
|
+
type UploadWorkflowRulePayload,
|
|
30
|
+
type WebSocketClientMessage,
|
|
31
|
+
type WebSocketServerMessage,
|
|
32
|
+
type WorkflowActionPayload,
|
|
33
|
+
type WorkflowActionResponse,
|
|
34
|
+
type WorkflowAnalyticsFilterOptionsResponse,
|
|
35
|
+
type WorkflowAnalyticsSummaryQuery,
|
|
36
|
+
type WorkflowAnalyticsSummaryResponse,
|
|
37
|
+
type WorkflowAnalyticsTimeSeriesQuery,
|
|
38
|
+
type WorkflowDefinitionRef,
|
|
39
|
+
type WorkflowExecutionStartResult,
|
|
40
|
+
type WorkflowQueryResult,
|
|
41
|
+
type WorkflowRule,
|
|
42
|
+
type WorkflowRuleItem,
|
|
43
|
+
type WorkflowRunUpdatesResponse,
|
|
44
|
+
type WorkflowRunWithDetails,
|
|
45
|
+
type WorkflowToolParametersQuery,
|
|
46
|
+
type WorkflowUpdatePublishResponse,
|
|
47
|
+
} from '@vertesia/common';
|
|
48
|
+
import type { VertesiaClient } from '../client.js';
|
|
49
|
+
import { EventSourceProvider } from '../execute.js';
|
|
50
|
+
import { shouldCloseAgentRunStream, shouldCloseCompactRunStream } from './stream-termination.js';
|
|
48
51
|
|
|
49
52
|
export class WorkflowsApi extends ApiTopic {
|
|
50
53
|
constructor(parent: ClientBase) {
|
|
51
|
-
super(parent,
|
|
54
|
+
super(parent, '/api/v1/workflows');
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
getActivityCatalog(): Promise<ActivityCatalog> {
|
|
55
|
-
return this.get(
|
|
58
|
+
return this.get('/activity-catalog');
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
listRuns(documentId: string, eventName: string, ruleId: string): Promise<ListWorkflowRunsResponse> {
|
|
@@ -62,7 +65,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
62
65
|
/** List conversations the users has access to */
|
|
63
66
|
listConversations(payload: ListWorkflowRunsPayload): Promise<ListWorkflowRunsResponse> {
|
|
64
67
|
return this.post(`/conversations`, {
|
|
65
|
-
payload
|
|
68
|
+
payload,
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -70,7 +73,12 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
70
73
|
return this.post(`/runs`, { payload: payload });
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
sendSignal(
|
|
76
|
+
sendSignal(
|
|
77
|
+
workflowId: string,
|
|
78
|
+
runId: string,
|
|
79
|
+
signal: string,
|
|
80
|
+
payload?: SignalAgentPayload | null,
|
|
81
|
+
): Promise<SignalAgentResponse> {
|
|
74
82
|
return this.post(`/runs/${workflowId}/${runId}/signal/${signal}`, { payload });
|
|
75
83
|
}
|
|
76
84
|
|
|
@@ -80,9 +88,10 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
80
88
|
options?: {
|
|
81
89
|
includeHistory?: boolean;
|
|
82
90
|
historyFormat?: 'events' | 'tasks' | 'agent';
|
|
83
|
-
|
|
91
|
+
hydratePayloads?: boolean;
|
|
92
|
+
},
|
|
84
93
|
): Promise<WorkflowRunWithDetails> {
|
|
85
|
-
const query:
|
|
94
|
+
const query: NonNullable<IRequestParams['query']> = {};
|
|
86
95
|
|
|
87
96
|
// Support legacy includeHistory parameter
|
|
88
97
|
if (options?.includeHistory !== undefined) {
|
|
@@ -94,6 +103,10 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
94
103
|
query.history_format = options.historyFormat;
|
|
95
104
|
}
|
|
96
105
|
|
|
106
|
+
if (options?.hydratePayloads !== undefined) {
|
|
107
|
+
query.hydrate_payloads = options.hydratePayloads;
|
|
108
|
+
}
|
|
109
|
+
|
|
97
110
|
return this.get(`/runs/${workflowId}/${runId}`, { query });
|
|
98
111
|
}
|
|
99
112
|
|
|
@@ -123,16 +136,13 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
123
136
|
return this.get(`/runs/${workflowId}/${runId}/query/${queryName}`);
|
|
124
137
|
}
|
|
125
138
|
|
|
126
|
-
execute(
|
|
127
|
-
name: string,
|
|
128
|
-
payload: ExecuteWorkflowPayload = {},
|
|
129
|
-
): Promise<(WorkflowExecutionStartResult | undefined)[]> {
|
|
139
|
+
execute(name: string, payload: ExecuteWorkflowPayload = {}): Promise<(WorkflowExecutionStartResult | undefined)[]> {
|
|
130
140
|
return this.post(`/execute/${name}`, { payload });
|
|
131
141
|
}
|
|
132
142
|
|
|
133
143
|
postMessage(runId: string, msg: AgentMessage): Promise<WorkflowUpdatePublishResponse> {
|
|
134
144
|
if (!runId) {
|
|
135
|
-
throw new Error(
|
|
145
|
+
throw new Error('runId is required');
|
|
136
146
|
}
|
|
137
147
|
return this.post(`/runs/${runId}/updates`, { payload: msg });
|
|
138
148
|
}
|
|
@@ -144,7 +154,9 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
144
154
|
*/
|
|
145
155
|
async retrieveMessages(workflowId: string, runId: string, since?: number): Promise<AgentMessage[]> {
|
|
146
156
|
const query = { since };
|
|
147
|
-
const response = await this.get(`/runs/${workflowId}/${runId}/updates`, {
|
|
157
|
+
const response = (await this.get(`/runs/${workflowId}/${runId}/updates`, {
|
|
158
|
+
query,
|
|
159
|
+
})) as WorkflowRunUpdatesResponse;
|
|
148
160
|
// Convert compact messages to AgentMessage for backward compatibility
|
|
149
161
|
return response.messages.map((m: CompactMessage) => toAgentMessage(m, runId));
|
|
150
162
|
}
|
|
@@ -179,7 +191,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
179
191
|
const maxDelay = 30000; // 30 seconds max delay
|
|
180
192
|
|
|
181
193
|
const calculateBackoffDelay = (attempts: number): number => {
|
|
182
|
-
const exponentialDelay = Math.min(baseDelay *
|
|
194
|
+
const exponentialDelay = Math.min(baseDelay * 2 ** attempts, maxDelay);
|
|
183
195
|
// Add jitter to prevent thundering herd
|
|
184
196
|
const jitter = Math.random() * 0.1 * exponentialDelay;
|
|
185
197
|
return exponentialDelay + jitter;
|
|
@@ -228,37 +240,39 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
228
240
|
try {
|
|
229
241
|
const EventSourceImpl = await EventSourceProvider();
|
|
230
242
|
const client = this.client as VertesiaClient;
|
|
231
|
-
const streamUrl = new URL(client.workflows.baseUrl
|
|
243
|
+
const streamUrl = new URL(`${client.workflows.baseUrl}/runs/${workflowId}/${runId}/stream`);
|
|
232
244
|
|
|
233
245
|
// Use the timestamp of the last received message for reconnection
|
|
234
246
|
if (lastMessageTimestamp > 0) {
|
|
235
|
-
streamUrl.searchParams.set(
|
|
247
|
+
streamUrl.searchParams.set('since', lastMessageTimestamp.toString());
|
|
236
248
|
}
|
|
237
249
|
|
|
238
250
|
// Skip historical messages - we already fetched them via GET /updates
|
|
239
|
-
streamUrl.searchParams.set(
|
|
251
|
+
streamUrl.searchParams.set('skipHistory', 'true');
|
|
240
252
|
|
|
241
253
|
const bearerToken = client._auth ? await client._auth() : undefined;
|
|
242
254
|
if (isClosed) return;
|
|
243
255
|
if (!bearerToken) {
|
|
244
256
|
isClosed = true;
|
|
245
257
|
cleanup();
|
|
246
|
-
reject(new Error(
|
|
258
|
+
reject(new Error('No auth token available'));
|
|
247
259
|
return;
|
|
248
260
|
}
|
|
249
261
|
|
|
250
|
-
const token = bearerToken.split(
|
|
251
|
-
streamUrl.searchParams.set(
|
|
262
|
+
const token = bearerToken.split(' ')[1];
|
|
263
|
+
streamUrl.searchParams.set('access_token', token);
|
|
252
264
|
|
|
253
265
|
if (isReconnect) {
|
|
254
|
-
console.log(
|
|
266
|
+
console.log(
|
|
267
|
+
`Reconnecting to SSE stream for run ${runId} (attempt ${reconnectAttempts + 1}/${maxReconnectAttempts})`,
|
|
268
|
+
);
|
|
255
269
|
}
|
|
256
270
|
|
|
257
271
|
const sse = new EventSourceImpl(streamUrl.href);
|
|
258
272
|
currentSse = sse;
|
|
259
273
|
|
|
260
274
|
// Prevent Node from exiting prematurely
|
|
261
|
-
interval = setInterval(() => {
|
|
275
|
+
interval = setInterval(() => {}, 1000);
|
|
262
276
|
|
|
263
277
|
sse.onopen = () => {
|
|
264
278
|
if (isReconnect) {
|
|
@@ -269,8 +283,8 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
269
283
|
};
|
|
270
284
|
|
|
271
285
|
sse.onmessage = (ev: MessageEvent) => {
|
|
272
|
-
if (!ev.data || ev.data.startsWith(
|
|
273
|
-
console.log(
|
|
286
|
+
if (!ev.data || ev.data.startsWith(':')) {
|
|
287
|
+
console.log('Received comment or heartbeat; ignoring it.: ', ev.data);
|
|
274
288
|
return;
|
|
275
289
|
}
|
|
276
290
|
|
|
@@ -291,29 +305,24 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
291
305
|
onMessage(agentMessage, exit);
|
|
292
306
|
}
|
|
293
307
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const streamIsOver = compactMessage.t === AgentMessageType.TERMINATED ||
|
|
298
|
-
(compactMessage.t === AgentMessageType.COMPLETE && workstreamId === 'main');
|
|
299
|
-
|
|
300
|
-
// Only close the stream when the main workstream completes or terminates
|
|
301
|
-
if (streamIsOver) {
|
|
302
|
-
console.log("Closing stream due to COMPLETE message from main workstream");
|
|
308
|
+
if (shouldCloseCompactRunStream(compactMessage, runId)) {
|
|
309
|
+
console.log('Closing stream due to COMPLETE message from main workstream');
|
|
303
310
|
if (!isClosed) {
|
|
304
311
|
isClosed = true;
|
|
305
312
|
cleanup();
|
|
306
313
|
resolve(null);
|
|
307
314
|
}
|
|
308
315
|
} else if (compactMessage.t === AgentMessageType.COMPLETE) {
|
|
309
|
-
console.log(
|
|
316
|
+
console.log(
|
|
317
|
+
`Received COMPLETE message that does not close the root stream for run ${runId}`,
|
|
318
|
+
);
|
|
310
319
|
}
|
|
311
320
|
} catch (err) {
|
|
312
|
-
console.error(
|
|
321
|
+
console.error('Failed to parse SSE message:', err, ev.data);
|
|
313
322
|
}
|
|
314
323
|
};
|
|
315
324
|
|
|
316
|
-
sse.onerror = (err:
|
|
325
|
+
sse.onerror = (err: unknown) => {
|
|
317
326
|
if (isClosed) return;
|
|
318
327
|
|
|
319
328
|
console.warn(`SSE stream error for run ${runId}:`, err);
|
|
@@ -322,30 +331,36 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
322
331
|
// Check if we should attempt reconnection
|
|
323
332
|
if (reconnectAttempts < maxReconnectAttempts) {
|
|
324
333
|
const delay = calculateBackoffDelay(reconnectAttempts);
|
|
325
|
-
console.log(
|
|
334
|
+
console.log(
|
|
335
|
+
`Attempting to reconnect in ${delay}ms (attempt ${reconnectAttempts + 1}/${maxReconnectAttempts})`,
|
|
336
|
+
);
|
|
326
337
|
|
|
327
338
|
reconnectAttempts++;
|
|
328
339
|
reconnectTimer = setTimeout(() => {
|
|
329
340
|
reconnectTimer = null;
|
|
330
341
|
if (!isClosed) {
|
|
331
|
-
setupStream(true);
|
|
342
|
+
void setupStream(true);
|
|
332
343
|
}
|
|
333
344
|
}, delay);
|
|
334
345
|
} else {
|
|
335
|
-
console.error(
|
|
346
|
+
console.error(
|
|
347
|
+
`Failed to reconnect to SSE stream for run ${runId} after ${maxReconnectAttempts} attempts`,
|
|
348
|
+
);
|
|
336
349
|
isClosed = true;
|
|
337
|
-
reject(
|
|
350
|
+
reject(
|
|
351
|
+
new Error(`SSE connection failed after ${maxReconnectAttempts} reconnection attempts`),
|
|
352
|
+
);
|
|
338
353
|
}
|
|
339
354
|
};
|
|
340
355
|
} catch (err) {
|
|
341
|
-
console.error(
|
|
356
|
+
console.error('Error setting up SSE stream:', err);
|
|
342
357
|
if (reconnectAttempts < maxReconnectAttempts) {
|
|
343
358
|
const delay = calculateBackoffDelay(reconnectAttempts);
|
|
344
359
|
reconnectAttempts++;
|
|
345
360
|
reconnectTimer = setTimeout(() => {
|
|
346
361
|
reconnectTimer = null;
|
|
347
362
|
if (!isClosed) {
|
|
348
|
-
setupStream(true);
|
|
363
|
+
void setupStream(true);
|
|
349
364
|
}
|
|
350
365
|
}, delay);
|
|
351
366
|
} else {
|
|
@@ -364,20 +379,17 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
364
379
|
if (onMessage) {
|
|
365
380
|
onMessage(msg, exit);
|
|
366
381
|
}
|
|
367
|
-
|
|
368
|
-
const streamIsOver = msg.type === AgentMessageType.TERMINATED ||
|
|
369
|
-
(msg.type === AgentMessageType.COMPLETE && workstreamId === 'main');
|
|
370
|
-
if (streamIsOver) {
|
|
382
|
+
if (shouldCloseAgentRunStream(msg, runId)) {
|
|
371
383
|
exit(null);
|
|
372
384
|
return;
|
|
373
385
|
}
|
|
374
386
|
}
|
|
375
387
|
} catch (err) {
|
|
376
|
-
console.warn(
|
|
388
|
+
console.warn('Failed to fetch historical messages, continuing with SSE:', err);
|
|
377
389
|
}
|
|
378
390
|
|
|
379
391
|
// 2. Connect to SSE
|
|
380
|
-
setupStream(false);
|
|
392
|
+
void setupStream(false);
|
|
381
393
|
};
|
|
382
394
|
|
|
383
395
|
init().catch(reject);
|
|
@@ -396,8 +408,8 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
396
408
|
workflowId: string,
|
|
397
409
|
runId: string,
|
|
398
410
|
onMessage?: (message: CompactMessage) => void,
|
|
399
|
-
since?: number
|
|
400
|
-
): Promise<{ cleanup: () => void; sendSignal: (signalName: string, data:
|
|
411
|
+
since?: number,
|
|
412
|
+
): Promise<{ cleanup: () => void; sendSignal: (signalName: string, data: unknown) => void }> {
|
|
401
413
|
return new Promise((resolve, reject) => {
|
|
402
414
|
let reconnectAttempts = 0;
|
|
403
415
|
const maxReconnectAttempts = 10;
|
|
@@ -408,7 +420,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
408
420
|
let isClosed = false;
|
|
409
421
|
|
|
410
422
|
const calculateBackoffDelay = (attempts: number): number => {
|
|
411
|
-
const exponentialDelay = Math.min(baseDelay *
|
|
423
|
+
const exponentialDelay = Math.min(baseDelay * 2 ** attempts, maxDelay);
|
|
412
424
|
const jitter = Math.random() * 0.1 * exponentialDelay;
|
|
413
425
|
return exponentialDelay + jitter;
|
|
414
426
|
};
|
|
@@ -418,7 +430,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
418
430
|
|
|
419
431
|
try {
|
|
420
432
|
const client = this.client as VertesiaClient;
|
|
421
|
-
const wsUrl = new URL(client.workflows.baseUrl
|
|
433
|
+
const wsUrl = new URL(`${client.workflows.baseUrl}/runs/${workflowId}/${runId}/ws`);
|
|
422
434
|
|
|
423
435
|
// Replace http/https with ws/wss
|
|
424
436
|
wsUrl.protocol = wsUrl.protocol.replace('http', 'ws');
|
|
@@ -438,7 +450,9 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
438
450
|
wsUrl.searchParams.set('access_token', token);
|
|
439
451
|
|
|
440
452
|
if (reconnectAttempts > 0) {
|
|
441
|
-
console.log(
|
|
453
|
+
console.log(
|
|
454
|
+
`Reconnecting to WebSocket for run ${runId} (attempt ${reconnectAttempts + 1}/${maxReconnectAttempts})`,
|
|
455
|
+
);
|
|
442
456
|
}
|
|
443
457
|
|
|
444
458
|
ws = new WebSocket(wsUrl.href);
|
|
@@ -459,19 +473,19 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
459
473
|
ws = null;
|
|
460
474
|
}
|
|
461
475
|
},
|
|
462
|
-
sendSignal: (signalName: string, data:
|
|
476
|
+
sendSignal: (signalName: string, data: unknown) => {
|
|
463
477
|
if (ws?.readyState === WebSocket.OPEN) {
|
|
464
478
|
const message: WebSocketClientMessage = {
|
|
465
479
|
type: 'signal',
|
|
466
480
|
signalName,
|
|
467
481
|
data,
|
|
468
|
-
requestId: Date.now()
|
|
482
|
+
requestId: Date.now(),
|
|
469
483
|
};
|
|
470
484
|
ws.send(JSON.stringify(message));
|
|
471
485
|
} else {
|
|
472
486
|
console.warn('WebSocket not open, cannot send signal');
|
|
473
487
|
}
|
|
474
|
-
}
|
|
488
|
+
},
|
|
475
489
|
});
|
|
476
490
|
}
|
|
477
491
|
};
|
|
@@ -534,7 +548,9 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
534
548
|
ws.onclose = () => {
|
|
535
549
|
if (!isClosed && reconnectAttempts < maxReconnectAttempts) {
|
|
536
550
|
const delay = calculateBackoffDelay(reconnectAttempts);
|
|
537
|
-
console.log(
|
|
551
|
+
console.log(
|
|
552
|
+
`WebSocket closed, reconnecting in ${delay}ms (attempt ${reconnectAttempts + 1}/${maxReconnectAttempts})`,
|
|
553
|
+
);
|
|
538
554
|
reconnectAttempts++;
|
|
539
555
|
setTimeout(connect, delay);
|
|
540
556
|
} else if (reconnectAttempts >= maxReconnectAttempts) {
|
|
@@ -553,7 +569,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
553
569
|
}
|
|
554
570
|
};
|
|
555
571
|
|
|
556
|
-
connect();
|
|
572
|
+
void connect();
|
|
557
573
|
});
|
|
558
574
|
}
|
|
559
575
|
|
|
@@ -564,7 +580,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
564
580
|
ingestEvents(
|
|
565
581
|
workflowId: string,
|
|
566
582
|
runId: string,
|
|
567
|
-
events: AgentEvent[]
|
|
583
|
+
events: AgentEvent[],
|
|
568
584
|
): Promise<{ ingested: number; status?: string; error?: string }> {
|
|
569
585
|
return this.post(`/runs/${workflowId}/${runId}/events`, {
|
|
570
586
|
payload: { events },
|
|
@@ -579,9 +595,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
579
595
|
* Get workflow analytics summary.
|
|
580
596
|
* Returns overall metrics including token usage, success rates, and run counts.
|
|
581
597
|
*/
|
|
582
|
-
getAnalyticsSummary(
|
|
583
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
584
|
-
): Promise<WorkflowAnalyticsSummaryResponse> {
|
|
598
|
+
getAnalyticsSummary(query: WorkflowAnalyticsSummaryQuery = {}): Promise<WorkflowAnalyticsSummaryResponse> {
|
|
585
599
|
return this.post('/analytics/summary', { payload: query });
|
|
586
600
|
}
|
|
587
601
|
|
|
@@ -589,9 +603,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
589
603
|
* Get token usage analytics.
|
|
590
604
|
* Returns token consumption metrics by model, agent, tool, or over time.
|
|
591
605
|
*/
|
|
592
|
-
getTokenUsageAnalytics(
|
|
593
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
594
|
-
): Promise<TokenUsageAnalyticsResponse> {
|
|
606
|
+
getTokenUsageAnalytics(query: WorkflowAnalyticsTimeSeriesQuery = {}): Promise<TokenUsageAnalyticsResponse> {
|
|
595
607
|
return this.post('/analytics/tokens', { payload: query });
|
|
596
608
|
}
|
|
597
609
|
|
|
@@ -599,9 +611,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
599
611
|
* Get LLM latency analytics.
|
|
600
612
|
* Returns duration/latency metrics for LLM calls.
|
|
601
613
|
*/
|
|
602
|
-
getLlmLatencyAnalytics(
|
|
603
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
604
|
-
): Promise<LatencyAnalyticsResponse> {
|
|
614
|
+
getLlmLatencyAnalytics(query: WorkflowAnalyticsTimeSeriesQuery = {}): Promise<LatencyAnalyticsResponse> {
|
|
605
615
|
return this.post('/analytics/latency/llm', { payload: query });
|
|
606
616
|
}
|
|
607
617
|
|
|
@@ -609,9 +619,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
609
619
|
* Get tool latency analytics.
|
|
610
620
|
* Returns duration/latency metrics for tool calls.
|
|
611
621
|
*/
|
|
612
|
-
getToolLatencyAnalytics(
|
|
613
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
614
|
-
): Promise<LatencyAnalyticsResponse> {
|
|
622
|
+
getToolLatencyAnalytics(query: WorkflowAnalyticsTimeSeriesQuery = {}): Promise<LatencyAnalyticsResponse> {
|
|
615
623
|
return this.post('/analytics/latency/tools', { payload: query });
|
|
616
624
|
}
|
|
617
625
|
|
|
@@ -619,9 +627,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
619
627
|
* Get agent/workflow latency analytics.
|
|
620
628
|
* Returns duration metrics for complete workflow runs.
|
|
621
629
|
*/
|
|
622
|
-
getAgentLatencyAnalytics(
|
|
623
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
624
|
-
): Promise<LatencyAnalyticsResponse> {
|
|
630
|
+
getAgentLatencyAnalytics(query: WorkflowAnalyticsTimeSeriesQuery = {}): Promise<LatencyAnalyticsResponse> {
|
|
625
631
|
return this.post('/analytics/latency/agents', { payload: query });
|
|
626
632
|
}
|
|
627
633
|
|
|
@@ -629,9 +635,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
629
635
|
* Get error analytics.
|
|
630
636
|
* Returns error rates, types, and trends.
|
|
631
637
|
*/
|
|
632
|
-
getErrorAnalytics(
|
|
633
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
634
|
-
): Promise<ErrorAnalyticsResponse> {
|
|
638
|
+
getErrorAnalytics(query: WorkflowAnalyticsTimeSeriesQuery = {}): Promise<ErrorAnalyticsResponse> {
|
|
635
639
|
return this.post('/analytics/errors', { payload: query });
|
|
636
640
|
}
|
|
637
641
|
|
|
@@ -639,9 +643,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
639
643
|
* Get tool usage analytics.
|
|
640
644
|
* Returns tool invocation counts, success rates, and performance metrics.
|
|
641
645
|
*/
|
|
642
|
-
getToolAnalytics(
|
|
643
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
644
|
-
): Promise<ToolAnalyticsResponse> {
|
|
646
|
+
getToolAnalytics(query: WorkflowAnalyticsSummaryQuery = {}): Promise<ToolAnalyticsResponse> {
|
|
645
647
|
return this.post('/analytics/tools', { payload: query });
|
|
646
648
|
}
|
|
647
649
|
|
|
@@ -649,9 +651,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
649
651
|
* Get tool parameter analytics.
|
|
650
652
|
* Returns parameter value distributions for a specific tool.
|
|
651
653
|
*/
|
|
652
|
-
getToolParameterAnalytics(
|
|
653
|
-
query: WorkflowToolParametersQuery
|
|
654
|
-
): Promise<ToolParameterAnalyticsResponse> {
|
|
654
|
+
getToolParameterAnalytics(query: WorkflowToolParametersQuery): Promise<ToolParameterAnalyticsResponse> {
|
|
655
655
|
return this.post('/analytics/tools/parameters', { payload: query });
|
|
656
656
|
}
|
|
657
657
|
|
|
@@ -660,7 +660,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
660
660
|
* Returns unique agents, environments, and models from telemetry data.
|
|
661
661
|
*/
|
|
662
662
|
getAnalyticsFilterOptions(
|
|
663
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
663
|
+
query: WorkflowAnalyticsSummaryQuery = {},
|
|
664
664
|
): Promise<WorkflowAnalyticsFilterOptionsResponse> {
|
|
665
665
|
return this.post('/analytics/filter-options', { payload: query });
|
|
666
666
|
}
|
|
@@ -669,9 +669,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
669
669
|
* Get average prompt size (input tokens) by agent for startConversation calls.
|
|
670
670
|
* This represents the initial prompt + tools size.
|
|
671
671
|
*/
|
|
672
|
-
getPromptSizeAnalytics(
|
|
673
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
674
|
-
): Promise<PromptSizeAnalyticsResponse> {
|
|
672
|
+
getPromptSizeAnalytics(query: WorkflowAnalyticsSummaryQuery = {}): Promise<PromptSizeAnalyticsResponse> {
|
|
675
673
|
return this.post('/analytics/prompt-size', { payload: query });
|
|
676
674
|
}
|
|
677
675
|
|
|
@@ -679,9 +677,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
679
677
|
* Get top principals (users/API keys) who started the most agent runs.
|
|
680
678
|
* Returns the top N principals sorted by run count descending.
|
|
681
679
|
*/
|
|
682
|
-
getTopPrincipalsAnalytics(
|
|
683
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
684
|
-
): Promise<TopPrincipalsAnalyticsResponse> {
|
|
680
|
+
getTopPrincipalsAnalytics(query: WorkflowAnalyticsSummaryQuery = {}): Promise<TopPrincipalsAnalyticsResponse> {
|
|
685
681
|
return this.post('/analytics/top-principals', { payload: query });
|
|
686
682
|
}
|
|
687
683
|
|
|
@@ -689,9 +685,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
689
685
|
* Get agent run distribution - how many runs per agent/interaction type.
|
|
690
686
|
* Returns the top N agents sorted by run count descending.
|
|
691
687
|
*/
|
|
692
|
-
getRunsByAgentAnalytics(
|
|
693
|
-
query: WorkflowAnalyticsSummaryQuery = {}
|
|
694
|
-
): Promise<RunsByAgentAnalyticsResponse> {
|
|
688
|
+
getRunsByAgentAnalytics(query: WorkflowAnalyticsSummaryQuery = {}): Promise<RunsByAgentAnalyticsResponse> {
|
|
695
689
|
return this.post('/analytics/runs-by-agent', { payload: query });
|
|
696
690
|
}
|
|
697
691
|
|
|
@@ -701,7 +695,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
701
695
|
* Returns average, min, max, median, p95, and p99 metrics.
|
|
702
696
|
*/
|
|
703
697
|
getTimeToFirstResponseAnalytics(
|
|
704
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
698
|
+
query: WorkflowAnalyticsTimeSeriesQuery = {},
|
|
705
699
|
): Promise<TimeToFirstResponseAnalyticsResponse> {
|
|
706
700
|
return this.post('/analytics/time-to-first-response', { payload: query });
|
|
707
701
|
}
|
|
@@ -713,7 +707,7 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
713
707
|
* - Percentage of agents that return no tool calls at start
|
|
714
708
|
*/
|
|
715
709
|
getFirstResponseBehaviorAnalytics(
|
|
716
|
-
query: WorkflowAnalyticsTimeSeriesQuery = {}
|
|
710
|
+
query: WorkflowAnalyticsTimeSeriesQuery = {},
|
|
717
711
|
): Promise<FirstResponseBehaviorAnalyticsResponse> {
|
|
718
712
|
return this.post('/analytics/first-response-behavior', { payload: query });
|
|
719
713
|
}
|
|
@@ -724,25 +718,25 @@ export class WorkflowsApi extends ApiTopic {
|
|
|
724
718
|
|
|
725
719
|
export class WorkflowsRulesApi extends ApiTopic {
|
|
726
720
|
constructor(parent: WorkflowsApi) {
|
|
727
|
-
super(parent,
|
|
721
|
+
super(parent, '/rules');
|
|
728
722
|
}
|
|
729
723
|
|
|
730
724
|
list(): Promise<WorkflowRuleItem[]> {
|
|
731
|
-
return this.get(
|
|
725
|
+
return this.get('/');
|
|
732
726
|
}
|
|
733
727
|
|
|
734
728
|
retrieve(id: string): Promise<WorkflowRule> {
|
|
735
729
|
return this.get(`/${id}`);
|
|
736
730
|
}
|
|
737
731
|
|
|
738
|
-
update(id: string, payload:
|
|
732
|
+
update(id: string, payload: UploadWorkflowRulePayload): Promise<WorkflowRule> {
|
|
739
733
|
return this.put(`/${id}`, {
|
|
740
734
|
payload,
|
|
741
735
|
});
|
|
742
736
|
}
|
|
743
737
|
|
|
744
738
|
create(payload: CreateWorkflowRulePayload): Promise<WorkflowRule> {
|
|
745
|
-
return this.post(
|
|
739
|
+
return this.post('/', {
|
|
746
740
|
payload,
|
|
747
741
|
});
|
|
748
742
|
}
|
|
@@ -754,7 +748,7 @@ export class WorkflowsRulesApi extends ApiTopic {
|
|
|
754
748
|
execute(
|
|
755
749
|
id: string,
|
|
756
750
|
objectIds?: string[],
|
|
757
|
-
vars?: Record<string,
|
|
751
|
+
vars?: Record<string, unknown>,
|
|
758
752
|
): Promise<({ run_id: string; workflow_id: string } | undefined)[]> {
|
|
759
753
|
const payload: ExecuteWorkflowPayload = {
|
|
760
754
|
objectIds,
|
|
@@ -768,25 +762,25 @@ export class WorkflowsDefinitionApi extends ApiTopic {
|
|
|
768
762
|
//model: DSLWorkflowDefinition;
|
|
769
763
|
|
|
770
764
|
constructor(parent: WorkflowsApi) {
|
|
771
|
-
super(parent,
|
|
765
|
+
super(parent, '/definitions');
|
|
772
766
|
}
|
|
773
767
|
|
|
774
768
|
list(): Promise<WorkflowDefinitionRef[]> {
|
|
775
|
-
return this.get(
|
|
769
|
+
return this.get('/');
|
|
776
770
|
}
|
|
777
771
|
|
|
778
772
|
retrieve(id: string): Promise<DSLWorkflowDefinition> {
|
|
779
773
|
return this.get(`/${id}`);
|
|
780
774
|
}
|
|
781
775
|
|
|
782
|
-
update(id: string, payload:
|
|
776
|
+
update(id: string, payload: DSLWorkflowSpec): Promise<DSLWorkflowDefinition> {
|
|
783
777
|
return this.put(`/${id}`, {
|
|
784
778
|
payload,
|
|
785
779
|
});
|
|
786
780
|
}
|
|
787
781
|
|
|
788
782
|
create(payload: DSLWorkflowSpec): Promise<DSLWorkflowDefinition> {
|
|
789
|
-
return this.post(
|
|
783
|
+
return this.post('/', {
|
|
790
784
|
payload,
|
|
791
785
|
});
|
|
792
786
|
}
|